Vue features
This commit is contained in:
@@ -7,6 +7,33 @@ return {
|
||||
end,
|
||||
},
|
||||
|
||||
-- Mason Tool Installer (auto-install formatters and linters)
|
||||
{
|
||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||
dependencies = { "mason-org/mason.nvim" },
|
||||
config = function()
|
||||
require("mason-tool-installer").setup({
|
||||
ensure_installed = {
|
||||
-- Formatters
|
||||
"prettier",
|
||||
"black",
|
||||
"stylua",
|
||||
"shfmt",
|
||||
-- Linters
|
||||
"eslint_d",
|
||||
"ruff",
|
||||
"selene",
|
||||
"shellcheck",
|
||||
"jsonlint",
|
||||
"yamllint",
|
||||
"markdownlint",
|
||||
},
|
||||
auto_update = false,
|
||||
run_on_start = true,
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- Mason-LSPconfig (bridge Mason and nvim-lspconfig)
|
||||
{
|
||||
"mason-org/mason-lspconfig.nvim",
|
||||
@@ -15,6 +42,7 @@ return {
|
||||
ensure_installed = {
|
||||
"pyright", -- Python
|
||||
"ts_ls", -- TypeScript/JavaScript
|
||||
"vuels", -- Vue (Volar)
|
||||
"jsonls", -- JSON
|
||||
"yamlls", -- YAML
|
||||
"html", -- HTML
|
||||
@@ -92,6 +120,16 @@ return {
|
||||
},
|
||||
})
|
||||
|
||||
-- Vue
|
||||
vim.lsp.config("vuels", {
|
||||
filetypes = { "vue" },
|
||||
init_options = {
|
||||
typescript = {
|
||||
tsdk = vim.fn.getcwd() .. "/node_modules/typescript/lib",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Other languages
|
||||
vim.lsp.config("jsonls", {})
|
||||
vim.lsp.config("yamlls", {})
|
||||
@@ -103,6 +141,7 @@ return {
|
||||
vim.lsp.enable("lua_ls")
|
||||
vim.lsp.enable("pyright")
|
||||
vim.lsp.enable("ts_ls")
|
||||
vim.lsp.enable("vuels")
|
||||
vim.lsp.enable("jsonls")
|
||||
vim.lsp.enable("yamlls")
|
||||
vim.lsp.enable("html")
|
||||
|
||||
Reference in New Issue
Block a user