{
"params": {
"workspaceFolders": [
{
"name": "/home/letorbi/Projects/Frauenhaus/Repositories/flora",
"uri": "file:///home/letorbi/Projects/Frauenhaus/Repositories/flora"
}
],
"capabilities": {
"window": {
"showDocument": {
"support": true
},
"workDoneProgress": true,
"showMessage": {
"messageActionItem": {
"additionalPropertiesSupport": true
}
}
},
"general": {
"positionEncodings": ["utf-8", "utf-16", "utf-32"]
},
"workspace": {
"fileOperations": {
"dynamicRegistration": false,
"didCreate": false,
"willCreate": false,
"didRename": false,
"willRename": false,
"didDelete": false,
"willDelete": false
},
"configuration": true,
"didChangeConfiguration": {
"dynamicRegistration": false
},
"workspaceFolders": true,
"applyEdit": true,
"workspaceEdit": {
"resourceOperations": ["rename", "create", "delete"],
"normalizesLineEndings": true,
"changeAnnotationSupport": {
"groupsOnLabel": true
}
},
"inlayHint": {
"refreshSupport": true
},
"symbol": {
"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
]
},
"dynamicRegistration": false
},
"codeLens": {
"refreshSupport": true
},
"didChangeWatchedFiles": {
"relativePatternSupport": true,
"dynamicRegistration": false
},
"semanticTokens": {
"refreshSupport": true
},
"diagnostics": {
"refreshSupport": true
}
},
"textDocument": {
"synchronization": {
"willSaveWaitUntil": true,
"didSave": true,
"dynamicRegistration": false,
"willSave": true
},
"onTypeFormatting": {
"dynamicRegistration": false
},
"documentLink": {
"tooltipSupport": false,
"dynamicRegistration": false
},
"linkedEditingRange": {
"dynamicRegistration": false
},
"inlineCompletion": {
"dynamicRegistration": false
},
"typeDefinition": {
"linkSupport": true
},
"references": {
"dynamicRegistration": false
},
"implementation": {
"linkSupport": true
},
"codeLens": {
"resolveSupport": {
"properties": ["command"]
},
"dynamicRegistration": false
},
"foldingRange": {
"foldingRangeKind": {
"valueSet": ["comment", "imports", "region"]
},
"foldingRange": {
"collapsedText": true
},
"lineFoldingOnly": true,
"dynamicRegistration": false
},
"colorProvider": {
"dynamicRegistration": true
},
"selectionRange": {
"dynamicRegistration": false
},
"declaration": {
"linkSupport": true
},
"definition": {
"dynamicRegistration": true,
"linkSupport": true
},
"formatting": {
"dynamicRegistration": true
},
"rangeFormatting": {
"rangesSupport": true,
"dynamicRegistration": true
},
"callHierarchy": {
"dynamicRegistration": false
},
"documentSymbol": {
"hierarchicalDocumentSymbolSupport": true,
"tagSupport": {
"valueSet": [1]
},
"dynamicRegistration": false,
"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
]
}
},
"publishDiagnostics": {
"tagSupport": {
"valueSet": [1, 2]
},
"dataSupport": true,
"relatedInformation": true
},
"rename": {
"prepareSupport": true,
"honorsChangeAnnotations": true,
"dynamicRegistration": true
},
"documentHighlight": {
"dynamicRegistration": false
},
"inlayHint": {
"resolveSupport": {
"properties": [
"textEdits",
"tooltip",
"location",
"command"
]
},
"dynamicRegistration": true
},
"diagnostic": {
"relatedDocumentSupport": true,
"dynamicRegistration": true,
"tagSupport": {
"valueSet": [1, 2]
},
"dataSupport": true,
"relatedInformation": true
},
"signatureHelp": {
"signatureInformation": {
"documentationFormat": ["markdown", "plaintext"],
"activeParameterSupport": true,
"noActiveParameterSupport": true,
"parameterInformation": {
"labelOffsetSupport": true
}
},
"dynamicRegistration": false
},
"hover": {
"contentFormat": ["markdown", "plaintext"],
"dynamicRegistration": true
},
"completion": {
"dynamicRegistration": false,
"contextSupport": true,
"completionItem": {
"tagSupport": {
"valueSet": [1]
},
"snippetSupport": true,
"commitCharactersSupport": false,
"preselectSupport": false,
"deprecatedSupport": true,
"documentationFormat": ["markdown", "plaintext"],
"insertReplaceSupport": true,
"labelDetailsSupport": true,
"resolveSupport": {
"properties": [
"additionalTextEdits",
"command",
"documentation"
]
}
},
"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
]
},
"completionList": {
"itemDefaults": [
"editRange",
"insertTextFormat",
"insertTextMode",
"data"
]
}
},
"semanticTokens": {
"serverCancelSupport": false,
"augmentsSyntaxTokens": true,
"dynamicRegistration": false,
"formats": ["relative"],
"tokenModifiers": [
"declaration",
"definition",
"readonly",
"static",
"deprecated",
"abstract",
"async",
"modification",
"documentation",
"defaultLibrary"
],
"requests": {
"range": true,
"full": {
"delta": true
}
},
"tokenTypes": [
"namespace",
"type",
"class",
"enum",
"interface",
"struct",
"typeParameter",
"parameter",
"variable",
"property",
"enumMember",
"event",
"function",
"method",
"macro",
"keyword",
"modifier",
"comment",
"string",
"number",
"regexp",
"operator",
"decorator"
],
"overlappingTokenSupport": true,
"multilineTokenSupport": true
},
"codeAction": {
"isPreferredSupport": true,
"resolveSupport": {
"properties": ["edit", "command"]
},
"dynamicRegistration": true,
"honorsChangeAnnotations": true,
"disabledSupport": true,
"dataSupport": true,
"codeActionLiteralSupport": {
"codeActionKind": {
"valueSet": [
"",
"quickfix",
"refactor",
"refactor.extract",
"refactor.inline",
"refactor.rewrite",
"source",
"source.organizeImports"
]
}
}
}
}
},
"processId": 82329,
"clientInfo": {
"version": "0.12.2+v0.12.2",
"name": "Neovim"
},
"rootUri": "file:///home/letorbi/Projects/Frauenhaus/Repositories/flora",
"rootPath": "/home/letorbi/Projects/Frauenhaus/Repositories/flora",
"trace": "off",
"initializationOptions": {},
"workDoneToken": "1"
},
"id": 1,
"method": "initialize",
"jsonrpc": "2.0"
}
Information
VIM version
Operating System:
What went wrong
During my investigation for #5130 I discovered that auto-completion for CSS files with vscode-css-language-server does not work in Vim, but works in Neovim. Further tests showed that the auto-completion with any VSCode language server works only in Neovim.
I assume that other language servers are affected as well, but I haven't tested any further.
Possible solution
I was able to track the problem down to the parameters of the
initalizelifecycle message, which is sent to the language server after the process has been started. These differ significantly between Vim and Neovim:Vim initialize call
Neoim initialize call
The problem seems to be that Vim/ALE does not report support for completion snippets to the language server, while Neovim/ALE does.
A fix would be as easy as changing
params.textDocument.completion.completionItem.snippetSupportfromfalsetotrue, to activate auto-completion in Vim as well. After doing that, the auto-completion works in Vim exactly the same way as it does in Neovim.However, I would like to discuss this before creating a pull request. The reason for this is, that Vim/ALE does not seem to have the capabilities for full snippet support, so telling the language server that snippet support is available is a bit of a "fake it till you make it" approach. On the other hand Neovim/ALE does not seem to fully support snippets as well, and the user experience with the current state is at least IMHO good enough to justify setting
snippetSupporttotrue.Furthermore it might be desirable to streamline the behaviour of Vim and Neovim by sending exactly the same initialization parameters in Vim as in Neovim. This might eliminate other differences in the LSP support between both editors, but could also trigger unwanted side-effects.
Therefore I would like to have the maintainers' opinion(s) on the following questions:
Reproducing the bug
autocmd FileType * setlocal omnifunc=ale#completion#OmniFunclet g:ale_completion_enabled = 1:ALEInfo (Vim)
Expand
:ALEInfo (Neovim)
Expand