emacs-lsp/lsp-haskell

emacs freezes for minutes after opening file in directory with many files

jwaldmann opened this issue · 3 comments

Hi. When I start emacs some/dir/File.hs it says (after a few seconds) lsp initialized but then freezes for minutes (key presses/mouse actions have no effect). It then wakes up to ask me There are 95776 files in folder ... so probably it needed the time to count them.

Actually I can't explain that number. In that directory, I have 3866 "**/*.hs" files, and 355165 files total (determined by find . |wc -l)

If I do have them watched by Emacs, I don't notice slow-down but
it will break yesod devels watcher. (It says "disk full" but that's not true.)

Hi, this is about the generic Emacs LSP support, so please open this in lsp-mode as per the README: https://github.com/emacs-lsp/lsp-haskell#troubleshooting

most likely lsp-mode is picking a folder that is not needed. Note, that we watch all directories, no matter what the pattern is. lsp-file-watch-ignored-directories can be used to force lsp-mode to skip a particular directory.

.. or you have picked wrong project root. Use M-x lsp-describe-session + lsp-workspace-folders-add/remove