summaryrefslogtreecommitdiff
path: root/lsp/nixd.lua
blob: 534f325e71080e77ffcfdc53915aac83a3c746b3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
return {
	cmd = { "nixd" },
	filetypes = { "nix" },

	settings = {
		nixd = {
			nixpkgs = {
				expr = [[import (builtins.getFlake "]] .. nixCats.extra("nixdExtras.nixpkgs") .. [[") { }   ]],
			},

			formatting = {
				command = { "nixfmt" },
			},

			options = {
				nixos = { expr = nixCats.extra("nixdExtras.nixos_options") },
				["home-manager"] = { expr = nixCats.extra("nixdExtras.home_manager_options") },
			},
		},
	},
}