mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-06 16:08:05 +00:00
Without a tsconfig.json or jsconfig.json, tsserver's inferred project holds only open files and what they import, so completion never offered exports from other files. Register the project's sources with tsserver as an external project, using the options an inferred project assumes, so no file is written to disk. Registration needs `typescript.tsserverRequest`. Projects with a configuration, including one in a subfolder, stay as they were, and so do trees over 10,000 sources or 16 MiB of JavaScript, since tsserver disables its language service past 20 MiB. Created and deleted files update the project, and unopened files stay out of Problems.
34 lines
1.0 KiB
TOML
34 lines
1.0 KiB
TOML
id = "javascriptreact"
|
|
name = "JavaScript JSX"
|
|
extensions = ["jsx"]
|
|
line-comment = "//"
|
|
block-comment = ["/*", "*/"]
|
|
indent = { tab-size = 2, insert-spaces = true }
|
|
ui-mode = "JSX"
|
|
tree-sitter = "javascript"
|
|
|
|
[[language-servers]]
|
|
name = "vtsls"
|
|
tsserver-project = true
|
|
command = "vtsls"
|
|
args = ["--stdio"]
|
|
root-markers = ["jsconfig.json", "tsconfig.json", "package.json"]
|
|
install-hint = "npm i -g @vtsls/language-server"
|
|
|
|
[[language-servers]]
|
|
name = "typescript-language-server"
|
|
tsserver-project = true
|
|
# Alternative: used only when the server above is not installed.
|
|
fallback = true
|
|
command = "typescript-language-server"
|
|
args = ["--stdio"]
|
|
root-markers = ["jsconfig.json", "tsconfig.json", "package.json"]
|
|
install-hint = "npm i -g typescript@6 typescript-language-server"
|
|
|
|
[debugger]
|
|
adapter = "js-debug"
|
|
command = "js-debug-adapter"
|
|
args = ["${port}", "127.0.0.1"]
|
|
transport = "tcp"
|
|
install-hint = "Install vscode-js-debug's DAP server (js-debug-dap-*.tar.gz from https://github.com/microsoft/vscode-js-debug/releases) as `js-debug-adapter`"
|