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

View file

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