Tuesday, March 8, 2022

Elixir: lsp-mode: No mixfile found in project. To use a subdirectory, set `elixirLS.projectDir` in your settings.

I'm using a mono-repo on GitHub, and this is the error message I get in Emacs/*lsp-log* buffer when adding a new sub-directory in the repo.
In order to fix that, you can update ~/.emacs.d/.lsp-session-v1 to manually add the sub-directory.
> vi ~/.emacs.d/.lsp-session-v1

#s(lsp-session ("/Users/jerome/src/repo" "/Users/jerome/src/boss/sub-directory...

And then bounce Emacs.
Source: https://github.com/elixir-lsp/elixir-ls/issues/364