emacs-lsp / lsp-haskell

lsp-mode :heart: haskell
https://emacs-lsp.github.io/lsp-haskell
GNU General Public License v3.0
236 stars 62 forks source link

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

Closed jwaldmann closed 3 years ago

jwaldmann commented 3 years ago

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.)

michaelpj commented 3 years ago

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

yyoncho commented 3 years ago

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.

yyoncho commented 3 years ago

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