Vue support fixed

This commit is contained in:
Maurice Grönwoldt 2025-09-17 17:53:46 +02:00
commit 70f5f3c859
No known key found for this signature in database
GPG key ID: FBB005FE74FEF996
7 changed files with 62 additions and 26 deletions

View file

@ -1,5 +1,6 @@
return {
lua_ls = require("lsp.lua"),
jdtls = require("lsp.java"),
clangd = require("lsp.clangd"),
lua_ls = require("lsp.lua"),
jdtls = require("lsp.java"),
clangd = require("lsp.clangd"),
ts_ls = require("lsp.ts_ls"),
}

14
lua/lsp/ts_ls.lua Normal file
View file

@ -0,0 +1,14 @@
local vue_language_server_path = vim.fn.expand '$MASON/packages' .. '/vue-language-server' .. '/node_modules/@vue/language-server'
return {
init_options = {
plugins = {
{
name = "@vue/typescript-plugin",
location = vue_language_server_path,
languages = { "vue" },
},
},
},
filetypes = { "typescript", "javascript", "javascriptreact", "typescriptreact", "vue" },
}

View file

@ -6,6 +6,8 @@ return {
},
formatters_by_ft = {
javascript = { "prettierd", "prettier", stop_after_first = true },
typescript = { "prettierd", "prettier", stop_after_first = true },
vue = { "prettierd", "prettier", stop_after_first = true },
rust = { "rustfmt", lsp_format = "fallback" },
java = { "spotless", "google-java-format" },
lua = { "stylua" },

13
lua/plugins/kube.lua Normal file
View file

@ -0,0 +1,13 @@
return {
{
"ramilito/kubectl.nvim",
-- use a release tag to download pre-built binaries
version = "2.*",
-- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
-- build = 'cargo build --release',
dependencies = "saghen/blink.download",
config = function()
require("kubectl").setup()
end,
},
}

View file

@ -1,18 +1,21 @@
if not table.unpack then
table.unpack = unpack
end
return {
-- Main LSP Configuration
"neovim/nvim-lspconfig",
dependencies = {
-- Automatically install LSPs and related tools to stdpath for Neovim
-- Mason must be loaded before its dependents so we need to set it up here.
-- NOTE: `opts = {}` is the same as calling `require('mason').setup({})`
{ "williamboman/mason.nvim", opts = {} },
"williamboman/mason-lspconfig.nvim",
"WhoIsSethDaniel/mason-tool-installer.nvim",
"folke/neoconf.nvim",
-- Useful status updates for LSP.
{ "j-hui/fidget.nvim", opts = {} },
},
config = function()
require("neoconf").setup({})
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("kickstart-lsp-attach", { clear = true }),
callback = function(event)
@ -106,18 +109,17 @@ return {
local capabilities = vim.lsp.protocol.make_client_capabilities()
local servers = require("lsp")
local ensure_installed = { "lua_ls" } --vim.tbl_keys(servers or {})
local ensure_installed = { "lua_ls", "ts_ls", "vue-language-server" }
vim.list_extend(ensure_installed, {
"stylua", -- Used to format Lua code
"stylua",
})
require("mason-tool-installer").setup({ ensure_installed = ensure_installed })
for name, value in pairs(servers) do --pseudocode
for name, value in pairs(servers) do
vim.lsp.config(name, value)
end
require("mason-lspconfig").setup({
ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer)
ensure_installed = {},
automatic_installation = false,
})
end,

1
lua/plugins/neoconf.lua Normal file
View file

@ -0,0 +1 @@
return { "folke/neoconf.nvim" }