refactor: major config changes
This commit is contained in:
parent
b2c8430125
commit
ff32ecb811
14 changed files with 148 additions and 179 deletions
34
modules/nvim/config/lsp/biome.lua
Normal file
34
modules/nvim/config/lsp/biome.lua
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
---@type vim.lsp.Config
|
||||
return {
|
||||
cmd = function(dispatchers, config)
|
||||
local cmd = 'biome'
|
||||
local local_cmd = (config or {}).root_dir and config.root_dir .. '/node_modules/.bin/biome'
|
||||
if local_cmd and vim.fn.executable(local_cmd) == 1 then
|
||||
cmd = local_cmd
|
||||
end
|
||||
return vim.lsp.rpc.start({ cmd, 'lsp-proxy' }, dispatchers)
|
||||
end,
|
||||
filetypes = {
|
||||
'astro',
|
||||
'css',
|
||||
'graphql',
|
||||
'html',
|
||||
'javascript',
|
||||
'javascriptreact',
|
||||
'json',
|
||||
'jsonc',
|
||||
'svelte',
|
||||
'typescript',
|
||||
'typescriptreact',
|
||||
'vue',
|
||||
},
|
||||
workspace_required = true,
|
||||
root_markers = {
|
||||
'package-lock.json',
|
||||
'yarn.lock',
|
||||
'pnpm-lock.yaml',
|
||||
'bun.lockb',
|
||||
'bun.lock',
|
||||
'deno.lock',
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue