Closed KaranAhlawat closed 2 years ago
I haven't used eglot
before, but lsp-mode
lets you set the root directory of your project. Does eglot
have a similar setting?
From looking at their repository, I don't think that they have a similar setting. Since their idea is as little user configuration needed as possible.
Update : Using project.el
instead of projectile
for projects seems to have fixed the issue. The language server is recognising the project root correctly.
I will let it run for a day or so, and if it continues to work as expected, will mark the issue as closed.
Marking this issue as closed, seems like it was a projectile
thing.
Environment
I have a directory named Elixir, in which each subdir is a mix project, made using mix new.
When I open a project, if the file I open is in the root of the project, living besides the mix.exs file, then the language support works as expected. But if I open a file from a subdirectory of the project, it says that it cannot find the project mix.exs file, and that I may set it manually using elixirLS.projectDir.
I looked at the eglot event logs and the language server only searches the current file's directory for a mix file for some reason.
Any help is appreciated, and I am ready to provide any logs or such that I may provide assistantance.