mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-09-01 08:15:20 +02:00
support nix language (#1347)
This commit is contained in:
parent
a190306e47
commit
a4073e9992
3 changed files with 27 additions and 0 deletions
1
ftdetect/nix.lua
Normal file
1
ftdetect/nix.lua
Normal file
|
@ -0,0 +1 @@
|
||||||
|
vim.cmd [[ au BufRead,BufNewFile *.nix set filetype=nix ]]
|
1
ftplugin/nix.lua
Normal file
1
ftplugin/nix.lua
Normal file
|
@ -0,0 +1 @@
|
||||||
|
require("lsp").setup "nix"
|
|
@ -1301,6 +1301,31 @@ lvim.lang = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
nix = {
|
||||||
|
formatters = {
|
||||||
|
-- {
|
||||||
|
-- exe = "nixfmt",
|
||||||
|
-- args = {},
|
||||||
|
-- },
|
||||||
|
},
|
||||||
|
linters = {},
|
||||||
|
lsp = {
|
||||||
|
provider = "rnix",
|
||||||
|
setup = {
|
||||||
|
cmd = { "rnix-lsp" },
|
||||||
|
filetypes = { "nix" },
|
||||||
|
init_options = {},
|
||||||
|
settings = {},
|
||||||
|
root_dir = function(fname)
|
||||||
|
local util = require "lspconfig/util"
|
||||||
|
return util.root_pattern ".git"(fname) or vim.fn.getcwd()
|
||||||
|
end,
|
||||||
|
on_attach = common_on_attach,
|
||||||
|
on_init = common_on_init,
|
||||||
|
capabilities = common_capabilities,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
require("keymappings").config()
|
require("keymappings").config()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue