Skip to content

Instantly share code, notes, and snippets.

@Graeme22
Last active October 28, 2024 21:16
Show Gist options
  • Select an option

  • Save Graeme22/73af8f6b3580fc9feedeb13802f1a6fd to your computer and use it in GitHub Desktop.

Select an option

Save Graeme22/73af8f6b3580fc9feedeb13802f1a6fd to your computer and use it in GitHub Desktop.
Vue/Nuxt LSP support for kickstart.nvim Neovim config
-- add this line above the servers variable in nvim-lspconfig's setup function:
local vue_path = require('mason-registry').get_package('vue-language-server'):get_install_path() .. '/node_modules/@vue/language-server'
-- modify your existing LSP plugins like so:
local servers = {
ts_ls = {
init_options = {
plugins = {
{
name = '@vue/typescript-plugin',
location = vue_path,
languages = { 'vue' },
},
},
},
filetypes = {
'typescript',
'javascript',
'javascriptreact',
'typescriptreact',
'vue',
},
},
volar = {},
-- ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment