Spacemacs: fixing lsp-mode whining about not finding your directory

If you don't use Emacs/Spacemacs/Doom Emacs in evil-mode, give it a try! It is a difficult learning experience but it will enhance your life as a developer x100 for the rest of your days.


If you know Emacs, you probably came accross lsp-mode. I faced an issue when I modified the name of a directory outside Emacs. The directory was registered as a project in projectile. Any time I was opening this project again, with the new filepath, lsp-mode tried to access the old directory and couldn't work.


I tried to clean the Emacs and projectile buffer without success. I looked for commands to remove the cache from the lsp-mode buffer, couldn't find any. A small grep has shown me where the cache was stored. It is in .emacs.d/.lsp-session-v1. Delete that file, restart Emacs and you should be fine.

Previous article:
Exporting animated logos correctly from Photoshop
Next article:
Migrating to Emacs 27 is necessary to edit .dart files with lsp-mode