添加前端三件套语法高亮

This commit is contained in:
caprain 2026-05-18 00:34:49 +08:00
parent 8eacffaa83
commit 476e467710
4 changed files with 16 additions and 4 deletions

View file

@ -12,7 +12,7 @@ local P = {
-- 提取出统一的配置变量 -- 提取出统一的配置变量
local formatters_by_ft = { local formatters_by_ft = {
python = { "isort", "black" }, python = { "isort", "black" },
rust = { "rust-analyzer", lsp_format = "fallback" }, rust = { "rustfmt", lsp_format = "fallback" },
toml = { "templ" }, toml = { "templ" },
sh = { "shfmt" }, sh = { "shfmt" },
zsh = { "shfmt" }, zsh = { "shfmt" },

View file

@ -1,4 +1,4 @@
-- === 插件描述 === -- === 高亮当前文件所有引用 ===
if vim.g.vscode then return end if vim.g.vscode then return end
vim.keymap.set( vim.keymap.set(

View file

@ -1,9 +1,18 @@
-- === LSP 核心配置 (Lspconfig + Mason) === -- === LSP 核心配置 (Lspconfig + Mason) ===
if vim.g.vscode then return end if vim.g.vscode then return end
local servers = { "lua_ls", "rust_analyzer", "pylsp", "denols", } local servers = {
"lua_ls",
"rust_analyzer",
"pylsp",
"vtsls", -- javascript
}
if not IS_ARM then if not IS_ARM then
vim.list_extend(servers, { "marksman", "svelte", "cssls", "html" }) vim.list_extend(servers, {
"marksman",
"svelte",
"cssls",
"html" })
end end
-- 插件配置清单 -- 插件配置清单

View file

@ -16,6 +16,9 @@ local ensure_installed = {
"markdown", "markdown",
"sh", "sh",
"java", "java",
"javascript",
"html",
"css",
} }
-- 在 FileType 确定时,检查、安装并启动 -- 在 FileType 确定时,检查、安装并启动