Last active
October 28, 2024 21:16
-
-
Save Graeme22/73af8f6b3580fc9feedeb13802f1a6fd to your computer and use it in GitHub Desktop.
Vue/Nuxt LSP support for kickstart.nvim Neovim config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- 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