-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add LSP communication layer #320
Conversation
@@ -103,9 +120,14 @@ let sendSymbols (serializer: Serializer) fn (symbols: FSharpSymbolUse[]) = | |||
|
|||
let getSymbols symbolName = | |||
makePostRequest ("http://localhost:" + (string port) + "/getSymbols") symbolName | |||
|> Async.map (fun n -> | |||
try | |||
Some <| JsonConvert.DeserializeObject<SymbolUseRange[]> n |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe
Some (JsonConvert.DeserializeObject<SymbolUseRange[]> n)
is easier to ready, too many pipes with the generic
ed8956e
to
5a5aac9
Compare
Wow, green. At least I haven't broken anything ;-) |
0d733df
to
cdb628f
Compare
dee80bf
to
a5db850
Compare
Rebased on the latest master |
a5db850
to
b9d3a3b
Compare
I think this is more or less ready - all endpoints I've wanted to implement are done. From Ionide point of view there are still some... interesting... things about VSCode ordering calls differently than what we've done in Ionide, I feel that lack of control will still cause us problems, but we'll work that out when the Ionide integration will be done. I still plan to write some tests for it before merging. |
This is ready to merge (if CI is green) - if someone wanted to do some kind of code review, I'd welcome it, otherwise, I'll just merge it tomorrow morning and start working on Ionide integration. That should result in a huge set of fixes anyway ;-) BTW - the new way of writing tests using LSP implementation is really nice and enables us to debug FSAC easily, we should get way more of those. |
Greeeeeeeeen |
This PR is adding communication layer implementing Language Server Protocol.
Implementation status
LSP messages
initialize
- OKinitialized
- OKtextDocument/hover
- OKtextDocument/didOpen
- OKtextDocument/didChange
- OKtextDocument/completion
- OKcompletionItem/resolve
- OKtextDocument/rename
- OKtextDocument/definition
- OKtextDocument/typeDefinition
- OKtextDocument/implementation
- OKtextDocument/codeAction
- OKtextDocument/codeLens
- OKcodeLens/resolve
- OKtextDocument/references
- OKtextDocument/documentHighlight
- OKtextDocument/documentLink
- In the futuredocumentLink/resolve
- NopetextDocument/signatureHelp
- OKtextDocument/documentColor
- NopetextDocument/colorPresentation
- NopetextDocument/formatting
- ?textDocument/rangeFormatting
- ?textDocument/onTypeFormatting
- ?textDocument/willSave
- NopetextDocument/willSaveWaitUntil
- NopetextDocument/didSave
- OKtextDocument/didClose
- NopetextDocument/documentSymbol
- OKworkspace/didChangeWatchedFiles
- OKworkspace/didChangeWorkspaceFolders
- Nopeworkspace/didChangeConfiguration
- OKworkspace/symbol
- OKworkspace/executeCommand
- In the future (fsharp.generateDoc
)window/showMessage
- OKwindow/logMessage
- OKtextDocument/publishDiagnostics
- OKCustom messages
fsharp/signature
- OKfsharp/signatureData
- OKfsharp/lineLens
- OKlineLens/resolve
- OKfsharp/workspaceLoad
- OKfsharp/compilerLocation
- OKfsharp/project
- OKfsharp/compile
- OKfsharp/notifyWorkspace
- OKfsharp/notifyWorkspacePeek
- OKNotes:
Core
project.PlainNotification
type and string format serialized with exactly same serialization format as old JSON protocolworkspace/didChangeWatchedFiles
should be used only for removing diagnostics from the files that were deleted.