fix(lsp-mode): add "tmp" to ignored directory names

Rails projects uses a "tmp" directory for asset compilation, which can
lead to thousands of olders, which lsp-mode will try to monitor, and
warns that you're about to monitor +1000 directories.

Hence, ignore "tmp" directories, as there shouldn't be any code in there
that needs a language server.
This commit is contained in:
2022-01-16 03:33:42 +00:00
parent 56a577ae91
commit 3a8b04b59c

View File

@@ -63,6 +63,9 @@
(lsp-format-buffer)))
:config
;; Add "tmp" directories to ignored list of directories.
(add-to-list 'lsp-file-watch-ignored-directories "[/\\\\]tmp")
(define-minor-mode lsp-format-buffer-on-save-mode
"Run lsp-format-buffer as a before-save-hook."
:lighter " fmt"