From 3a8b04b59cd3df8357d3445aa524ccb5e38e47b9 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sun, 16 Jan 2022 03:33:42 +0000 Subject: [PATCH] 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. --- modules/lsp/siren-lsp.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/lsp/siren-lsp.el b/modules/lsp/siren-lsp.el index 5ae0a9d..74693d2 100644 --- a/modules/lsp/siren-lsp.el +++ b/modules/lsp/siren-lsp.el @@ -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"