lsp sp-enable-file-watchers 如何使用

各位emacs道友大家好。最近在做一个大项目,里面有好几千个文件,一般的idea根本没法用。我用的当然是 emacs。可以由于安装的 node包很多,然后就是本身项目内容也很多。我使用了 lsp-mode 做vue的代码提示。发现根本没法用,后来在 github上看到以下内容: 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. In case your project contains a lot of files you might want to disable file monitoring via lsp-enable-file-watchers (you may use dir-locals). 以上文字说用 sp-enable-file-watchers 可以指定监控哪些文件,不过这个写的实在是太简单了,我不知道这个到底如何使用。还请各位多多指教啊!

我理解这段话的意思lsp-enable-file-watchers不是设置你可以监控哪些文件,而是设置你是否要监控工作台文件夹里的所有文件。

是这个意思啊?我现在想把 node_modules 中文件去掉,不让他监控。如何配置啊?

现在的这个变量是个Boolean,所以不能实现监控部分文件的功能。

你可以去提issue,你还可以自己写代码,但你得同时会elisp和nodejs及typescript。

后面两个会,elisp 现在还在学习中。提issue可以试试。

有个变量可以设置lsp的ignore list lsp-file-watch-ignored

我怎么没设置成功啊,给个例子好不好啊?