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
I'm noticing that if I introduce an error to the code, the error will quickly flash in red (indicating an error), but right after it will go back to normal, as if the error was removed. Upon investigating, it seems that the LSP server is sending two publishDiagnostics notifications, one followed by the other.
The first one contains the message about the error introduced in the diagnostics, the second one will contain the diagnostics as an empty list.
Here is the log:
[client-notification] Sat Jun 29 17:35:14 2024:
(:jsonrpc "2.0" :method "workspace/didChangeWatchedFiles" :params
(:changes
[(:uri "file:///home/fschuindt/apps/mine/testing_elixir_lsp/testing_lsp/lib/.%23testing_lsp.ex" :type 3)]))
[stderr] warning: variable "this_is_not_valid" does not exist and is being expanded to "this_is_not_valid()", please use parentheses to remove the ambiguity or change the variable name
[stderr] lib/testing_lsp.ex:18: TestingLSP.hello/0
[stderr]
[server-notification] Sat Jun 29 17:35:14 2024:
(:jsonrpc "2.0" :method "$/progress" :params
(:token 386 :value
(:kind "end")))
[server-notification] Sat Jun 29 17:35:14 2024:
(:jsonrpc "2.0" :method "textDocument/publishDiagnostics" :params
(:diagnostics
[(:message "** (CompileError) lib/testing_lsp.ex:18: undefined function this_is_not_valid/0 (expected TestingLSP to define such a function or for it to be imported, but none are available)\n\n" :range
(:end
(:character 0 :line 18)
:start
(:character 4 :line 17))
:severity 1 :source "Elixir")]
:uri "file:///home/fschuindt/apps/mine/testing_elixir_lsp/testing_lsp/lib/testing_lsp.ex" :version nil))
[server-notification] Sat Jun 29 17:35:15 2024:
(:jsonrpc "2.0" :method "textDocument/publishDiagnostics" :params
(:diagnostics
[]
:uri "file:///home/fschuindt/apps/mine/testing_elixir_lsp/testing_lsp/lib/testing_lsp.ex" :version nil))
Highlight for that part:
[server-notification] Sat Jun 29 17:35:15 2024:
(:jsonrpc "2.0" :method "textDocument/publishDiagnostics" :params
(:diagnostics
[]
:uri "file:///home/fschuindt/apps/mine/testing_elixir_lsp/testing_lsp/lib/testing_lsp.ex" :version nil))
☝️ This will instruct Flymake to remove the error highlight from my editor buffer.
TBH I'm not sure if this is considered a bug on Lexical's side. Probably there's an Eglot/Flymake configuration somewhere, but I'm wondering what you folks think about it. Any tips?
I'm noticing that if I introduce an error to the code, the error will quickly flash in red (indicating an error), but right after it will go back to normal, as if the error was removed. Upon investigating, it seems that the LSP server is sending two
publishDiagnostics
notifications, one followed by the other.The first one contains the message about the error introduced in the
diagnostics
, the second one will contain thediagnostics
as an empty list.Here is the log:
Highlight for that part:
☝️ This will instruct Flymake to remove the error highlight from my editor buffer.
TBH I'm not sure if this is considered a bug on Lexical's side. Probably there's an Eglot/Flymake configuration somewhere, but I'm wondering what you folks think about it. Any tips?
The relevant part of my
init.el
:Thank you!
The text was updated successfully, but these errors were encountered: