From b3fc67c63ebb209f3e6f72718b9360aef2c0c027 Mon Sep 17 00:00:00 2001 From: Seth Messer <3678+megalithic@users.noreply.github.com> Date: Fri, 17 May 2024 02:07:28 -0400 Subject: feat: adds next-ls server configuration (#3155) * feat: adds next-ls server configuration * docs: update server_configurations.md skip-checks: true * fix: assumes nextls is installed and on $PATH * docs: update server_configurations.md skip-checks: true * fix: updates root_dir method * docs: update server_configurations.md skip-checks: true --------- Co-authored-by: github-actions[bot] --- lua/lspconfig/server_configurations/nextls.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lua/lspconfig/server_configurations/nextls.lua (limited to 'lua') diff --git a/lua/lspconfig/server_configurations/nextls.lua b/lua/lspconfig/server_configurations/nextls.lua new file mode 100644 index 00000000..acecaf76 --- /dev/null +++ b/lua/lspconfig/server_configurations/nextls.lua @@ -0,0 +1,18 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + filetypes = { 'elixir', 'eelixir', 'heex', 'surface' }, + root_dir = function(fname) + return util.root_pattern 'mix.exs'(fname) or util.find_git_ancestor(fname) + end, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/elixir-tools/next-ls + +**By default, next-ls does not set its `cmd`. Please see the following [detailed instructions](https://www.elixir-tools.dev/docs/next-ls/installation/) for possible installation methods.** +]], + }, +} -- cgit v1.2.3-70-g09d2