From ea32f35037c73303bce67a68cf5211fc9a68e5e5 Mon Sep 17 00:00:00 2001 From: oxalica Date: Mon, 22 Aug 2022 07:07:52 +0800 Subject: feat: add nil support (#2053) --- lua/lspconfig/server_configurations/nil_ls.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lua/lspconfig/server_configurations/nil_ls.lua (limited to 'lua') diff --git a/lua/lspconfig/server_configurations/nil_ls.lua b/lua/lspconfig/server_configurations/nil_ls.lua new file mode 100644 index 00000000..ff7ebba2 --- /dev/null +++ b/lua/lspconfig/server_configurations/nil_ls.lua @@ -0,0 +1,23 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'nil' }, + filetypes = { 'nix' }, + single_file_support = true, + root_dir = util.root_pattern('flake.nix', '.git'), + }, + docs = { + description = [[ +https://github.com/oxalica/nil + +A new language server for Nix Expression Language. + +If you are using Nix with Flakes support, run `nix profile install github:oxalica/nil` to install. +Check the repository README for more information. + ]], + default_config = { + root_dir = [[root_pattern("flake.nix", ".git")]], + }, + }, +} -- cgit v1.2.3-70-g09d2