Add .nvim.lua
This commit is contained in:
parent
d0f660a61c
commit
2a2cb76be5
1 changed files with 31 additions and 0 deletions
31
.nvim.lua
Normal file
31
.nvim.lua
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
require("conform").setup {
|
||||||
|
formatters_by_ft = {
|
||||||
|
nix = { "nixfmt" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
require("lint").linters_by_ft = {
|
||||||
|
nix = { "nix" },
|
||||||
|
}
|
||||||
|
|
||||||
|
local lspconfig = require "lspconfig"
|
||||||
|
|
||||||
|
local capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||||
|
|
||||||
|
lspconfig.nixd.setup {
|
||||||
|
capabilities = capabilities,
|
||||||
|
|
||||||
|
cmd = { "nixd" },
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
nixd = {
|
||||||
|
nixpkgs = {
|
||||||
|
expr = "import <nixpkgs> { }",
|
||||||
|
},
|
||||||
|
|
||||||
|
formatting = {
|
||||||
|
command = "nix fmt",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue