Skip to content

Commit

Permalink
Contribute symbols to ToC
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski committed Feb 26, 2024
1 parent b13fca6 commit 322a587
Show file tree
Hide file tree
Showing 5 changed files with 448 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/jupyterlab-lsp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"build:labextension:dev": "jupyter labextension build --development True .",
"build:lib": "tsc",
"build:prod": "jlpm run build:lib && jlpm run build:labextension",
"build:schema": "jlpm build:schema-backend && jlpm build:schema-completion && jlpm build:schema-hover && jlpm build:schema-diagnostics && jlpm build:schema-syntax_highlighting && jlpm build:schema-jump_to && jlpm build:schema-signature && jlpm build:schema-highlights && jlpm build:schema-plugin && jlpm build:schema-rename",
"build:schema": "jlpm build:schema-backend && jlpm build:schema-completion && jlpm build:schema-hover && jlpm build:schema-diagnostics && jlpm build:schema-syntax_highlighting && jlpm build:schema-jump_to && jlpm build:schema-signature && jlpm build:schema-highlights && jlpm build:schema-plugin && jlpm build:schema-rename && jlpm build:schema-symbol",
"build:schema-backend": "json2ts ../../python_packages/jupyter_lsp/jupyter_lsp/schema/schema.json --unreachableDefinitions | prettier --stdin-filepath _schema.d.ts > src/_schema.ts",
"build:schema-plugin": "json2ts schema/plugin.json | prettier --stdin-filepath _plugin.d.ts > src/_plugin.ts",
"build:schema-completion": "json2ts schema/completion.json | prettier --stdin-filepath _completion.d.ts > src/_completion.ts ",
Expand All @@ -45,6 +45,7 @@
"build:schema-highlights": "json2ts schema/highlights.json | prettier --stdin-filepath _highlights.d.ts > src/_highlights.ts",
"build:schema-rename": "json2ts schema/rename.json | prettier --stdin-filepath _rename.d.ts > src/_rename.ts",
"build:schema-signature": "json2ts schema/signature.json | prettier --stdin-filepath _signature.d.ts > src/_signature.ts",
"build:schema-symbol": "json2ts schema/symbol.json | prettier --stdin-filepath _symbol.d.ts > src/_symbol.ts",
"bundle": "npm pack .",
"clean": "jlpm run clean:lib",
"clean:all": "jlpm run clean:lib && jlpm run clean:labextension",
Expand Down
23 changes: 23 additions & 0 deletions packages/jupyterlab-lsp/schema/symbol.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"jupyter.lab.setting-icon": "lsp:hover",
"jupyter.lab.setting-icon-label": "Language integration",
"title": "Code Symbols",
"description": "LSP Symbols (table of contents integration).",
"type": "object",
"properties": {
"throttlerDelay": {
"title": "Throttler delay",
"type": "number",
"default": 50,
"minimum": 0,
"description": "Number of milliseconds to delay sending out the hover request to the language server."
},
"disable": {
"title": "Disable",
"type": "boolean",
"default": false,
"description": "Disable this feature. Requires reloading JupyterLab to apply changes."
}
},
"jupyter.lab.shortcuts": []
}
Loading

0 comments on commit 322a587

Please sign in to comment.