File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed
modules/plugins/languages Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -388,3 +388,7 @@ The changes are, in no particular order:
388388[ DamitusThyYeeticus123] ( https://github.com/DamitusThyYeetus123 ) :
389389
390390- Add support for [ Astro] ( https://astro.build/ ) language server.
391+
392+ [ nezia1] ( https://github.com/nezia1 )
393+
394+ - Add support for [ nixd] ( https://github.com/nix-community/nixd ) language server.
Original file line number Diff line number Diff line change 5959 }
6060 '' ;
6161 } ;
62+
63+ nixd = {
64+ package = pkgs . nixd ;
65+ internalFormatter = true ;
66+ lspConfig = ''
67+ lspconfig.nixd.setup{
68+ capabilities = capabilities,
69+ ${
70+ if cfg . format . enable
71+ then useFormat
72+ else noFormat
73+ } ,
74+ cmd = ${ packageToCmd cfg . lsp . package "nixd" } ,
75+ ${ optionalString cfg . format . enable ''
76+ settings = {
77+ nixd = {
78+ ${ optionalString ( cfg . format . type == "alejandra" )
79+ ''
80+ formatting = {
81+ command = {"${ cfg . format . package } /bin/alejandra", "--quiet"},
82+ },
83+ '' }
84+ ${ optionalString ( cfg . format . type == "nixfmt" )
85+ ''
86+ formatting = {
87+ command = {"${ cfg . format . package } /bin/nixfmt"},
88+ },
89+ '' }
90+ },
91+ },
92+ '' }
93+ }
94+ '' ;
95+ } ;
6296 } ;
6397
6498 defaultFormat = "alejandra" ;
You can’t perform that action at this time.
0 commit comments