I just switched to using lsp for my C++ and Python IDE needs. However, I am running into a constant issue where Python and C++ files have the wrong root, as reported by (lsp-workspace-root).

The root is considered to be the git root (I assume from projectile) which is not the case in my project. When I first opened the file I did not get a prompt asking me for the project root and I made sure to delete the lsp session file (as set in lsp-session-file).

Any help is much appreciated.

1 Answer 1


Bad form just to link but possibly this helps:


It covers how to add workspace folders and also how to reset your lsp settings to get a prompt.

  • 4
    Good enough. The command lsp-workspace-folders-add is what I was looking for. Thanks!
    – Tohiko
    Aug 10, 2020 at 20:29
  • revisiting, it should recognise emacs project root configured by project-find-functions but doesnt.
    – RichieHH
    Jun 11, 2021 at 8:35
  • Would it be possible to list added folders into lsp-workspace?
    – alper
    Mar 21 at 17:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.