You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`lsp-file-watch-ignored': use proper regexes (#2208)
* `lsp-file-watch-ignored': use proper regexes
Emacs regexes specify the end of string using \', not $ as was used in that
variable (the latter matching *either* the end of the line or the string, which
could cause issues with files that have newlines in them (Linux allows this)).
Fix that by using \' for the end of string character instead.
Also properly handle node_modules. It is not necessarily always at the root of
the project, as is the case with .pyi files needed by pyright, which are in a
node_modules folder somewhere in the user's home directory. This causes
annoyances after Emacs-restarts, with `lsp' prompting the user to watch 11+k
immutable files. Fix that by removing the `eos' matcher and matching a slash
after "node_modules".
* Don't watch node_modules at project root
After the previous commit, node_modules would only be watched in the
middle of a path, due to the slash at the end, which is possibly not
sent by language servers. Now, don't require a trailing slash when
ignoring node_modules. Files like node_modules<foobar> would still not
get watched though, but that shouldn't cause issues.
Also, in `lsp' auto-loading, remove the `featurep' check around
`require', since that is done by the former anyway.
* Revert the unless (featurep) check
It is unrelated to this PR, so remove it. Whether to change that should
be left to further discussion.
0 commit comments