Skip to content

Commit

Permalink
doc: File watchers - grammar and linking
Browse files Browse the repository at this point in the history
* fixed some grammar
* link to PRs and issues
  • Loading branch information
cgay committed Mar 10, 2024
1 parent e70aec8 commit 43d31eb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/page/file-watchers.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ root_file: docs/page/file-watchers.md
---
# File watchers

When some of the workspaces that are active in the current project requests file notifications via `workspace/didChangeWatchedFiles`, `lsp-mode` will start monitoring each of the folders in the workspace for changes to notify the server about that.
When a workspace that is active in the current project requests file notifications via `workspace/didChangeWatchedFiles`, `lsp-mode` will monitor the workspace folders for changes and notify the server about them.

In case you have issues with file watchers, first, check what folders are being watched, they are logged on `*lsp-log*` when the server starts, then you may consider check the below:
If you have problems with file watchers, first check what folders are being watched (they are logged in the `*lsp-log*` buffer when the server starts) and then check the below:

- If your project has some specific folder that should not be watched, you can exclude it with:
- If your project has a specific folder that should not be watched, you can exclude it with:

```emacs-lisp
(with-eval-after-load 'lsp-mode
Expand All @@ -16,6 +16,6 @@ In case you have issues with file watchers, first, check what folders are being
(add-to-list 'lsp-file-watch-ignored-files "[/\\\\]\\.my-files\\'"))
```

- Increase the file watch warning threshold, the default is `1000`, `(setq lsp-file-watch-threshold 2000)`
- If the folder is some kind of cache folder or something that should always be excluded for everyone, consider opening a pull request or informing the maintainers to add to the [common regex](https://github.com/emacs-lsp/lsp-mode/blob/master/lsp-mode.el#L306).
- In last case, disable file watchers with `(setq lsp-enable-file-watchers nil)` (you may use dir-locals).
- Increase the file watch warning threshold, the default is `1000`: `(setq lsp-file-watch-threshold 2000)`
- If the folder is some kind of cache folder or something that should always be excluded for everyone, consider [opening a pull request](https://github.com/emacs-lsp/lsp-mode/pulls) or [filing a bug](https://github.com/emacs-lsp/lsp-mode/issues) to add to the [common regex](https://github.com/emacs-lsp/lsp-mode/blob/1b13d7c1b39aaad12073095ef7719952568c45db/lsp-mode.el#L340).
- As a last resort, disable file watchers with `(setq lsp-enable-file-watchers nil)` (you may use dir-locals).

0 comments on commit 43d31eb

Please sign in to comment.