Skip to content

Commit 0818971

Browse files
committed
lsp: add nixd settings
1 parent ffa5c05 commit 0818971

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

modules/lsp/lsp.nix

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,17 @@ in
326326
on_attach = function(client, bufnr)
327327
attach_keymaps(client, bufnr)
328328
end,
329+
settings = {
330+
['nixd'] = {
331+
formatting = {
332+
command = {"${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt"}
333+
},
334+
diagnostic = {
335+
-- See values: https://github.com/nix-community/nixd/blob/590eccaa079929daa58316f5386dbcc150e2d50d/libnixf/src/Basic/diagnostic.py#L17
336+
suppress = {"deprecated-url-literal"}
337+
}
338+
}
339+
};
329340
cmd = {"${pkgs.nixd}/bin/nixd"}
330341
}
331342
''}

0 commit comments

Comments
 (0)