From b81653e405e9f4fc892fbd4039d6547aa36308b7 Mon Sep 17 00:00:00 2001 From: Ruixi-rebirth Date: Sat, 3 Jun 2023 00:12:53 -0600 Subject: feat: add nixd support (#2644) --- lua/lspconfig/server_configurations/nixd.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lua/lspconfig/server_configurations/nixd.lua (limited to 'lua') diff --git a/lua/lspconfig/server_configurations/nixd.lua b/lua/lspconfig/server_configurations/nixd.lua new file mode 100644 index 00000000..36c84815 --- /dev/null +++ b/lua/lspconfig/server_configurations/nixd.lua @@ -0,0 +1,23 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'nixd' }, + filetypes = { 'nix' }, + single_file_support = true, + root_dir = util.root_pattern('flake.nix', '.git'), + }, + docs = { + description = [[ +https://github.com/nix-community/nixd + +Nix language server, based on nix libraries. + +If you are using Nix with Flakes support, run `nix profile install github:nix-community/nixd` to install. +Check the repository README for more information. + ]], + default_config = { + root_dir = [[root_pattern("flake.nix", ".git")]], + }, + }, +} -- cgit v1.2.3-70-g09d2