lsp
lsp copied to clipboard
Tracking lsp spec compliance (from version 3.3)
EDITED by @jneira: we are gonna put here the main checklist of features to give it more visibility
3.3
- [x] CompletionContext
- [x] MarkupContent (done for
Hover
, still needed for some others) tracked by #329
3.11
- [X] Add support for CodeActionOptions to allow a server to provide a list of code action it supports.
3.12
- [X] Add support for textDocument/prepareRename request.
3.13
- [x] File and folder operations (create, rename, move) to workspace edits.
3.14
- [x] Signature label offsets.
- [x] Location links.
- [x] textDocument/declaration request.
3.15
- [x] generic progress reporting.
- [x] specific work done progress reporting support to requests where applicable.
- [x] specific partial result progress support to requests where applicable.
- [x] textDocument/selectionRange.
- [x] server and client information.
- [x] signature help context.
- [x] add version on PublishDiagnosticsParams
- [x] CodeAction#isPreferred.
- [x] CompletionItem#tag.
- [x] Diagnostic#tag.
- [x] Add DocumentLink#tooltip support.
- [x] Add trimTrailingWhitespace, insertFinalNewline and trimFinalNewlines to FormattingOptions.
- [x] Add support for context in SignatureHelpRequest (noted by @bubba in #190)
3.16
- [X] Call Hierarchy support, needed for https://github.com/haskell/haskell-language-server/issues/738
- [X] Semantic Token support. Tracked with #240, needed for https://github.com/haskell/haskell-language-server/issues/1654
- [x] insert and replace ranges on CompletionItem
- [ ] diagnostic code descriptions
- [x] tags on SymbolInformation and DocumentSymbol
- [ ] Monikers
- [ ] Linked editing
- [x] Change annotation support for text edits and file operations
- [ ] Locale
- [ ] Diagnostic data
- [ ] MessageActionItem additional properties
- [ ] create/rename/delete notifications
- [x] normalizesLineEndings
- [ ] Support for client default behavior on renames.
https://microsoft.github.io/language-server-protocol/specification#change-log
For tracking:
3.3
- [x] Added support for CompletionContext
- [x] Added support for MarkupContent (done for
Hover
, still needed for some others)
3.11
- [X] Add support for CodeActionOptions to allow a server to provide a list of code action it supports.
3.12
- [X] Add support for textDocument/prepareRename request.
3.13
- [ ] Add support for file and folder operations (create, rename, move) to workspace edits.
3.14
- [ ] Add support for signature label offsets.
- [ ] Add support for location links.
- [ ] Add support for textDocument/declaration request.
I would love support for this one in particular:
3.13
* [ ] Add support for file and folder operations (create, rename, move) to workspace edits.
@EggBaconAndSpam I believe we are yet to add workspace support first. I think we have the types defined, but yes this would be a great feature to have! It might be nice to have a separate issue for this since there’s probably a lot of discussion needed around how the VFS/api will work around it, assuming that we’re adding deeper integration than just handlers.
My use-case is the following: I would like to be able to create files via the "workspace/applyEdit" command; as far as I understand it workspaces as a concept are largely orthogonal to this feature. Currently the corresponding haskell-lsp-types definition only covers edits to existing files:
(From WorkspaceEdit.hs)
data WorkspaceEdit =
WorkspaceEdit
{ _changes :: Maybe WorkspaceEditMap
, _documentChanges :: Maybe (List TextDocumentEdit)
} deriving (Show, Read, Eq)
Which corresponds to documentChanges?: TextDocumentEdit[];
, while the new spec extends this to documentChanges?: (TextDocumentEdit[] | (TextDocumentEdit | CreateFile | RenameFile | DeleteFile)[]);
. I propose something along these lines:
data DocumentChange = DCEdit TextDocumentEdit
| DCCreate CreateFile
| DCRename RenameFile
| DCDelete DeleteFile
data WorkspaceEdit =
WorkspaceEdit
{ _changes :: Maybe WorkspaceEditMap
, _documentChanges :: Maybe (List DocumentChange)
} deriving (Show, Read, Eq)
I just made a pair of PRs for 3.11 and 3.12 support. They're not really adequately tested yet but hopefully this is a step in the right direction.
Updating @theobat tracking:
3.3
- [x] CompletionContext
- [x] MarkupContent (done for
Hover
, still needed for some others)
3.13
- [ ] File and folder operations (create, rename, move) to workspace edits.
3.14
- [ ] Signature label offsets.
- [ ] Location links.
- [x] textDocument/declaration request.
3.15
- [ ] generic progress reporting.
- [ ] specific work done progress reporting support to requests where applicable.
- [ ] specific partial result progress support to requests where applicable.
- [ ] textDocument/selectionRange.
- [ ] server and client information.
- [ ] signature help context.
- [ ] add version on PublishDiagnosticsParams
- [ ] CodeAction#isPreferred.
- [ ] CompletionItem#tag.
- [ ] Diagnostic#tag.
- [ ] Add DocumentLink#tooltip support.
- [ ] Add trimTrailingWhitespace, insertFinalNewline and trimFinalNewlines to FormattingOptions.
- [ ] Add support for context in SignatureHelpRequest (noted by @bubba in #190)
3.16
- [x] Call Hierarchy support, needed for https://github.com/mpickering/ghcide/issues/18
- [x] Semantic Token support. Tracked with #240
- [x] insert and replace ranges on CompletionItem
- [ ] diagnostic links
- [ ] tags on SymbolInformation and DocumentSymbol
Maybe some of 3.15 additions are already supported.
Support for changeAnnotations
and AnnotatedTextEdit
would be nice.
https://github.com/alanz/lsp/pull/290 should fix the last remaining place that needs MarkupContent
, and one other minor 3.16 addition to SignatureInformation
.
I was having a look and it looks like lots of things in the list are done, sadly I can't check the checkboxes.
@michaelpj i suspected most of them was done too, what about copy it in a new comment and check what do you know about? I did that in https://github.com/alanz/lsp/issues/134#issuecomment-588689600
I think it's almost all done! As far as I can see it's only some 3.16 things that are missing. Note that this is based on going through @jneira 's list not the full LSP changelog.
The remaining items are two substantial ones and one easy one:
- Call Hierarchy support, needed for mpickering/ghcide#18
- Semantic Token support. Tracked with #240
- tags on SymbolInformation and DocumentSymbol (this is easy, I'll just do this one)
Oh, other things we're missing from 3.16:
- Monikers
- Linked editing
- Change annotations
- Locale
- Diagnostic data
- MessageActionItem additional properties
- create/rename/delete notifications
- normalizesLineEndings
We have semantic tokens support and call hierarchy!
Since 3.16, there are new number types https://microsoft.github.io/language-server-protocol/specifications/specification-current/#number . We may want to provide newtype wrappers for them as using Int
may lead to subtle bugs like https://github.com/haskell/haskell-language-server/pull/2169
I'm going to try and update the checklist in the original description and remove the others!
I wonder if this list should be also placed in docs for reference, in the README?
I think if we were going to do that we'd want to actually list all the things we've implemented, which would be a bit tedious. I think it might be good to say which versions we have completely supported and which ones are partial, though.
Okay, main checklist should be up-to-date. I think we're actually doing pretty well: we're missing a few things from 3.16, but that's it.
We are also missing codeAction/resolve, which is new in 3.16. This is a blocker for implementing https://github.com/haskell/haskell-language-server/issues/3534
We're generating the code from the metamodel now, so we should have full compliance with 3.17.