-
Notifications
You must be signed in to change notification settings - Fork 273
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
Cquery highlight support? #299
Comments
What highlight are you referring to?
If it is compiling error like highlights, it’s already supported, but only
in neovim.
…On Fri, Jan 26, 2018 at 16:09 Cosson2017 ***@***.***> wrote:
Is there a plan for supporting cquery highlight?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#299>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABYt7wYieOhJgPLsLsL6-BowWWdGcrS4ks5tOmlIgaJpZM4RvC5O>
.
|
@autozimu |
@MaskRay Were you able to point to some docs detailing this API? |
Here the issue is that aside from generic language client framework (e.g. LanguageClient-neovim lsp-mode), there should be language server-specific plugins for different language servers, because servers may provide extensions or need adaptation. See https://github.com/emacs-lsp for a list of language-specific plugins in the Emacs land. I learned that Vim/Neovim If someone decides to implement it, the response messages is defined in https://github.com/cquery-project/cquery/blob/master/src/message_handler.h#L27 and here is an example:
{
"jsonrpc": "2.0",
"method": "$cquery/publishSemanticHighlighting",
"params": {
"uri": "file:///tmp/c/a.cc",
"symbols": [
{
"stableId": 6,
"parentKind": 3,
"kind": 13,
"storage": 1,
"ranges": [
{
"start": {
"line": 10,
"character": 18
},
"end": {
"line": 10,
"character": 21
}
}
]
},
{
"stableId": 5,
"parentKind": 3,
"kind": 25,
"storage": 1,
"ranges": [
{
"start": {
"line": 8,
"character": 25
},
"end": {
"line": 8,
"character": 26
}
},
{
"start": {
"line": 9,
"character": 4
},
"end": {
"line": 9,
"character": 5
}
}
]
},
{
"stableId": 4,
"parentKind": 0,
"kind": 16,
"storage": 0,
"ranges": [
{
"start": {
"line": 8,
"character": 7
},
"end": {
"line": 8,
"character": 10
}
}
]
},
{
"stableId": 0,
"parentKind": 0,
"kind": 7,
"storage": 0,
"ranges": [
{
"start": {
"line": 1,
"character": 7
},
"end": {
"line": 1,
"character": 17
}
},
{
"start": {
"line": 2,
"character": 2
},
"end": {
"line": 2,
"character": 12
}
},
{
"start": {
"line": 8,
"character": 11
},
"end": {
"line": 8,
"character": 21
}
},
{
"start": {
"line": 10,
"character": 4
},
"end": {
"line": 10,
"character": 14
}
}
]
}
]
}
} |
For nvim, the API |
For C++ on Neovim it's possible to use chromatica which basically does the requesting task. The issue is also related to #383 respectively. |
I'll close this one as semantic highlighting is now supported. |
Is there a plan for supporting cquery highlight?
The text was updated successfully, but these errors were encountered: