Skip to content

Commit

Permalink
Adds current folder as fallback for root_dir
Browse files Browse the repository at this point in the history
This is necessary to allow navigation within the dependencies.
  • Loading branch information
guilhermefelipecgs committed Jan 6, 2025
1 parent 8121483 commit c098eb7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lua/lspconfig/configs/clojure_lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ return {
default_config = {
cmd = { 'clojure-lsp' },
filetypes = { 'clojure', 'edn' },
root_dir = util.root_pattern('project.clj', 'deps.edn', 'build.boot', 'shadow-cljs.edn', '.git', 'bb.edn'),
root_dir = function(pattern)
local fallback = vim.loop.cwd()
local patterns = { 'project.clj', 'deps.edn', 'build.boot', 'shadow-cljs.edn', '.git', 'bb.edn' }
local root = util.root_pattern(patterns)(pattern)

return root or fallback
end,
},
docs = {
description = [[
Expand Down

0 comments on commit c098eb7

Please sign in to comment.