Replies: 9 comments 9 replies
-
|
For personal use, |
Beta Was this translation helpful? Give feedback.
-
|
I am still fighting with getting it to work, but I saw that the built-in languages didn't use the |
Beta Was this translation helpful? Give feedback.
-
|
hey, have you been able to find a solution for this? ive been struggling as well... |
Beta Was this translation helpful? Give feedback.
-
Yes, I have implemented everything that I needed for vue with nvf. Adding new lsps from lspconfig is pretty easy actually: lsp = {
lspconfig = {
enable = true;
sources = {
vue_ls = ''
vim.lsp.enable('vue_ls')
vim.lsp.config('vue_ls', {})
'';
eslint = ''
vim.lsp.enable('eslint')
vim.lsp.config('eslint', {})
'';
ts_ls = ''
vim.lsp.enable('ts_ls')
vim.lsp.config('ts_ls', {
init_options = {
plugins = {
{
name = "@vue/typescript-plugin",
location = "${pkgs.vue-language-server}/lib/node_modules/@vue/language-server",
languages = {"vue"},
},
},
},
filetypes = {
"javascript",
"typescript",
"vue",
},
})
'';
};
};
};This is my config with eslint. I am not using prettier, but using eslint as formatter as well, so I also disabled prettier in the conform-nvim formatter config in nvf. I am using home manager, so I also added these 3 language servers to the home.packages part of my nvf module: |
Beta Was this translation helpful? Give feedback.
-
|
Thank you so much! |
Beta Was this translation helpful? Give feedback.
-
|
with the new vim.lsp.servers api the following is recommended see options docs for details on vim.lsp.servers |
Beta Was this translation helpful? Give feedback.
-
Is this only referring to the home.packages part? |
Beta Was this translation helpful? Give feedback.
-
|
I'm not really sure what you're talking about with home.packages
i was referring to this part. this is the updated code: vim.lsp.servers = {
vue_ls = {};
};
|
Beta Was this translation helpful? Give feedback.
-
|
Is there a reference for vtsls and vue? I got ts_ls to work with the vue plugin without a problem, but I need to switch to vtsls for performance reasons and vtsls is the only supported ts lsp for vue_lsp from v3 onwards. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Feature Type
New languages
🔖 Feature description
I saw that there are some changes going on currently with the lsp integration.
I wanted to add vue support (volar and ts_ls wit the vue plugin) in my own config and then contribute it here.
What would be the best way to go here currently?
vim.lsp.enable?Beta Was this translation helpful? Give feedback.
All reactions