yegappan / lsp

Language Server Protocol (LSP) plugin for Vim9
MIT License
458 stars 49 forks source link

[ccls] Unsupported notification message received from the LSP server [SkippedRanges] [SemanticHighlight]. #447

Closed arcmags closed 7 months ago

arcmags commented 7 months ago

I've added the ccls language server:

call LspAddServer([{
    name: 'ccls',
    filetype: ['c', 'cpp', 'h'],
    path: '/usr/bin/ccls'
}])

When I first open a file: :e helloworld.c, I get:

Warn: Unsupported notification message received from the LSP server (ccls), message = {'method': '$ccls/publishSkippedRanges', 'jsonrpc': '2.0', 'params': {'uri': 'file:///tmp/helloworld.c', 'skippedRanges': []}}
Warn: Unsupported notification message received from the LSP server (ccls), message = {'method': '$ccls/publishSemanticHighlight', 'jsonrpc': '2.0', 'params': {'uri': 'file:///tmp/helloworld.c', 'symbols': [{'id': 0, 'lsRanges': [], 'storage': 0, 'kind': 12, 'ranges': [{'R': 28, 'L': 24}], 'parentKind': 1}, {'id': 0, 'lsRanges': [], 'storage': 0, 'kind': 13, 'ranges': [{'R': 42, 'L': 41}, {'R': 53, 'L': 52}, {'R': 58, 'L': 57}, {'R': 66, 'L': 65}], 'parentKind': 12}, {'id': 1, 'lsRanges': [], 'storage': 0, 'kind': 12, 'ranges': [{'R': 86, 'L': 80}, {'R': 107, 'L': 101}, {'R': 128, 'L': 122}, {'R': 149, 'L': 143}, {'R': 170, 'L': 164}, {'R': 192, 'L': 186}], 'parentKind': 0}]}}

Other lsp features (gotodef, diag, etc ...) seem to all work as expected.

yegappan commented 7 months ago

I have committed fb18f228960fbac5646480f86dbb394373c44091 to address this issue. Can you try the latest version of the plugin?

arcmags commented 7 months ago

Warning message is now not printed. Thank you.