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
Describe the bug
Every time I save a Java file, LSP's save hooks run, which usually results in the file being changed on disk. However, the buffer where I am visiting the file does not get refreshed. So when I go to make further changes, I get a message <filename> changed on disk; really edit the buffer? (y, n, r or C-h). Effectively, that means every time I save, I have to wait a moment and then hit 'r' before doing further edits, which is very distracting.
To Reproduce
Open a java file.
Go to any line with code on it and add a few spaces at the beginning of the line.
Save the file
Begin typing
Expected behavior
If a background process changes a file I've got open in a buffer, the changes should just show up immediately in the buffer, without prompting me to revert.
Logs
Content of Messages buffer with lsp-print-io set to t:
LSP :: Disconnected
LSP :: Connected to [jdtls:15943 /home/joh/git/mailific/mailific-spf].
Saving file /home/joh/git/mailific/mailific-spf/src/main/java/net/mailific/spf/Spf.java...
Wrote /home/joh/git/mailific/mailific-spf/src/main/java/net/mailific/spf/Spf.java
Spf.java changed on disk; really edit the buffer? (y, n, r or C-h) r
LSP :: Disconnected
LSP :: Connected to [jdtls:15943 /home/joh/git/mailific/mailific-spf].
ask-user-about-supersession-threat: File reverted: ~/git/mailific/mailific-spf/src/main/java/net/mailific/spf/Spf.java
The text was updated successfully, but these errors were encountered:
It seems do not caused by lsp-java. I can't find a hook named lsp-save-hook.
did other file have this error eithor when you save them? If so check your emacs self setting maybe help .
Describe the bug
Every time I save a Java file, LSP's save hooks run, which usually results in the file being changed on disk. However, the buffer where I am visiting the file does not get refreshed. So when I go to make further changes, I get a message
<filename> changed on disk; really edit the buffer? (y, n, r or C-h)
. Effectively, that means every time I save, I have to wait a moment and then hit 'r' before doing further edits, which is very distracting.To Reproduce
Expected behavior
If a background process changes a file I've got open in a buffer, the changes should just show up immediately in the buffer, without prompting me to revert.
Logs
Content of Messages buffer with
lsp-print-io
set to t:LSP :: Disconnected
LSP :: Connected to [jdtls:15943 /home/joh/git/mailific/mailific-spf].
Saving file /home/joh/git/mailific/mailific-spf/src/main/java/net/mailific/spf/Spf.java...
Wrote /home/joh/git/mailific/mailific-spf/src/main/java/net/mailific/spf/Spf.java
Spf.java changed on disk; really edit the buffer? (y, n, r or C-h) r
LSP :: Disconnected
LSP :: Connected to [jdtls:15943 /home/joh/git/mailific/mailific-spf].
ask-user-about-supersession-threat: File reverted: ~/git/mailific/mailific-spf/src/main/java/net/mailific/spf/Spf.java
The text was updated successfully, but these errors were encountered: