-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lsp: rework workspace folders #14455
Comments
|
@kitsonk I know you're not part of deno core anymore, but could you give any quick tips / ideas on what you meant by this?
|
Fixed by #20358. |
@hemedani Your comment saved me a lot of pain before!!! Now with the updates to helix editor (v 23.10) seems like nothing works - I might just not really understand how to get things set up. Suggestions, hover, go to definition, etc not working currently. Can you please please please share your current helix config for your per project Thanks again for all the pain you saved me with your previous config!!! |
@3210jr It's very simple bro [[language]]
name = "javascript"
scope = "source.js"
injection-regex = "^(js|javascript)$"
file-types = ["js", "jsx", "mjs"]
shebangs = ["deno", "node"]
roots = ["deno.json", "package.json", "tsconfig.json"]
# comment-token = "//"
# config = { enable = true, lint = true, unstable = true, importMap = "deno.json" }
language-servers = ["deno"]
indent = { tab-width = 2, unit = " " }
auto-format = true
[[language]]
name = "jsx"
scope = "source.jsx"
injection-regex = "jsx"
file-types = ["jsx"]
shebangs = ["deno", "node"]
roots = ["deno.json", "package.json", "tsconfig.json"]
language-servers = ["deno"]
indent = { tab-width = 2, unit = " " }
grammar = "javascript"
auto-format = true
[[language]]
name = "typescript"
scope = "source.ts"
injection-regex = "^(ts|typescript)$"
file-types = ["ts"]
shebangs = ["deno", "node"]
roots = ["deno.json", "package.json", "tsconfig.json"]
language-servers = ["deno"]
indent = { tab-width = 2, unit = " " }
auto-format = true
[[language]]
name = "tsx"
scope = "source.tsx"
injection-regex = "^(tsx)$" # |typescript
file-types = ["tsx"]
shebangs = ["deno", "node"]
roots = ["deno.json", "package.json", "tsconfig.json"]
language-servers = ["deno"]
indent = { tab-width = 2, unit = " " }
auto-format = true
[language-server.deno]
command = "deno"
args = ["lsp"]
config = { enable = true, lint = true, unstable = true, importMap = "deno.json" } |
Okay I found what was wrong!! Turns out the Cheers @hemedani ! Thanks again! |
Not all editors / LSP clients support per-project configuration, not all even support any configuration. So it becomes non-trivial to make it work with some editors.
For example I've had to figure out a magic incantation to add to Helix's languages.toml:
by looking at debug messages to see what the server doesn't like.
Originally posted by @unrelentingtech in #13228 (comment)
The initial implementation of workspace folders was naïve on my part and in doing the
enableFolders
feature I realised a much cleaner and better way to do it. We need to rework this feature and respect the client capability around workspace folders, so clients don't have to implement such things.The text was updated successfully, but these errors were encountered: