Vue features
This commit is contained in:
@@ -36,7 +36,7 @@ return {
|
||||
adapters = { "pwa-node", "pwa-chrome", "pwa-msedge", "node-terminal", "pwa-extensionHost" },
|
||||
})
|
||||
|
||||
for _, language in ipairs({ "typescript", "javascript", "typescriptreact", "javascriptreact" }) do
|
||||
for _, language in ipairs({ "typescript", "javascript", "typescriptreact", "javascriptreact", "vue" }) do
|
||||
dap.configurations[language] = {
|
||||
{
|
||||
type = "pwa-node",
|
||||
@@ -73,6 +73,17 @@ return {
|
||||
url = "http://localhost:3000",
|
||||
webRoot = "${workspaceFolder}",
|
||||
},
|
||||
{
|
||||
type = "pwa-chrome",
|
||||
request = "launch",
|
||||
name = "Launch Chrome (Vue dev server)",
|
||||
url = function()
|
||||
local port = vim.fn.input("Port (default 8080): ", "8080")
|
||||
return "http://localhost:" .. port
|
||||
end,
|
||||
webRoot = "${workspaceFolder}",
|
||||
sourceMaps = true,
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -10,6 +10,7 @@ return {
|
||||
jsx = { "prettier", "eslint" },
|
||||
typescript = { "prettier", "eslint" },
|
||||
typescriptreact = { "prettier", "eslint" },
|
||||
vue = { "prettier" },
|
||||
json = { "prettier" },
|
||||
jsonc = { "prettier" },
|
||||
html = { "prettier" },
|
||||
|
||||
@@ -6,6 +6,7 @@ return {
|
||||
javascriptreact = { "eslint_d" },
|
||||
typescript = { "eslint_d" },
|
||||
typescriptreact = { "eslint_d" },
|
||||
vue = { "eslint_d" },
|
||||
python = { "ruff" },
|
||||
lua = { "selene" },
|
||||
sh = { "shellcheck" },
|
||||
|
||||
@@ -16,6 +16,7 @@ return {
|
||||
"javascript",
|
||||
"typescript",
|
||||
"tsx",
|
||||
"vue",
|
||||
"html",
|
||||
"css",
|
||||
"bash",
|
||||
|
||||
Reference in New Issue
Block a user