aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2023-04-10 19:34:22 +0100
committerMatthew Lemon <y@yulqen.org>2023-04-10 19:34:22 +0100
commit52739493c4fe31347488c8b56228dce721fadf91 (patch)
tree2fd539ef067a73618e3520d652a19964d29e10f7
parent387b1f3a1df078ba3643cd65e827d3ee66dae6bd (diff)
Adapts LSP so it is less reliant on Mason
-rw-r--r--nvim/after/plugin/lsp.lua27
1 files changed, 27 insertions, 0 deletions
diff --git a/nvim/after/plugin/lsp.lua b/nvim/after/plugin/lsp.lua
index c54e03b..8005ccc 100644
--- a/nvim/after/plugin/lsp.lua
+++ b/nvim/after/plugin/lsp.lua
@@ -65,3 +65,30 @@ vim.diagnostic.config({
virtual_text = true
})
+-- rnix config
+
+local lspconfig = require'lspconfig'
+lspconfig.nil_ls.setup{
+ autostart = true,
+ capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities()),
+ cmd = vim.env.NIL_LSP_PATH,
+ settings = {
+ rootMarkers = {".git/"},
+ languages = {
+ nix = {
+ formatters = {
+ {
+ exe = "nixpkgs-fmt",
+ args = {}
+ }
+ },
+ linters = {
+ {
+ exe = "nil_lsp",
+ args = {}
+ }
+ }
+ }
+ }
+ }
+}