Created
September 11, 2025 20:44
-
-
Save wladston/6004d1201ffa28b45341b44cdbdefc10 to your computer and use it in GitHub Desktop.
Minimal Neovim + Lazy + Mason setup: Enable LSP in Vue
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
| return { | |
| { 'neovim/nvim-lspconfig' }, | |
| { 'mason-org/mason.nvim', opts = {} }, | |
| { | |
| 'mason-org/mason-lspconfig.nvim', | |
| opts = { | |
| ensure_installed = { 'ts_ls', 'vue_ls' }, | |
| }, | |
| config = function(_, opts) | |
| require('mason-lspconfig').setup(opts) | |
| local vue_ls_path = vim.fn.expand '$MASON/packages' | |
| .. '/vue-language-server' | |
| .. '/node_modules/@vue/language-server' | |
| vim.lsp.config('ts_ls', { | |
| init_options = { | |
| plugins = { | |
| { | |
| name = "@vue/typescript-plugin", | |
| location = vue_ls_path, | |
| languages = { "vue" }, | |
| } | |
| } | |
| }, | |
| filetypes = { | |
| 'javascript', 'javascriptreact', | |
| 'typescript', 'typescriptreact', | |
| 'vue', | |
| }, | |
| }) | |
| end, | |
| }, | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment