Skip to content
GitLab
Menu
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
68f141de
Commit
68f141de
authored
May 16, 2021
by
Waqar Ahmed
Browse files
Send more client capabilities, rust-analyzer doesn't work otherwise
parent
a3599907
Changes
1
Hide whitespace changes
Inline
Side-by-side
addons/lspclient/lspclientserver.cpp
View file @
68f141de
...
...
@@ -727,6 +727,16 @@ static QList<LSPCodeAction> parseCodeAction(const QJsonValue &result)
return
ret
;
}
static
QJsonArray
supportedSemanticTokenTypes
()
{
return
QJsonArray
({
QStringLiteral
(
"namespace"
),
QStringLiteral
(
"type"
),
QStringLiteral
(
"class"
),
QStringLiteral
(
"enum"
),
QStringLiteral
(
"interface"
),
QStringLiteral
(
"struct"
),
QStringLiteral
(
"typeParameter"
),
QStringLiteral
(
"parameter"
),
QStringLiteral
(
"variable"
),
QStringLiteral
(
"property"
),
QStringLiteral
(
"enumMember"
),
QStringLiteral
(
"event"
),
QStringLiteral
(
"function"
),
QStringLiteral
(
"method"
),
QStringLiteral
(
"macro"
),
QStringLiteral
(
"keyword"
),
QStringLiteral
(
"modifier"
),
QStringLiteral
(
"comment"
),
QStringLiteral
(
"string"
),
QStringLiteral
(
"number"
),
QStringLiteral
(
"regexp"
),
QStringLiteral
(
"operator"
)});
}
static
LSPSemanticTokens
parseSemanticTokens
(
const
QJsonValue
&
result
)
{
LSPSemanticTokens
ret
;
...
...
@@ -1128,7 +1138,11 @@ private:
{
QStringLiteral
(
"range"
),
false
},
{
QStringLiteral
(
"full"
),
QJsonObject
{{
QStringLiteral
(
"delta"
),
true
}}}
}
}};
},
{
QStringLiteral
(
"tokenTypes"
),
supportedSemanticTokenTypes
()},
{
QStringLiteral
(
"tokenModifiers"
),
QJsonArray
()},
{
QStringLiteral
(
"formats"
),
QJsonArray
({
QStringLiteral
(
"relative"
)})},
};
QJsonObject
capabilities
{{
QStringLiteral
(
"textDocument"
),
QJsonObject
{{
QStringLiteral
(
"documentSymbol"
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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