-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
lsp server doesn't start using coc.vim #2230
Comments
@orta it seems those LSP server improvements may be causing some issues with other LSP clients, hmmm |
The only changes I've made have been to update the babel parser, which shouldn't be causing this I imagine - can coc.vim use a different logging level to show some useful information? |
@orta true, in those changes you aren’t using the output channel any differently than before that would cause this. @ajkaanbal i have never used nvim.coc, but looking at the resolution to the issue you referenced, did you try this https://github.com/neoclide/coc.nvim/wiki/Debug-language-server#using-output-channel |
View coc logs
|
Do you have a graphql config? |
I have this file, where schema is the public github graphql schema here I forgot to add this earlier, it may be useful:
|
Hey! I have this problem as well, but a different My `:CocInfo`: "languageserver": {
"graphql": {
"command": "graphql-lsp",
"args": ["server", "-m", "stream"],
"filetypes": ["typescript", "typescriptreact", "graphql"],
"trace.server": "verbose"
}
} ## versions
vim version: NVIM v0.7.0-dev+1295-g04d2476d3
node version: v16.14.2
coc.nvim version: 0.0.80-5830e03d 2022-03-27 04:58:12 +0800
coc.nvim directory: /Users/jake/.local/share/nvim/site/pack/packer/start/coc.nvim
term: tmux
platform: darwin
## Log of coc.nvim
2022-03-28T15:22:12.312 INFO (pid:77069) [configurations] - Add folder configuration from cwd: /Users/jake/projects/qnr-server/.vim/coc-settings.json
2022-03-28T15:22:12.314 INFO (pid:77069) [configurations] - Change folder configuration from cwd to: /Users/jake/projects/qnr-server/.vim/coc-settings.json
2022-03-28T15:22:12.474 INFO (pid:77069) [services] - registered service "languageserver.graphql"
2022-03-28T15:22:12.504 INFO (pid:77069) [coc-git] - Looking for git in: git
2022-03-28T15:22:12.728 INFO (pid:77069) [plugin] - coc.nvim initialized with node: v16.14.2 after 348ms
2022-03-28T15:22:13.153 INFO (pid:77069) [attach] - receive notification: highlight []
2022-03-28T15:22:13.802 INFO (pid:77069) [attach] - receive notification: highlight []
2022-03-28T15:22:16.512 INFO (pid:77069) [attach] - receive notification: openLocalConfig []
2022-03-28T15:22:16.651 INFO (pid:77069) [services] - registered service "json"
2022-03-28T15:22:16.652 INFO (pid:77069) [services] - Json language server state change: stopped => starting
2022-03-28T15:22:16.752 INFO (pid:77069) [services] - Json language server state change: starting => running
2022-03-28T15:22:16.756 INFO (pid:77069) [services] - service json started
2022-03-28T15:22:17.044 INFO (pid:77069) [attach] - receive notification: highlight []
2022-03-28T15:22:19.380 INFO (pid:77069) [attach] - receive notification: highlight []
2022-03-28T15:22:22.929 INFO (pid:77069) [attach] - receive notification: highlight []
2022-03-28T15:22:27.657 INFO (pid:77069) [attach] - receive notification: highlight []
2022-03-28T15:22:52.740 INFO (pid:77069) [attach] - receive notification: showInfo [] And some logging from the language server (NDA source code removed): [Trace - 3:13:34 PM] Sending request 'initialize - (0)'.
Params: {
"processId": 75484,
"rootPath": "/Users/jake/projects/qnr-server",
"rootUri": "file:///Users/jake/projects/qnr-server",
"capabilities": {
"workspace": {
"applyEdit": true,
"workspaceEdit": {
"documentChanges": true,
"resourceOperations": [
"create",
"rename",
"delete"
],
"failureHandling": "textOnlyTransactional",
"normalizesLineEndings": true
},
"didChangeConfiguration": {
"dynamicRegistration": true
},
"didChangeWatchedFiles": {
"dynamicRegistration": true
},
"symbol": {
"dynamicRegistration": true,
"symbolKind": {
"valueSet": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
]
},
"tagSupport": {
"valueSet": [
1
]
}
},
"codeLens": {
"refreshSupport": true
},
"executeCommand": {
"dynamicRegistration": true
},
"configuration": true,
"fileOperations": {
"dynamicRegistration": true,
"didCreate": true,
"didRename": true,
"didDelete": true,
"willCreate": true,
"willRename": true,
"willDelete": true
},
"semanticTokens": {
"refreshSupport": true
},
"workspaceFolders": true
},
"textDocument": {
"publishDiagnostics": {
"relatedInformation": true,
"versionSupport": true,
"tagSupport": {
"valueSet": [
1,
2
]
},
"codeDescriptionSupport": true,
"dataSupport": true
},
"synchronization": {
"dynamicRegistration": true,
"willSave": true,
"willSaveWaitUntil": true,
"didSave": true
},
"completion": {
"dynamicRegistration": true,
"contextSupport": true,
"completionItem": {
"snippetSupport": true,
"commitCharactersSupport": true,
"documentationFormat": [
"markdown",
"plaintext"
],
"deprecatedSupport": true,
"preselectSupport": true,
"insertReplaceSupport": true,
"tagSupport": {
"valueSet": [
1
]
},
"resolveSupport": {
"properties": [
"documentation",
"detail",
"additionalTextEdits"
]
},
"insertTextModeSupport": {
"valueSet": [
1,
2
]
}
},
"completionItemKind": {
"valueSet": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25
]
},
"insertTextMode": 2
},
"hover": {
"dynamicRegistration": true,
"contentFormat": [
"markdown",
"plaintext"
]
},
"signatureHelp": {
"dynamicRegistration": true,
"contextSupport": true,
"signatureInformation": {
"documentationFormat": [
"markdown",
"plaintext"
],
"activeParameterSupport": true,
"parameterInformation": {
"labelOffsetSupport": true
}
}
},
"references": {
"dynamicRegistration": true
},
"definition": {
"dynamicRegistration": true
},
"documentHighlight": {
"dynamicRegistration": true
},
"documentSymbol": {
"dynamicRegistration": true,
"symbolKind": {
"valueSet": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
]
},
"hierarchicalDocumentSymbolSupport": true,
"tagSupport": {
"valueSet": [
1
]
},
"labelSupport": true
},
"codeAction": {
"dynamicRegistration": true,
"isPreferredSupport": true,
"disabledSupport": true,
"dataSupport": true,
"honorsChangeAnnotations": false,
"resolveSupport": {
"properties": [
"edit"
]
},
"codeActionLiteralSupport": {
"codeActionKind": {
"valueSet": [
"",
"quickfix",
"refactor",
"refactor.extract",
"refactor.inline",
"refactor.rewrite",
"source",
"source.organizeImports"
]
}
}
},
"codeLens": {
"dynamicRegistration": true
},
"formatting": {
"dynamicRegistration": true
},
"rangeFormatting": {
"dynamicRegistration": true
},
"onTypeFormatting": {
"dynamicRegistration": true
},
"rename": {
"dynamicRegistration": true,
"prepareSupport": true
},
"documentLink": {
"dynamicRegistration": true,
"tooltipSupport": true
},
"typeDefinition": {
"dynamicRegistration": true
},
"implementation": {
"dynamicRegistration": true
},
"declaration": {
"dynamicRegistration": true
},
"colorProvider": {
"dynamicRegistration": true
},
"foldingRange": {
"dynamicRegistration": true,
"rangeLimit": 5000,
"lineFoldingOnly": true
},
"selectionRange": {
"dynamicRegistration": true
},
"callHierarchy": {
"dynamicRegistration": true
},
"linkedEditingRange": {
"dynamicRegistration": true
},
"semanticTokens": {
"dynamicRegistration": true,
"tokenTypes": [
"namespace",
"type",
"class",
"enum",
"interface",
"struct",
"typeParameter",
"parameter",
"variable",
"property",
"enumMember",
"event",
"function",
"method",
"macro",
"keyword",
"modifier",
"comment",
"string",
"number",
"regexp",
"operator"
],
"tokenModifiers": [
"declaration",
"definition",
"readonly",
"static",
"deprecated",
"abstract",
"async",
"modification",
"documentation",
"defaultLibrary"
],
"formats": [
"relative"
],
"requests": {
"range": true,
"full": {
"delta": true
}
},
"multilineTokenSupport": false,
"overlappingTokenSupport": false
}
},
"window": {
"showMessage": {
"messageActionItem": {
"additionalPropertiesSupport": true
}
},
"showDocument": {
"support": true
},
"workDoneProgress": true
},
"general": {
"regularExpressions": {
"engine": "ECMAScript",
"version": "ES2020"
},
"markdown": {
"parser": "marked",
"version": "4.0.10"
}
}
},
"initializationOptions": {},
"trace": "verbose",
"workspaceFolders": [
{
"uri": "file:///Users/jake/projects/qnr-server",
"name": "qnr-server"
}
],
"locale": "en_US",
"clientInfo": {
"name": "coc.nvim",
"version": "0.0.80"
},
"workDoneToken": "acb41fb5-331c-422d-bf19-4ed63012c979"
}
3/28/2022, 3:13:35 PM [3] (pid: 75508) graphql-language-service-usage-logs: {"type":"usage","messageType":"initialize"}
[Trace - 3:13:35 PM] Received response 'initialize - (0)' in 732ms.
Result: {
"capabilities": {
"workspaceSymbolProvider": true,
"documentSymbolProvider": true,
"completionProvider": {
"resolveProvider": true,
"triggerCharacters": [
" ",
":",
"$",
"\n",
" ",
"(",
"@"
]
},
"definitionProvider": true,
"textDocumentSync": 1,
"hoverProvider": true,
"workspace": {
"workspaceFolders": {
"supported": true,
"changeNotifications": true
}
}
}
}
[Trace - 3:13:35 PM] Sending notification 'initialized'.
Params: {}
[Trace - 3:13:35 PM] Sending notification 'workspace/didChangeConfiguration'.
Params: {
"settings": {}
}
[Trace - 3:13:35 PM] Sending notification 'textDocument/didOpen'.
Params: {
"textDocument": {
"uri": "file:///Users/jake/projects/qnr-server/apps/server/src/client/components/settings/org/cards/ApiKeysSettings.tsx",
"languageId": "typescriptreact",
"version": 1,
}
}
[Info - 3:13:35 PM] Connection to server got closed. Server will restart.
[Trace - 3:13:35 PM] Sending request 'initialize - (0)'.
Params: {
"processId": 75484,
"rootPath": "/Users/jake/projects/qnr-server",
"rootUri": "file:///Users/jake/projects/qnr-server",
"capabilities": {
"workspace": {
"applyEdit": true,
"workspaceEdit": {
"documentChanges": true,
"resourceOperations": [
"create",
"rename",
"delete"
],
"failureHandling": "textOnlyTransactional",
"normalizesLineEndings": true
},
"didChangeConfiguration": {
"dynamicRegistration": true
},
"didChangeWatchedFiles": {
"dynamicRegistration": true
},
"symbol": {
"dynamicRegistration": true,
"symbolKind": {
"valueSet": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
]
},
"tagSupport": {
"valueSet": [
1
]
}
},
"codeLens": {
"refreshSupport": true
},
"executeCommand": {
"dynamicRegistration": true
},
"configuration": true,
"fileOperations": {
"dynamicRegistration": true,
"didCreate": true,
"didRename": true,
"didDelete": true,
"willCreate": true,
"willRename": true,
"willDelete": true
},
"semanticTokens": {
"refreshSupport": true
},
"workspaceFolders": true
},
"textDocument": {
"publishDiagnostics": {
"relatedInformation": true,
"versionSupport": true,
"tagSupport": {
"valueSet": [
1,
2
]
},
"codeDescriptionSupport": true,
"dataSupport": true
},
"synchronization": {
"dynamicRegistration": true,
"willSave": true,
"willSaveWaitUntil": true,
"didSave": true
},
"completion": {
"dynamicRegistration": true,
"contextSupport": true,
"completionItem": {
"snippetSupport": true,
"commitCharactersSupport": true,
"documentationFormat": [
"markdown",
"plaintext"
],
"deprecatedSupport": true,
"preselectSupport": true,
"insertReplaceSupport": true,
"tagSupport": {
"valueSet": [
1
]
},
"resolveSupport": {
"properties": [
"documentation",
"detail",
"additionalTextEdits"
]
},
"insertTextModeSupport": {
"valueSet": [
1,
2
]
}
},
"completionItemKind": {
"valueSet": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25
]
},
"insertTextMode": 2
},
"hover": {
"dynamicRegistration": true,
"contentFormat": [
"markdown",
"plaintext"
]
},
"signatureHelp": {
"dynamicRegistration": true,
"contextSupport": true,
"signatureInformation": {
"documentationFormat": [
"markdown",
"plaintext"
],
"activeParameterSupport": true,
"parameterInformation": {
"labelOffsetSupport": true
}
}
},
"references": {
"dynamicRegistration": true
},
"definition": {
"dynamicRegistration": true
},
"documentHighlight": {
"dynamicRegistration": true
},
"documentSymbol": {
"dynamicRegistration": true,
"symbolKind": {
"valueSet": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
]
},
"hierarchicalDocumentSymbolSupport": true,
"tagSupport": {
"valueSet": [
1
]
},
"labelSupport": true
},
"codeAction": {
"dynamicRegistration": true,
"isPreferredSupport": true,
"disabledSupport": true,
"dataSupport": true,
"honorsChangeAnnotations": false,
"resolveSupport": {
"properties": [
"edit"
]
},
"codeActionLiteralSupport": {
"codeActionKind": {
"valueSet": [
"",
"quickfix",
"refactor",
"refactor.extract",
"refactor.inline",
"refactor.rewrite",
"source",
"source.organizeImports"
]
}
}
},
"codeLens": {
"dynamicRegistration": true
},
"formatting": {
"dynamicRegistration": true
},
"rangeFormatting": {
"dynamicRegistration": true
},
"onTypeFormatting": {
"dynamicRegistration": true
},
"rename": {
"dynamicRegistration": true,
"prepareSupport": true
},
"documentLink": {
"dynamicRegistration": true,
"tooltipSupport": true
},
"typeDefinition": {
"dynamicRegistration": true
},
"implementation": {
"dynamicRegistration": true
},
"declaration": {
"dynamicRegistration": true
},
"colorProvider": {
"dynamicRegistration": true
},
"foldingRange": {
"dynamicRegistration": true,
"rangeLimit": 5000,
"lineFoldingOnly": true
},
"selectionRange": {
"dynamicRegistration": true
},
"callHierarchy": {
"dynamicRegistration": true
},
"linkedEditingRange": {
"dynamicRegistration": true
},
"semanticTokens": {
"dynamicRegistration": true,
"tokenTypes": [
"namespace",
"type",
"class",
"enum",
"interface",
"struct",
"typeParameter",
"parameter",
"variable",
"property",
"enumMember",
"event",
"function",
"method",
"macro",
"keyword",
"modifier",
"comment",
"string",
"number",
"regexp",
"operator"
],
"tokenModifiers": [
"declaration",
"definition",
"readonly",
"static",
"deprecated",
"abstract",
"async",
"modification",
"documentation",
"defaultLibrary"
],
"formats": [
"relative"
],
"requests": {
"range": true,
"full": {
"delta": true
}
},
"multilineTokenSupport": false,
"overlappingTokenSupport": false
}
},
"window": {
"showMessage": {
"messageActionItem": {
"additionalPropertiesSupport": true
}
},
"showDocument": {
"support": true
},
"workDoneProgress": true
},
"general": {
"regularExpressions": {
"engine": "ECMAScript",
"version": "ES2020"
},
"markdown": {
"parser": "marked",
"version": "4.0.10"
}
}
},
"initializationOptions": {},
"trace": "verbose",
"workspaceFolders": [
{
"uri": "file:///Users/jake/projects/qnr-server",
"name": "qnr-server"
}
],
"locale": "en_US",
"clientInfo": {
"name": "coc.nvim",
"version": "0.0.80"
},
"workDoneToken": "d2dea1c4-2cbd-43af-b267-fae2f1de9d25"
}
3/28/2022, 3:13:35 PM [3] (pid: 75531) graphql-language-service-usage-logs: {"type":"usage","messageType":"initialize"}
[Trace - 3:13:35 PM] Received response 'initialize - (0)' in 566ms.
Result: {
"capabilities": {
"workspaceSymbolProvider": true,
"documentSymbolProvider": true,
"completionProvider": {
"resolveProvider": true,
"triggerCharacters": [
" ",
":",
"$",
"\n",
" ",
"(",
"@"
]
},
"definitionProvider": true,
"textDocumentSync": 1,
"hoverProvider": true,
"workspace": {
"workspaceFolders": {
"supported": true,
"changeNotifications": true
}
}
}
}
[Trace - 3:13:35 PM] Sending notification 'initialized'.
Params: {}
[Trace - 3:13:35 PM] Sending notification 'workspace/didChangeConfiguration'.
Params: {
"settings": {}
}
[Trace - 3:13:35 PM] Sending notification 'textDocument/didOpen'.
Params: {
"textDocument": {
"uri": "file:///Users/jake/projects/qnr-server/apps/server/src/client/components/settings/org/cards/ApiKeysSettings.tsx",
"languageId": "typescriptreact",
"version": 1,
}
}
[Info - 3:13:35 PM] Connection to server got closed. Server will restart.
[Trace - 3:13:35 PM] Sending request 'initialize - (0)'.
Params: {
"processId": 75484,
"rootPath": "/Users/jake/projects/qnr-server",
"rootUri": "file:///Users/jake/projects/qnr-server",
"capabilities": {
"workspace": {
"applyEdit": true,
"workspaceEdit": {
"documentChanges": true,
"resourceOperations": [
"create",
"rename",
"delete"
],
"failureHandling": "textOnlyTransactional",
"normalizesLineEndings": true
},
"didChangeConfiguration": {
"dynamicRegistration": true
},
"didChangeWatchedFiles": {
"dynamicRegistration": true
},
"symbol": {
"dynamicRegistration": true,
"symbolKind": {
"valueSet": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
]
},
"tagSupport": {
"valueSet": [
1
]
}
},
"codeLens": {
"refreshSupport": true
},
"executeCommand": {
"dynamicRegistration": true
},
"configuration": true,
"fileOperations": {
"dynamicRegistration": true,
"didCreate": true,
"didRename": true,
"didDelete": true,
"willCreate": true,
"willRename": true,
"willDelete": true
},
"semanticTokens": {
"refreshSupport": true
},
"workspaceFolders": true
},
"textDocument": {
"publishDiagnostics": {
"relatedInformation": true,
"versionSupport": true,
"tagSupport": {
"valueSet": [
1,
2
]
},
"codeDescriptionSupport": true,
"dataSupport": true
},
"synchronization": {
"dynamicRegistration": true,
"willSave": true,
"willSaveWaitUntil": true,
"didSave": true
},
"completion": {
"dynamicRegistration": true,
"contextSupport": true,
"completionItem": {
"snippetSupport": true,
"commitCharactersSupport": true,
"documentationFormat": [
"markdown",
"plaintext"
],
"deprecatedSupport": true,
"preselectSupport": true,
"insertReplaceSupport": true,
"tagSupport": {
"valueSet": [
1
]
},
"resolveSupport": {
"properties": [
"documentation",
"detail",
"additionalTextEdits"
]
},
"insertTextModeSupport": {
"valueSet": [
1,
2
]
}
},
"completionItemKind": {
"valueSet": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25
]
},
"insertTextMode": 2
},
"hover": {
"dynamicRegistration": true,
"contentFormat": [
"markdown",
"plaintext"
]
},
"signatureHelp": {
"dynamicRegistration": true,
"contextSupport": true,
"signatureInformation": {
"documentationFormat": [
"markdown",
"plaintext"
],
"activeParameterSupport": true,
"parameterInformation": {
"labelOffsetSupport": true
}
}
},
"references": {
"dynamicRegistration": true
},
"definition": {
"dynamicRegistration": true
},
"documentHighlight": {
"dynamicRegistration": true
},
"documentSymbol": {
"dynamicRegistration": true,
"symbolKind": {
"valueSet": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
]
},
"hierarchicalDocumentSymbolSupport": true,
"tagSupport": {
"valueSet": [
1
]
},
"labelSupport": true
},
"codeAction": {
"dynamicRegistration": true,
"isPreferredSupport": true,
"disabledSupport": true,
"dataSupport": true,
"honorsChangeAnnotations": false,
"resolveSupport": {
"properties": [
"edit"
]
},
"codeActionLiteralSupport": {
"codeActionKind": {
"valueSet": [
"",
"quickfix",
"refactor",
"refactor.extract",
"refactor.inline",
"refactor.rewrite",
"source",
"source.organizeImports"
]
}
}
},
"codeLens": {
"dynamicRegistration": true
},
"formatting": {
"dynamicRegistration": true
},
"rangeFormatting": {
"dynamicRegistration": true
},
"onTypeFormatting": {
"dynamicRegistration": true
},
"rename": {
"dynamicRegistration": true,
"prepareSupport": true
},
"documentLink": {
"dynamicRegistration": true,
"tooltipSupport": true
},
"typeDefinition": {
"dynamicRegistration": true
},
"implementation": {
"dynamicRegistration": true
},
"declaration": {
"dynamicRegistration": true
},
"colorProvider": {
"dynamicRegistration": true
},
"foldingRange": {
"dynamicRegistration": true,
"rangeLimit": 5000,
"lineFoldingOnly": true
},
"selectionRange": {
"dynamicRegistration": true
},
"callHierarchy": {
"dynamicRegistration": true
},
"linkedEditingRange": {
"dynamicRegistration": true
},
"semanticTokens": {
"dynamicRegistration": true,
"tokenTypes": [
"namespace",
"type",
"class",
"enum",
"interface",
"struct",
"typeParameter",
"parameter",
"variable",
"property",
"enumMember",
"event",
"function",
"method",
"macro",
"keyword",
"modifier",
"comment",
"string",
"number",
"regexp",
"operator"
],
"tokenModifiers": [
"declaration",
"definition",
"readonly",
"static",
"deprecated",
"abstract",
"async",
"modification",
"documentation",
"defaultLibrary"
],
"formats": [
"relative"
],
"requests": {
"range": true,
"full": {
"delta": true
}
},
"multilineTokenSupport": false,
"overlappingTokenSupport": false
}
},
"window": {
"showMessage": {
"messageActionItem": {
"additionalPropertiesSupport": true
}
},
"showDocument": {
"support": true
},
"workDoneProgress": true
},
"general": {
"regularExpressions": {
"engine": "ECMAScript",
"version": "ES2020"
},
"markdown": {
"parser": "marked",
"version": "4.0.10"
}
}
},
"initializationOptions": {},
"trace": "verbose",
"workspaceFolders": [
{
"uri": "file:///Users/jake/projects/qnr-server",
"name": "qnr-server"
}
],
"locale": "en_US",
"clientInfo": {
"name": "coc.nvim",
"version": "0.0.80"
},
"workDoneToken": "868d81f6-e8a1-4f73-b527-62db3f8ec0a9"
}
3/28/2022, 3:13:36 PM [3] (pid: 75535) graphql-language-service-usage-logs: {"type":"usage","messageType":"initialize"}
[Trace - 3:13:36 PM] Received response 'initialize - (0)' in 558ms.
Result: {
"capabilities": {
"workspaceSymbolProvider": true,
"documentSymbolProvider": true,
"completionProvider": {
"resolveProvider": true,
"triggerCharacters": [
" ",
":",
"$",
"\n",
" ",
"(",
"@"
]
},
"definitionProvider": true,
"textDocumentSync": 1,
"hoverProvider": true,
"workspace": {
"workspaceFolders": {
"supported": true,
"changeNotifications": true
}
}
}
}
[Trace - 3:13:36 PM] Sending notification 'initialized'.
Params: {}
[Trace - 3:13:36 PM] Sending notification 'workspace/didChangeConfiguration'.
Params: {
"settings": {}
}
[Trace - 3:13:36 PM] Sending notification 'textDocument/didOpen'.
Params: {
"textDocument": {
"uri": "file:///Users/jake/projects/qnr-server/apps/server/src/client/components/settings/org/cards/ApiKeysSettings.tsx",
"languageId": "typescriptreact",
"version": 1,
}
}
[Info - 3:13:36 PM] Connection to server got closed. Server will restart.
[Trace - 3:13:36 PM] Sending request 'initialize - (0)'.
Params: {
"processId": 75484,
"rootPath": "/Users/jake/projects/qnr-server",
"rootUri": "file:///Users/jake/projects/qnr-server",
"capabilities": {
"workspace": {
"applyEdit": true,
"workspaceEdit": {
"documentChanges": true,
"resourceOperations": [
"create",
"rename",
"delete"
],
"failureHandling": "textOnlyTransactional",
"normalizesLineEndings": true
},
"didChangeConfiguration": {
"dynamicRegistration": true
},
"didChangeWatchedFiles": {
"dynamicRegistration": true
},
"symbol": {
"dynamicRegistration": true,
"symbolKind": {
"valueSet": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
]
},
"tagSupport": {
"valueSet": [
1
]
}
},
"codeLens": {
"refreshSupport": true
},
"executeCommand": {
"dynamicRegistration": true
},
"configuration": true,
"fileOperations": {
"dynamicRegistration": true,
"didCreate": true,
"didRename": true,
"didDelete": true,
"willCreate": true,
"willRename": true,
"willDelete": true
},
"semanticTokens": {
"refreshSupport": true
},
"workspaceFolders": true
},
"textDocument": {
"publishDiagnostics": {
"relatedInformation": true,
"versionSupport": true,
"tagSupport": {
"valueSet": [
1,
2
]
},
"codeDescriptionSupport": true,
"dataSupport": true
},
"synchronization": {
"dynamicRegistration": true,
"willSave": true,
"willSaveWaitUntil": true,
"didSave": true
},
"completion": {
"dynamicRegistration": true,
"contextSupport": true,
"completionItem": {
"snippetSupport": true,
"commitCharactersSupport": true,
"documentationFormat": [
"markdown",
"plaintext"
],
"deprecatedSupport": true,
"preselectSupport": true,
"insertReplaceSupport": true,
"tagSupport": {
"valueSet": [
1
]
},
"resolveSupport": {
"properties": [
"documentation",
"detail",
"additionalTextEdits"
]
},
"insertTextModeSupport": {
"valueSet": [
1,
2
]
}
},
"completionItemKind": {
"valueSet": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25
]
},
"insertTextMode": 2
},
"hover": {
"dynamicRegistration": true,
"contentFormat": [
"markdown",
"plaintext"
]
},
"signatureHelp": {
"dynamicRegistration": true,
"contextSupport": true,
"signatureInformation": {
"documentationFormat": [
"markdown",
"plaintext"
],
"activeParameterSupport": true,
"parameterInformation": {
"labelOffsetSupport": true
}
}
},
"references": {
"dynamicRegistration": true
},
"definition": {
"dynamicRegistration": true
},
"documentHighlight": {
"dynamicRegistration": true
},
"documentSymbol": {
"dynamicRegistration": true,
"symbolKind": {
"valueSet": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
]
},
"hierarchicalDocumentSymbolSupport": true,
"tagSupport": {
"valueSet": [
1
]
},
"labelSupport": true
},
"codeAction": {
"dynamicRegistration": true,
"isPreferredSupport": true,
"disabledSupport": true,
"dataSupport": true,
"honorsChangeAnnotations": false,
"resolveSupport": {
"properties": [
"edit"
]
},
"codeActionLiteralSupport": {
"codeActionKind": {
"valueSet": [
"",
"quickfix",
"refactor",
"refactor.extract",
"refactor.inline",
"refactor.rewrite",
"source",
"source.organizeImports"
]
}
}
},
"codeLens": {
"dynamicRegistration": true
},
"formatting": {
"dynamicRegistration": true
},
"rangeFormatting": {
"dynamicRegistration": true
},
"onTypeFormatting": {
"dynamicRegistration": true
},
"rename": {
"dynamicRegistration": true,
"prepareSupport": true
},
"documentLink": {
"dynamicRegistration": true,
"tooltipSupport": true
},
"typeDefinition": {
"dynamicRegistration": true
},
"implementation": {
"dynamicRegistration": true
},
"declaration": {
"dynamicRegistration": true
},
"colorProvider": {
"dynamicRegistration": true
},
"foldingRange": {
"dynamicRegistration": true,
"rangeLimit": 5000,
"lineFoldingOnly": true
},
"selectionRange": {
"dynamicRegistration": true
},
"callHierarchy": {
"dynamicRegistration": true
},
"linkedEditingRange": {
"dynamicRegistration": true
},
"semanticTokens": {
"dynamicRegistration": true,
"tokenTypes": [
"namespace",
"type",
"class",
"enum",
"interface",
"struct",
"typeParameter",
"parameter",
"variable",
"property",
"enumMember",
"event",
"function",
"method",
"macro",
"keyword",
"modifier",
"comment",
"string",
"number",
"regexp",
"operator"
],
"tokenModifiers": [
"declaration",
"definition",
"readonly",
"static",
"deprecated",
"abstract",
"async",
"modification",
"documentation",
"defaultLibrary"
],
"formats": [
"relative"
],
"requests": {
"range": true,
"full": {
"delta": true
}
},
"multilineTokenSupport": false,
"overlappingTokenSupport": false
}
},
"window": {
"showMessage": {
"messageActionItem": {
"additionalPropertiesSupport": true
}
},
"showDocument": {
"support": true
},
"workDoneProgress": true
},
"general": {
"regularExpressions": {
"engine": "ECMAScript",
"version": "ES2020"
},
"markdown": {
"parser": "marked",
"version": "4.0.10"
}
}
},
"initializationOptions": {},
"trace": "verbose",
"workspaceFolders": [
{
"uri": "file:///Users/jake/projects/qnr-server",
"name": "qnr-server"
}
],
"locale": "en_US",
"clientInfo": {
"name": "coc.nvim",
"version": "0.0.80"
},
"workDoneToken": "528b75ec-0c2e-49b0-9887-29ad2a2d52b5"
}
3/28/2022, 3:13:36 PM [3] (pid: 75536) graphql-language-service-usage-logs: {"type":"usage","messageType":"initialize"}
[Trace - 3:13:36 PM] Received response 'initialize - (0)' in 562ms.
Result: {
"capabilities": {
"workspaceSymbolProvider": true,
"documentSymbolProvider": true,
"completionProvider": {
"resolveProvider": true,
"triggerCharacters": [
" ",
":",
"$",
"\n",
" ",
"(",
"@"
]
},
"definitionProvider": true,
"textDocumentSync": 1,
"hoverProvider": true,
"workspace": {
"workspaceFolders": {
"supported": true,
"changeNotifications": true
}
}
}
}
[Trace - 3:13:36 PM] Sending notification 'initialized'.
Params: {}
[Trace - 3:13:36 PM] Sending notification 'workspace/didChangeConfiguration'.
Params: {
"settings": {}
}
[Trace - 3:13:36 PM] Sending notification 'textDocument/didOpen'.
Params: {
"textDocument": {
"uri": "file:///Users/jake/projects/qnr-server/apps/server/src/client/components/settings/org/cards/ApiKeysSettings.tsx",
"languageId": "typescriptreact",
"version": 1,
}
}
[Error - 3:13:36 PM] Connection to server got closed. Server will not be restarted. |
@ajkaanbal I wish I could see a stack trace from the language server. might have to get my vim configured to use this extension. perhaps there is more information in the log files? it should be in I think I might have a lead on this issue - the vscode extension usually provides default settings values, and the server might be failing from expecting those. But without seeing errors from the server I'm kinda stumped. can you try providing |
I think that is an option specific to vscode (I tried and got nothing different). Is there a way to enable debug logs on the cli? https://github.com/graphql/graphiql/tree/main/packages/graphql-language-service-cli ? |
@ajkaanbal the more verbose output should be in the log file, do you see it? |
I don't see any log file, where should it be? |
@ajkaanbal can you try the latest release? |
❯ graphql-lsp --version
3.2.18 Nope, I keep getting same error as above
and I found a log file but it only contains: cat /tmp/graphql-language-service-logs/graphql-language-service-log-ajkaanbal-2022-3-31.log
3/31/2022, 1:08:44 PM [3] (pid: 4121463) graphql-language-service-usage-logs: {"type":"usage","messageType":"initialize"}
3/31/2022, 1:08:45 PM [3] (pid: 4121482) graphql-language-service-usage-logs: {"type":"usage","messageType":"initialize"}
3/31/2022, 1:08:45 PM [3] (pid: 4121548) graphql-language-service-usage-logs: {"type":"usage","messageType":"initialize"}
3/31/2022, 1:08:46 PM [3] (pid: 4121562) graphql-language-service-usage-logs: {"type":"usage","messageType":"initialize"} |
@acao I finally make it work! I changed these lines from here:
to connection.onNotification(DidChangeConfigurationNotification.type, params =>
messageProcessor.handleDidChangeConfiguration(params)
) |
@ajkaanbal thank you! I think this fixes a bug reported elsewhere! I will get this fix released soon |
Another change I had to make because it kept crashing "randomly"
this._settings.load?.fileName |
does this canary release work for y'all? aka
|
it works for me |
Canary build not working here. Also using CoC in neovim. Trace log cycles like this and eventually shuts down:
Language server config: {
"languageserver": {
"graphql": {
"command": "graphql-lsp",
"args": ["server", "-m", "stream"],
"filetypes": [
"typescript",
"typescriptreact",
"javascript",
"javascriptreact",
"graphql"
],
"trace.server": "verbose"
}
}
}
|
@ernie canary release i broken, please use stable (we are having issues with automating the pre-releases) |
@acao I wound up in this thread because I was having a problem with stable, unfortunately. I hoped the build you referenced above would work as a fix but didn't. :( |
I am having the same issue with the version 3.2.27, |
My logs show the following errors:
Haven't looked into it deeply, but quick skim looks like it may be related to the GraphQLCache object on the MessageProcessor. @acao tagging you because you asked for a stack trace above |
@wilhelmeek can you try a few patch versions earlier? someone merged some untested changes as eslint fixes for this release over the weekend, without giving me a chance to test the language server |
@acao thanks for that. On If it's of any help, here are some logs when running only the GraphQL client configuration:
No other messages are sent or received regardless of actioned hover requests on my part. I'm not receiving any diagnostics events either. Let me know if there's anything else I can provide that may be of help. |
@acao thanks for looping back on this! Really sorry for the confusion, but the cache error disappeared entirely for me when using patch version 19 as I mentioned in this comment: #2230 (comment) The broken behaviour I (and I believe other nvim lsp / coc.nvim users) are experiencing is initial client/server handshake and then silence rather than the cache errors I had initially reported. |
ah! likely related to requesting settings then, perhaps I'm not ashamed to admit I have no idea what I'm doing here, does this seem to indicate that i have vim coc installed? should i be using update: reproduced it finally! forgot we use a legacy config at work because of intellij users, so i just had to tweak my config:
|
In my case, it's a benign |
I'm confused as to how to debug this locally, and hitting a wall. The above instructions for getting it working with a local copy aren't working for me, perhaps because I ran Hopefully I'll have more time next weekend, but after 5 hours on this I have gotten nowhere, though at least I think I have it set up and can reproduce the bug. Edit: @benjie is much more experienced with vim than I, he is extremely busy, but perhaps he knows some other graphql core oss folks who are vim users who would like to help? or perhaps @wilhelmeek would you like to schedule a time to work through this together? |
Afraid I've not used coc-graphql in a while, though it's awesomely helpful I tend to only use it when I'm working on a GraphQL frontend, and these days I'm focussed more on the backend (and on things that coc-graphql can't really help with). I've sent out a tweet though... so 😌😉 |
@benjie thank you! Hopefully someone has time or interest. @stonexer perhaps you‘d be interested in taking a look? Both vscode and nvim coc have changed their exception handling all of a sudden and I just resolved the former. I think it’s just a lingering uncaught exception somewhere, or just that the LSP server is behaving differently because of something the nvim coc client expects. I tried debugging the LSP server with vim to log to output channel uncaught exceptions using |
Hey @acao very sorry for the delay in replying. I'd be happy to schedule some time to have a look at this together 😄 Not sure what the best way is to get this arranged, but I can hop on a Discord or Zoom (or equiv) sometime that suits both of our timezones |
I have the same problem. I wont be able to do much work on it today but I can offer a slight improvement to graphql-lsp binary.
This line should be changed to
Also I console.logged the error and I got a stack trace from
This line in the vscode-jsonrpc is returning undefined from the write method
I will have a little bit more time to look at this next week perhaps but thought I should at least share these findings for now. @acao, Would you like me to make a PR for the |
Ahhh that would do it! And it explains why this is in the CLI and not other server implementations. Please open that PR, that would be wonderful. i think nvim-coc changed it’s behavior on unhandled exceptions to match a recent vscode release, so a non-0 exit code would trigger this behavior where a bit of the CLI service layer causing this escaped me |
@wilhelmeek thank you kindly for the offer, but working on a huge project at work right now so it might be a while before I have much headspace for this again. Hopefully this stderr usage in cli is it! |
Between MINOR version of vscode-languageserver-protocol, the version of vscode-jsonrpc that it depends on changed in **MAJOR** version. Thus, this PR try to ensure the user of this package use compatible version of vscode-languageserver-protocol and vscode-jsonrpc. I think this will fixes graphql#2230
…lved Between MINOR version of vscode-languageserver-protocol, the version of vscode-jsonrpc that it depends on changed in **MAJOR** version. Thus, this PR try to ensure the user of this package use compatible version of vscode-languageserver-protocol and vscode-jsonrpc. I think this will fixes graphql#2230
thanks to @xuanduc987 we have a new fix release (I hope) for sorry this took so long everyone :/ |
I can't say anything about coc, but |
Thanks @acao and @howlinbash — works great now 🙏 |
|
I'm afraid the fix is not enough for yarn user like me (install graphql-language-service-cli with yarn global add) Go to
yarn doesn't select the hoisted version for I guess we have to upgrade vscode-languageserver to latest version to fix this completely (which could be very time consuming) Workaround:
|
Glad this workaround works for some I will take a look at upgrading |
… hood. seems to work fine for IPC in vscode-graphql at least! hopefully this solves #2230 once and for all!
… hood. seems to work fine for IPC in vscode-graphql at least! hopefully this solves #2230 once and for all!
@xuanduc987 this upgrade of here is a canary release of the CLI for folks to try with so:
or however you have the cli installed really hope this works! update: I can't seem to get |
…mplementations under the hood. also upgrades `vscode-languageclient` to match. seems to work fine for IPC in `vscode-graphql` at least! hopefully this solves #2230 once and for all!
@howlinbash i also added to this PR the |
Thank you very much @acao |
|
I'm having the same issue described here:
neoclide/coc.nvim#3687
and here:
https://stackoverflow.com/questions/68750196/graphql-lsp-with-coc-neovim
I gather these logs:
The text was updated successfully, but these errors were encountered: