aboutsummaryrefslogtreecommitdiffstats
path: root/nvim
diff options
context:
space:
mode:
Diffstat (limited to 'nvim')
-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 5ab64d1..e6e2bda 100644
--- a/nvim/after/plugin/lsp.lua
+++ b/nvim/after/plugin/lsp.lua
@@ -70,3 +70,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 = {}
+ }
+ }
+ }
+ }
+ }
+}