nix support

This commit is contained in:
LordMZTE 2024-02-26 16:19:03 +01:00
parent 1e8286b8fc
commit d07bb2e947
Signed by: LordMZTE
GPG Key ID: B64802DC33A64FF6
3 changed files with 7 additions and 1 deletions

View File

@ -0,0 +1,3 @@
;; Use 2-space indentation for nix
(set vim.o.shiftwidth 2)
(set vim.o.tabstop 2)

View File

@ -7,7 +7,8 @@
(when (not args)
(set args {}))
(tset args :on_attach (if args.on_attach
`(fn [client# bufnr#] (mztenv.lsp.onAttach client# bufnr#)
`(fn [client# bufnr#]
(mztenv.lsp.onAttach client# bufnr#)
(,args.on_attach client# bufnr#))
`mztenv.lsp.onAttach))
(tset args :capabilities `caps)
@ -53,6 +54,7 @@
true)]
:telemetry {:enable false}}}})
(setup :nil_ls {:settings {:nil {:formatting {:command [:nixpkgs-fmt]}}}})
(setup :ocamllsp)
(setup :prosemd_lsp)
(setup :racket_langserver)

View File

@ -134,6 +134,7 @@ pub fn populateEnvironment(env: *std.process.EnvMap) !bool {
var b = delimitedWriter(bufstream.writer(), ':');
for ([_][]const u8{
".nix-profile/bin",
".mix/escripts",
".cargo/bin",
".local/bin",