Refactor Error Code definitions#1270
Conversation
This refactors the way error codes are handled, in preparation for making JSONRPC.jl less LSP specific, by hooking into custom error printing provided by an upstream PR.
|
There's also these error codes that seem to overlap considerably: LanguageServer.jl/src/requests/features.jl Lines 155 to 167 in e67befb This error code is seemingly used for a formatting failure, but the LSP spec says this specific code should not be used: This should probably be changed to some other error code, but I don't know how that would interact with the extension. Similarly, this section also defines a new error code for formatting: LanguageServer.jl/src/requests/features.jl Lines 207 to 217 in e67befb This doesn't conflict with the spec, but it doesn't match the existing formatting error code used above. This needs a decision on whether they should be merged into one error code, or kept distinct. |
|
Both of those should be |
Since this is basically the same errors, unify the two error codes into one. Technically the two are subtly different (one is trying to format the whole document, while the other is only trying to format a section), but the underlying cause is likely the same, so it's fine to merge them. If necessary/required, they can be disentangled later on too, as currently noone seems to check them anyway.
27cfadd to
6cce4a4
Compare
This refactors the way error codes are handled, in preparation for making JSONRPC.jl less LSP specific, by hooking into custom error printing provided by an upstream PR. Requires julia-vscode/JSONRPC.jl#70.