Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(clojure_lsp): adds current folder as fallback for root_dir #3546

Conversation

guilhermefelipecgs
Copy link
Contributor

This is necessary to allow navigation within the dependencies.

@guilhermefelipecgs guilhermefelipecgs changed the title Adds current folder as fallback for root_dir fix(clojure_lsp): Adds current folder as fallback for root_dir Jan 6, 2025
This is necessary to allow navigation within the dependencies.
@guilhermefelipecgs guilhermefelipecgs changed the title fix(clojure_lsp): Adds current folder as fallback for root_dir fix(clojure_lsp): adds current folder as fallback for root_dir Jan 6, 2025
@@ -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()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does single_file_support not work with this server?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It actually works, I'll switch to this option.

@justinmk
Copy link
Member

justinmk commented Jan 7, 2025

This has been discussed many times. Search existing PRs/issues.

* Do not use `vim.fn.cwd` or `vim.fs.dirname`.

@justinmk justinmk closed this Jan 7, 2025
@guilhermefelipecgs guilhermefelipecgs deleted the fix_clojure_root_dir branch January 7, 2025 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants