This commit is contained in:
Your Name 2026-07-12 06:45:19 +08:00
parent b6b0e17cfc
commit 8b4719f8a9
3 changed files with 54 additions and 6 deletions

View File

@ -701,7 +701,7 @@ do
-- https://github.com/pmizio/typescript-tools.nvim -- https://github.com/pmizio/typescript-tools.nvim
-- --
-- But for many setups, the LSP (`ts_ls`) will work just fine -- But for many setups, the LSP (`ts_ls`) will work just fine
-- ts_ls = {}, vtsls = {},
stylua = {}, -- Used to format Lua code stylua = {}, -- Used to format Lua code
@ -762,7 +762,6 @@ do
-- You can add other tools here that you want Mason to install -- You can add other tools here that you want Mason to install
'stylua', 'stylua',
'tailwindcss', 'tailwindcss',
'prettierd',
'html', 'html',
'intelephense', 'intelephense',
'pretty-php', 'pretty-php',
@ -773,6 +772,8 @@ do
'shfmt', 'shfmt',
'rust-analyzer', 'rust-analyzer',
'ruff', 'ruff',
'biome',
'clang-format',
}) })
require('mason-tool-installer').setup { ensure_installed = ensure_installed } require('mason-tool-installer').setup { ensure_installed = ensure_installed }
@ -797,6 +798,22 @@ do
local enabled_filetypes = { local enabled_filetypes = {
-- lua = true, -- lua = true,
-- python = true, -- python = true,
javascript = true,
typescript = true,
javascriptreact = true,
typescriptreact = true,
scss = true,
pandoc = true,
markdown = true,
json = true,
css = true,
yml = true,
html = true,
php = true,
cpp = true,
sh = true,
go = true,
python = true,
} }
if enabled_filetypes[vim.bo[bufnr].filetype] then if enabled_filetypes[vim.bo[bufnr].filetype] then
return { timeout_ms = 500 } return { timeout_ms = 500 }
@ -814,7 +831,29 @@ do
-- python = { "isort", "black" }, -- python = { "isort", "black" },
-- --
-- You can use 'stop_after_first' to run the first available formatter from the list -- You can use 'stop_after_first' to run the first available formatter from the list
-- javascript = { "prettierd", "prettier", stop_after_first = true }, javascript = { 'biome' },
typescript = { 'biome' },
javascriptreact = { 'biome' },
typescriptreact = { 'biome' },
scss = { 'biome' },
pandoc = { 'biome' },
markdown = { 'biome' },
json = { 'biome' },
css = { 'biome' },
yml = { 'biome' },
html = { 'biome' },
php = { 'pretty-php' },
cpp = { 'clang_format' },
sh = { 'shfmt' },
go = { 'gofumpt' },
python = {
-- To fix auto-fixable lint errors
'ruff_fix',
-- To run the Ruff formatter
'ruff_format',
-- To organize the imports
'ruff_organize_imports',
},
}, },
} }

5
test.js Normal file
View File

@ -0,0 +1,5 @@
console.log("Hello World");
for (i = 0; i <= 10; i++) {
console.log(i);
}

4
test.ts Normal file
View File

@ -0,0 +1,4 @@
let a = "100"
a = 10;