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
Using eclipselsp linter in a very small project we can see the following communication between ALE and the LSP:
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/ryujin/Projects/gradle-simple/src/main/java/Hello.java","diagnostics":[{"range":{"start":{"line":9,"character":18},"end":{"line":9,"character":33}},"severity":1,"code":"33554506","source":"Java","message":"Cannot make a static reference to the non-static field World.WORLD_STR"}]}}'
9.377725 : looking for messages on channels
9.377753 on 1: Invoking channel callback <SNR>95_VimOutputCallback
9.378889 RECV on 1: 'Content-Length: 123
{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2019/05/21 13:11:07 Validated 1. Took 286 ms"}}'
9.394634 on 1: Invoking channel callback <SNR>95_VimOutputCallback
9.396934 RECV on 1: 'Content-Length: 131
{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2019/05/21 13:11:07 \u003e\u003e build jobs finished"}}'
9.408564 : looking for messages on channels
9.409045 on 1: Invoking channel callback <SNR>95_VimOutputCallback
9.410353 RECV on 1: 'Content-Length: 419
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/ryujin/Projects/gradle-simple","diagnostics":[{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":0}},"severity":2,"code":"0","source":"Java","message":"Build path specifies execution environment JavaSE-1.8. There are no JREs installed in the workspace that are strictly compatible with this environment. "}]}}'
9.410358 : looking for messages on channels
9.410382 on 1: Invoking channel callback <SNR>95_VimOutputCallback
9.413103 RECV on 1: 'Content-Length: 343
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/ryujin/Projects/gradle-simple/src/main/java/World.java","diagnostics":[{"range":{"start":{"line":2,"character":7},"end":{"line":2,"character":24}},"severity":2,"code":"268435844","source":"Java","message":"The import java.util.HashSet is never used"}]}}Content-Length: 171
The fourth entry in the list of problems shows a project-wide error regarding missing JRE installation. The uri does not match the current buffer file Hello.java, instead it is the project root path "uri":"file:///home/username/Projects/gradle-simple".
This error appears in the current buffer in line 0, column 0 which makes no sense. Even worse, all other errors that do belong to the file in the current buffer are not shown.
By contrast, in VSCode, the project-wide error regarding JRE is shown in the log window of the editor while the other errors are shown correctly in the editor buffer.
These project-wide errors should better be shown in the ALEInfo output instead of the buffer. Maybe checking if the "uri" parameter matches the current buffer or the project root is a way to determine if the error should be shown in the ALEInfo output or the buffer.
In addition the ecipselsp provides a lot of log information as below:
{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2019/05/21 13:11:07 1 problems reported for /Hello.java"}}'
9.369829 : looking for messages on channels
9.369839 on 1: Invoking channel callback <SNR>95_VimOutputCallback
9.377717 RECV on 1: 'Content-Length: 371
{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2019/05/21 13:11:07 Validated 1. Took 286 ms"}}'
9.394634 on 1: Invoking channel callback <SNR>95_VimOutputCallback
9.396934 RECV on 1: 'Content-Length: 131
{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2019/05/21 13:11:07 \u003e\u003e build jobs finished"}}'
9.408564 : looking for messages on channels
9.409045 on 1: Invoking channel callback <SNR>95_VimOutputCallback
9.410353 RECV on 1: 'Content-Length: 419
Maybe showing these messages in the output of ALEInfo can be beneficial. These messages allowed me to find the problem and fix #2520 .
The text was updated successfully, but these errors were encountered:
I plan to eventually add logging of all messages. See #2137.
I'm not sure why diagnostics wouldn't appear or would appear in the wrong place. That shouldn't happen. Have a look at s:HandleLSPDiagnostics in autoload/ale/lsp_linter.vim and see if you can find out what's going wrong there.
Using eclipselsp linter in a very small project we can see the following communication between ALE and the LSP:
The fourth entry in the list of problems shows a project-wide error regarding missing JRE installation. The
uri
does not match the current buffer fileHello.java
, instead it is the project root path"uri":"file:///home/username/Projects/gradle-simple"
.This error appears in the current buffer in line 0, column 0 which makes no sense. Even worse, all other errors that do belong to the file in the current buffer are not shown.
By contrast, in VSCode, the project-wide error regarding JRE is shown in the log window of the editor while the other errors are shown correctly in the editor buffer.
These project-wide errors should better be shown in the ALEInfo output instead of the buffer. Maybe checking if the "uri" parameter matches the current buffer or the project root is a way to determine if the error should be shown in the ALEInfo output or the buffer.
In addition the ecipselsp provides a lot of log information as below:
Maybe showing these messages in the output of ALEInfo can be beneficial. These messages allowed me to find the problem and fix #2520 .
The text was updated successfully, but these errors were encountered: