-
-
Notifications
You must be signed in to change notification settings - Fork 2.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
Volar support #2194
Comments
It looks like it might need some extra non-LSP config. Here's what sublime configures: https://github.com/sublimelsp/LSP-volar/blob/1a52710ba115cd1bfe958777b0d16721b5745ec1/LSP-volar.sublime-settings I don't see any references to |
any news about this ? |
I'm having similar issues, my config so far is ❯ cat ~/.config/helix/languages.toml
───────┬────────────────────────────────────────────────────────────────────────────────────────────────
│ File: /home/niedzwiedz/.config/helix/languages.toml
───────┼────────────────────────────────────────────────────────────────────────────────────────────────
1 │ [[language]]
2 │ name = "vue"
3 │ file-types = ["vue"]
4 │ language-server = { command = "vue-language-server", args = ["--stdio"] }
───────┴───────────────────────────────────────────────────────────────────────────────── and I'm getting
|
https://github.com/emacs-lsp/lsp-mode/blob/master/clients/lsp-volar.el anyone here speaks elisp? :D |
[[language]]
name = "vue"
file-types = ["vue"]
language-server = { command = "vue-language-server", args = ["--stdio"] }
scope = "text.html.vue"
roots = ["package.json"]
injection-regex = "vue"
config = {typescript = {serverPath = "/home/niedzwiedz/Pieprzyk/prometeusz/prometeusz-front/node_modules/typescript/lib/tsserverlibrary.js"}}}
this works but
from what I remember vetur had an issue where it would not support |
[[language]]
name = "vue"
file-types = ["vue"]
language-server = { command = "vue-language-server", args = ["--stdio"] }
scope = "text.html.vue"
roots = ["package.json"]
injection-regex = "vue"
[language.config.typescript] # this part must be hardcoded sadly, if anyone figures out how to provide a relative path let me know
serverPath = "/home/niedzwiedz/Pieprzyk/prometeusz/prometeusz-front/node_modules/typescript/lib/tsserverlibrary.js"
[language.config.languageFeatures]
semanticTokens = false
references = true
definition = true
typeDefinition = true
callHierarchy = true
hover = true
rename = true
renameFileRefactoring = true
signatureHelp = true
codeAction = true
completion = { defaultTagNameCase = 'both', defaultAttrNameCase = 'kebabCase' }
schemaRequestService = true
documentHighlight = true
documentLink = true
codeLens = true
diagnostics = true
[language.config.documentFeatures]
documentColor = false
selectionRange = true
foldingRange = true
linkedEditingRange = true
documentSymbol = true
documentFormatting = { defaultPrintWidth = 100 }
this works, and surprisingly well I must add! |
It seems to do additional logic in finding tsserver.js where Volar is installed? Am I seeing that right? |
I needed to redo this, and now I see I forgot to mention it: you need to install following libs first (based on neovim's config)
in my case [[language]]
name = "rust"
[language.config.cargo]
features = "all"
[language.config.checkOnSave]
command = "clippy"
[[language]]
name = "vue"
file-types = ["vue"]
language-server = { command = "vue-language-server", args = ["--stdio"] }
scope = "text.html.vue"
roots = ["package.json"]
injection-regex = "vue"
auto-format = true
[language.config.typescript]
serverPath = "/home/niedzwiedz/.config/nvm/versions/node/v16.16.0/lib/node_modules/typescript/lib/tsserverlibrary.js"
[language.config.languageFeatures]
semanticTokens = true
references = true
definition = true
typeDefinition = true
callHierarchy = true
hover = true
rename = true
renameFileRefactoring = true
signatureHelp = true
codeAction = true
completion = { defaultTagNameCase = 'both', defaultAttrNameCase = 'kebabCase' }
schemaRequestService = true
documentHighlight = true
documentLink = true
codeLens = true
diagnostics = true
[language.config.documentFeatures]
documentColor = false
selectionRange = true
foldingRange = true
linkedEditingRange = true
documentSymbol = true
documentFormatting = { defaultPrintWidth = 100 }
|
hi @Niedzwiedzw , thank you for sharing this config . it willy did help me develop vue apps in helix. |
no idea, copied it from neovim config |
any updates on volar support? This is currently the main thing that is prevent me from fully trying out helix |
In case someone comes across this, the solution proposed by @Niedzwiedzw works well but you may need to specify |
Doesn't work for me, but just installing |
Textobject navigation uses tree-sitter queries (https://docs.helix-editor.com/master/guides/textobject.html) not LSP |
|
Okey, found |
#2311 covers this: injections are used for syntax highlighting but don't currently affect textobjects or tree-sitter motions |
Hello Helix Team, I searched google beforehand but could not find anything useful. Now that we are stuck there i was recommended to check in with the helix team an when i wanted to do that i found this thread. For the What else could i try? |
I got this working, but on macOS. https://jeannot-muller.com/vue3-and-helix-editor-on-macos-26299554fb1f Not sure if it will work on ubuntu too, but perhaps it gives you an idea. |
So I've had this working for months (using #2194 (comment)), but I've noticed that sometimes Volar uses an insane amount of RAM, like 8+ GB on a medium-ish sized project, and my computer grinds to a halt as it runs out of RAM. It's easy for me to reproduce, I just open a
Anyone else experiencing something similar? Not sure if this is a Volar issue, or has to do with the interplay between Helix and how Volar is configured. |
In MacOS, for me this was not working as suggested in previous comments: [language.config.typescript]
serverPath = "/opt/homebrew/lib/node_modules/typescript/lib/tsserverlibrary.js" However, looking at nvim's server config, I changed it to: [language.config.typescript]
tsdk = "/opt/homebrew/lib/node_modules/typescript/lib" which has been working for me so far. |
I can confirm this approach from @idr4n worked for me using system Node installed via Homebrew. If you're using a copy of TypeScript also installed from Homebrew, this path to the TypeScript server should work (essentially look for the [language.config.typescript]
tsdk = "/opt/homebrew/opt/typescript/libexec/lib/node_modules/typescript/lib" Also with TypeScript already installed via Homebrew, I only needed to run |
To support newer Vue features introduced with Vue 3 the existing Vue language server has been replaced. Closes helix-editor#2194
Describe your feature request
Please support Volar for Vue 3 as Vetur only supports Vue 2.
Volar was mentioned in this pull request but I wonder why it could not work.
Things I have tried:
npm install -g @volar/vue-language-server typescript
.config/helix/languages.toml
hx --health
However, opening a
.vue
file throws this into the logsI feel like it has something to do with the default value of
init_options
as stated here.I am using Helix release 22.03
The text was updated successfully, but these errors were encountered: