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: make root directory detection dynamic #213

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

jolars
Copy link

@jolars jolars commented Sep 20, 2023

Fixes #212

Instead of calling vim.loop.cwd() when the plugin is initialized, this pull request calls whatever function is stored in the config as get_root every time the LSP attaches to a buffer. I've set this to require("lspconfig.util").find_git_ancestor by default, which seems like a reasonable default.

I guess we might need to update the installation instructions, since we now depend on lspconfig, or perhaps it would be better just to set a different default (vim.loop.cwd(), but called every time the server is updated, maybe).

@jolars jolars changed the title fix: make root directory detection dynamic (WIP) fix: make root directory detection dynamic Oct 31, 2023
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.

LSP functionality detects incorrect root directory
1 participant