Compare commits

...

4 Commits

3 changed files with 18 additions and 3 deletions

View File

@@ -1,3 +1,4 @@
_scratch _scratch
.direnv .direnv
.envrc .envrc
.agents

View File

@@ -138,10 +138,23 @@ setup_lsp("ts_ls", {
filetypes = { "typescript", "typescriptreact", "javascript" }, filetypes = { "typescript", "typescriptreact", "javascript" },
}) })
-- ESLint LSP -- Oxlint - Prefer a project-local oxlint from node_modules so the LSP
setup_lsp("eslint", { -- version matches the project's pinned dependency; fall back to PATH.
setup_lsp("oxlint", {
on_attach = on_attach_no_formatting, on_attach = on_attach_no_formatting,
cmd = { nix_vars.vscls .. "/bin/vscode-eslint-language-server", "--stdio" }, root_markers = { ".oxlintrc.json", "oxlint.config.json", "package.json", ".git" },
cmd = function(dispatchers, config)
local bin = "oxlint"
if config.root_dir then
local local_bin = config.root_dir .. "/node_modules/.bin/oxlint"
if vim.fn.executable(local_bin) == 1 then
bin = local_bin
end
end
return vim.lsp.rpc.start({ bin, "--lsp" }, dispatchers, {
cwd = config.root_dir,
})
end,
}) })
-- C LSP Configuration -- C LSP Configuration
@@ -208,6 +221,7 @@ setup_lsp("gopls", {
}) })
end, end,
filetypes = { "go" }, filetypes = { "go" },
cmd = { "gopls", "-remote=auto" },
settings = { settings = {
gopls = { gopls = {
buildFlags = { "-tags=e2e" }, buildFlags = { "-tags=e2e" },