-
Hi! 👋 In my case, the type checker and autocompletion doesn't works but it still trigger the formatter. |
Beta Was this translation helpful? Give feedback.
Replies: 14 comments 24 replies
-
If you have # ~/.config/helix/languages.toml
[[language]]
name = "typescript"
language-server = { command = "deno", args = ["lsp"] } Then you can check that everything is configured correctly with |
Beta Was this translation helpful? Give feedback.
-
Alright it works now! Here is my [[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 }
language-server = { command = "deno", args = ["lsp"], language-id = "javascript" }
indent = { tab-width = 2, unit = " " }
[[language]]
name = "jsx"
scope = "source.jsx"
injection-regex = "jsx"
file-types = ["jsx"]
shebangs = ["deno", "node"]
roots = ["deno.json", "package.json", "tsconfig.json"]
comment-token = "//"
config = { enable = true, lint = true, unstable = true }
language-server = { command = "deno", args = ["lsp"], language-id = "javascriptreact" }
indent = { tab-width = 2, unit = " " }
grammar = "javascript"
[[language]]
name = "typescript"
scope = "source.ts"
injection-regex = "^(ts|typescript)$"
file-types = ["ts"]
shebangs = ["deno", "node"]
roots = ["deno.json", "package.json", "tsconfig.json"]
config = { enable = true, lint = true, unstable = true }
language-server = { command = "deno", args = ["lsp"], language-id = "typescript" }
indent = { tab-width = 2, unit = " " }
[[language]]
name = "tsx"
scope = "source.tsx"
injection-regex = "^(tsx)$" # |typescript
file-types = ["tsx"]
shebangs = ["deno", "node"]
roots = ["deno.json", "package.json", "tsconfig.json"]
config = { enable = true, lint = true, unstable = true }
language-server = { command = "deno", args = ["lsp"], language-id = "typescriptreact" }
indent = { tab-width = 2, unit = " " } |
Beta Was this translation helpful? Give feedback.
-
minimal working configuration [[language]]
name = "typescript"
file-types = ["ts","js"]
language-server = { command = "deno", args = ["lsp"]}
config = { deno = { enable = true, lint = true } } |
Beta Was this translation helpful? Give feedback.
-
Note that not all deno lsp commands are supported in particular |
Beta Was this translation helpful? Give feedback.
-
Has anyone managed to get import_maps working with Deno and Helix? adding the importMap key in the config doesn't seem to make it work. I've tried relative and absolute paths to it. EDIT: I'll leave this here as it took me a while to figure out that you need to be in a git repo for the LSP to pick up your import_map. I'm assuming other options to scope the workspace would also work. |
Beta Was this translation helpful? Give feedback.
-
I would like Helix to attach typescript-language-server when I editing Node.js projects... How to achieve it? Adding a new language like Neovim's builtin LSP client has ability to switch the servers according to |
Beta Was this translation helpful? Give feedback.
-
It's throw error when setup import in "imports": {
"deps": "../../../libs/bc/dbs/deps.ts",
"share/": "../../../libs/bc/dbs/",
"utils/": "../../../libs/bc/utils/",
"interfaces/": "../../../libs/bc/interfaces/"
}
|
Beta Was this translation helpful? Give feedback.
-
I've not used deno in a while. Does anyone know if goto-definition on external packages works yet? |
Beta Was this translation helpful? Give feedback.
-
I've just setup deno-lsp in helix, however, all .tsx file lost all colours: here is my languages.toml: [language-server.deno-lsp]
command = "deno"
args = ["lsp", "--unstable"]
[language-server.deno-lsp.config.deno]
enable = true
unstable = true
lint = true
suggest.imports.hosts = { "https://deno.land" = true }
inlayHints.parameterNames.enabled = "all"
inlayHints.parameterTypes.enabled = true
inlayHints.variableTypes.enabled = true
inlayHints.propertyDeclarationTypes.enabled = true
inlayHints.functionLikeReturnTypes.enabled = true
inlayHints.enumMemberValues.enabled = true
[[language]]
name = "javascript"
language-id = "javascript"
scope = "source.js"
injection-regex = "^(js|javascript)$"
file-types = ["js", "jsx", "mjs"]
shebangs = ["deno", "node"]
roots = ["deno.json", "deno.jsonc", "package.json", "tsconfig.json"]
comment-token = "//"
language-servers = ["deno-lsp"]
grammar = "javascript"
indent = { tab-width = 2, unit = " " }
auto-format = true
[[language]]
name = "jsx"
language-id = "javascriptreact"
scope = "source.jsx"
injection-regex = "jsx"
file-types = ["jsx"]
shebangs = ["deno", "node"]
roots = ["deno.json", "deno.jsonc", "package.json", "tsconfig.json"]
comment-token = "//"
language-servers = ["deno-lsp"]
grammar = "javascript"
indent = { tab-width = 2, unit = " " }
auto-format = true
[[language]]
name = "typescript"
language-id = "typescript"
scope = "source.ts"
injection-regex = "^(ts|typescript)$"
file-types = ["ts"]
shebangs = ["deno", "node"]
roots = ["deno.json", "deno.jsonc", "package.json", "tsconfig.json"]
comment-token = "//"
language-servers = ["deno-lsp"]
grammar = "typescript"
indent = { tab-width = 2, unit = " " }
auto-format = true
[[language]]
name = "tsx"
language-id = "typescriptreact"
scope = "source.tsx"
injection-regex = "^(tsx)$"
file-types = ["tsx"]
shebangs = ["deno", "node"]
roots = ["deno.json", "deno.jsonc", "package.json", "tsconfig.json"]
comment-token = "//"
language-servers = ["deno-lsp"]
grammar = "typescript"
indent = { tab-width = 2, unit = " " }
auto-format = true |
Beta Was this translation helpful? Give feedback.
-
Hello, since deno 2 came out, is there a new way of doing ? |
Beta Was this translation helpful? Give feedback.
-
hello, Cannot find name 'React' |
Beta Was this translation helpful? Give feedback.
-
I can't find the information. Do you know how to configure deno lsp to work with svelte files ? |
Beta Was this translation helpful? Give feedback.
-
currently i quit using deno lsp for tsx files and i just use compiler errors on the terminal |
Beta Was this translation helpful? Give feedback.
-
Here is what worked for me as of today [language-server.deno-language-server]
command = "deno"
args = ["lsp"]
required-root-patterns = ["deno.json", "deno.jsonc"]
[[language]]
name = "typescript"
file-types = ["ts", "tsx"]
language-servers = ["deno-language-server"]
[[language]]
name = "javascript"
file-types = ["js", "jsx"]
language-servers = ["deno-language-server"] Minimal configuration for making Deno work with JavaScript, JSX, TypeScript, TSX files to add to your |
Beta Was this translation helpful? Give feedback.
Alright it works now!
Here is my
.config/helix/languages.toml