didChangeWatchedFiles does not work recursively, LSP server goes out of sync for new directories #1414
Replies: 4 comments 5 replies
-
Showing fs events to the user is not Eglot's core business. It's an implementation detail that some servers need to do certain things. Can you explain what the problem to the user really is, from a non-Elisp perspective? Also, where is the event log for the short experiment? |
Beta Was this translation helpful? Give feedback.
-
The problem to the user is that LSP functionality like Specifically, after adding the When Here is the EGLOT buffer log for the steps to reproduce provided above:
I hope this makes more sense now, let me know if you need additional details. |
Beta Was this translation helpful? Give feedback.
-
Hmmm, no. I'm more confused now :-) What has organize imports have to do with creating directories? Is creating these directories and files within these directories a part of what the server does when being asked to organize imports? if so, why does it need to be notified about the files it itself is creating? |
Beta Was this translation helpful? Give feedback.
-
Can you give me a recipe that doesn't require me to add Elisp advice to things and where I as a Go newbie that just has Emacs with Eglot would see the unexpected erroring behavior? Start from some kind of hello world example and describe the steps I should take, like type this here, click there, etc, please. |
Beta Was this translation helpful? Give feedback.
-
Steps to reproduce:
emacs -q ~/repro-emacs/hello1
(a directory)hello1.go
M-x eglot
gopls
RET
touch extra.go
and I see adidChangeWatchedFiles
event in the*EGLOT …*
buffer — good!mkdir newinternal
, thentouch newinternal/extra.go
and I see no event — this is unexpected.*Messages*
buffer, I see:newinternal
directory from my terminal, I see nofile-notify-add-watch
. I conclude that Eglot does not re-evaluate recursive glob patterns when new directories are created.Beta Was this translation helpful? Give feedback.
All reactions