Replies: 6 comments
-
Are you following the spec and waiting for the initialize request response before sending the didOpen request? Please check the spec - https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#initialize |
Beta Was this translation helpful? Give feedback.
-
the response as follow: // Initialize Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"capabilities": {
"textDocumentSync": 2,
"completionProvider": {
"triggerCharacters": [
".",
"\"",
"'",
"/",
"@",
"<"
],
"resolveProvider": true
},
"codeActionProvider": true,
"codeLensProvider": {
"resolveProvider": true
},
"definitionProvider": true,
"documentFormattingProvider": true,
"documentRangeFormattingProvider": true,
"documentHighlightProvider": true,
"documentSymbolProvider": true,
"executeCommandProvider": {
"commands": [
"_typescript.applyWorkspaceEdit",
"_typescript.applyCodeAction",
"_typescript.applyRefactoring",
"_typescript.configurePlugin",
"_typescript.organizeImports",
"_typescript.applyRenameFile",
"_typescript.goToSourceDefinition"
]
},
"hoverProvider": true,
"inlayHintProvider": true,
"linkedEditingRangeProvider": false,
"renameProvider": true,
"referencesProvider": true,
"selectionRangeProvider": true,
"signatureHelpProvider": {
"triggerCharacters": [
"(",
",",
"<"
],
"retriggerCharacters": [
")"
]
},
"workspaceSymbolProvider": true,
"implementationProvider": true,
"typeDefinitionProvider": true,
"foldingRangeProvider": true,
"semanticTokensProvider": {
"documentSelector": null,
"legend": {
"tokenTypes": [
"class",
"enum",
"interface",
"namespace",
"typeParameter",
"type",
"parameter",
"variable",
"enumMember",
"property",
"function",
"member"
],
"tokenModifiers": [
"declaration",
"static",
"async",
"readonly",
"defaultLibrary",
"local"
]
},
"full": true,
"range": true
},
"workspace": {
"fileOperations": {
"willRename": {
"filters": [
{
"scheme": "file",
"pattern": {
"glob": "**/*.{ts,js,jsx,tsx,mjs,mts,cjs,cts}",
"matches": "file"
}
},
{
"scheme": "file",
"pattern": {
"glob": "**",
"matches": "folder"
}
}
]
}
}
}
}
}
} |
Beta Was this translation helpful? Give feedback.
-
I'm asking if you are waiting for the response before sending the next one |
Beta Was this translation helpful? Give feedback.
-
There already exist lsp clients in Python. Maybe best to use something existing and working? |
Beta Was this translation helpful? Give feedback.
-
I'm sorry I didn't express myself clearly |
Beta Was this translation helpful? Give feedback.
-
Okay, I'll give it a try. thanks! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to start the
server
and write the correspondingclient
in Python, but an unexpected error occurred while testing the didOpen notification. The error is as follows:Here are my initialize request and didOpen request:
Looking forward to receiving an answer, thank you very much!
Beta Was this translation helpful? Give feedback.
All reactions