plugins/lsp/nixd: add "diagnostic" options

Used to suppress unwanted hints/warnings.
This commit is contained in:
Matt Sturgeon 2024-06-11 03:13:55 +01:00
parent 893b28779d
commit 3be9db71c2
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299

View file

@ -4,6 +4,21 @@
# - https://github.com/nix-community/nixd/blob/main/nixd/include/nixd/Controller/Configuration.h
with lib;
{
diagnostic = {
suppress = helpers.defaultNullOpts.mkListOf' {
type = types.str;
description = ''
Disable specific LSP warnings, etc.
A list of diagnostic _short names_ that should be suppressed.
See [the source](https://github.com/nix-community/nixd/blob/main/libnixf/include/nixf/Basic/DiagnosticKinds.inc)
for available diagnostics.
'';
default = [ ];
example = [ "sema-escaping-with" ];
};
};
formatting = {
command = helpers.defaultNullOpts.mkListOf types.str [ "nixpkgs-fmt" ] ''
Which command you would like to do formatting.