Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Kate
Commits
454ba670
Commit
454ba670
authored
May 16, 2021
by
Waqar Ahmed
Browse files
Lsp semantic token client capabilities
Signed-off-by:
Waqar Ahmed
<
waqar.17a@gmail.com
>
parent
17b33bab
Changes
1
Hide whitespace changes
Inline
Side-by-side
addons/lspclient/lspclientserver.cpp
View file @
454ba670
...
...
@@ -19,7 +19,6 @@
#include
<QJsonObject>
#include
<QTime>
#include
<QtEndian>
#include
<iostream>
#include
<utility>
// good/bad old school; allows easier concatenate
...
...
@@ -1120,15 +1119,25 @@ private:
void
initialize
()
{
// clang-format off
QJsonObject
codeAction
{{
QStringLiteral
(
"codeActionLiteralSupport"
),
QJsonObject
{{
QStringLiteral
(
"codeActionKind"
),
QJsonObject
{{
QStringLiteral
(
"valueSet"
),
QJsonArray
()}}}}}};
QJsonObject
semanticTokens
{{
QStringLiteral
(
"requests"
),
QJsonObject
{
{
QStringLiteral
(
"range"
),
false
},
{
QStringLiteral
(
"full"
),
QJsonObject
{{
QStringLiteral
(
"delta"
),
true
}}}
}
}};
QJsonObject
capabilities
{{
QStringLiteral
(
"textDocument"
),
QJsonObject
{{
QStringLiteral
(
"documentSymbol"
),
QJsonObject
{{
QStringLiteral
(
"hierarchicalDocumentSymbolSupport"
),
true
}},
},
{
QStringLiteral
(
"publishDiagnostics"
),
QJsonObject
{{
QStringLiteral
(
"relatedInformation"
),
true
}}},
{
QStringLiteral
(
"codeAction"
),
codeAction
}}}};
{
QStringLiteral
(
"codeAction"
),
codeAction
},
{
QStringLiteral
(
"semanticTokens"
),
semanticTokens
}
}}};
// NOTE a typical server does not use root all that much,
// other than for some corner case (in) requests
QJsonObject
params
{{
QStringLiteral
(
"processId"
),
QCoreApplication
::
applicationPid
()},
...
...
@@ -1138,6 +1147,7 @@ private:
{
QStringLiteral
(
"initializationOptions"
),
m_init
}};
//
write
(
init_request
(
QStringLiteral
(
"initialize"
),
params
),
utils
::
mem_fun
(
&
self_type
::
onInitializeReply
,
this
));
// clang-format on
}
void
initialized
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment