aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Gideon Dann <pdgiddie@gmail.com>2023-11-22 05:40:41 +0000
committerGitHub <noreply@github.com>2023-11-22 13:40:41 +0800
commit3ede70ccb292b20020f194b42d9508946fc5da51 (patch)
treeeb44057307a2039556bcbb4d54c3349f1199f173
parentdocs: update server_configurations.md (diff)
downloadnvim-lspconfig-3ede70ccb292b20020f194b42d9508946fc5da51.tar
nvim-lspconfig-3ede70ccb292b20020f194b42d9508946fc5da51.tar.gz
nvim-lspconfig-3ede70ccb292b20020f194b42d9508946fc5da51.tar.bz2
nvim-lspconfig-3ede70ccb292b20020f194b42d9508946fc5da51.tar.lz
nvim-lspconfig-3ede70ccb292b20020f194b42d9508946fc5da51.tar.xz
nvim-lspconfig-3ede70ccb292b20020f194b42d9508946fc5da51.tar.zst
nvim-lspconfig-3ede70ccb292b20020f194b42d9508946fc5da51.zip
fix(elixirls): root_dir priority: mix.exs > .git (#2910)
If we're in a subdirectory of a git repo, and that subdirectory contains a mix.exs file, it makes sense to assume the subdirectory is the project root, rather than the git repo root.
-rw-r--r--lua/lspconfig/server_configurations/elixirls.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/lspconfig/server_configurations/elixirls.lua b/lua/lspconfig/server_configurations/elixirls.lua
index 1ae3d8c8..62b8e168 100644
--- a/lua/lspconfig/server_configurations/elixirls.lua
+++ b/lua/lspconfig/server_configurations/elixirls.lua
@@ -4,7 +4,7 @@ return {
default_config = {
filetypes = { 'elixir', 'eelixir', 'heex', 'surface' },
root_dir = function(fname)
- return util.find_git_ancestor(fname) or util.root_pattern 'mix.exs'(fname) or vim.loop.os_homedir()
+ return util.root_pattern 'mix.exs'(fname) or util.find_git_ancestor(fname) or vim.loop.os_homedir()
end,
},
docs = {