feat: added volar support

This commit is contained in:
s-prechtl 2024-03-18 12:13:15 +01:00
parent a0bd002a33
commit 972fd3dae1
4 changed files with 216 additions and 21 deletions

View file

@ -388,13 +388,28 @@ require('lazy').setup {
pyright = {},
rust_analyzer = {},
volar = {},
tsserver = {
init_options = {
plugins = {
{
name = '@vue/typescript-plugin',
location = '/home/sprechtl/.config/nvim/node_modules/@vue/typescript-plugin/',
languages = { 'javascript', 'typescript', 'vue' },
},
},
},
filetypes = {
'javascript',
'typescript',
'vue',
},
},
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
--
-- Some languages (like typescript) have entire language plugins that can be useful:
-- https://github.com/pmizio/typescript-tools.nvim
--
-- But for many setups, the LSP (`tsserver`) will work just fine
tsserver = {},
--
lua_ls = {
@ -456,26 +471,6 @@ require('lazy').setup {
end,
},
{ -- Autoformat
'stevearc/conform.nvim',
opts = {
notify_on_error = false,
format_on_save = {
timeout_ms = 500,
lsp_fallback = true,
},
formatters_by_ft = {
lua = { 'stylua' },
-- Conform can also run multiple formatters sequentially
-- python = { "isort", "black" },
--
-- You can use a sub-list to tell conform to run *until* a formatter
-- is found.
-- javascript = { { "prettierd", "prettier" } },
},
},
},
{ -- Autocompletion
'hrsh7th/nvim-cmp',
event = 'InsertEnter',