support nix language (#1347)

This commit is contained in:
Abouzar Parvan 2021-08-19 13:14:55 +04:30 committed by GitHub
parent a190306e47
commit a4073e9992
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 0 deletions

View file

@ -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()