Skip to content

Commit

Permalink
feat: optional postgres_lsp for developing that project
Browse files Browse the repository at this point in the history
  • Loading branch information
willruggiano committed Jan 30, 2024
1 parent e03678f commit 7b9b629
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
22 changes: 12 additions & 10 deletions plugins/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,18 @@ return function()
},
}

if os.getenv "ENABLE_POSTGRES_LSP" then
lspconfig.postgres_lsp.setup {
cmd = { "./target/debug/postgres_lsp" },
on_init = on_init,
on_attach = on_attach,
capabilities = updated_capabilities,
root_dir = function()
return vim.fn.getcwd()
end,
}
end

if not pcall(require, "rust-tools") then
lspconfig.rust_analyzer.setup {
on_init = on_init,
Expand All @@ -365,16 +377,6 @@ return function()
}
end

-- Shits broke :(
lspconfig.sqlls.setup {
-- root_dir = function()
-- return vim.fn.getcwd()
-- end,
on_init = on_init,
on_attach = on_attach,
capabilities = updated_capabilities,
}

lspconfig.tsserver.setup {
on_init = on_init,
on_attach = on_attach,
Expand Down
1 change: 0 additions & 1 deletion plugins/spec.nix
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@ in rec {
};
paths = with pkgs; [
# (pkgs.callPackage ../pkgs/languagetool-rs {})
# (pkgs.callPackage ../pkgs/sql-language-server {})
actionlint
cppcheck
luajitPackages.luacheck
Expand Down

0 comments on commit 7b9b629

Please sign in to comment.