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
ae59f133
Commit
ae59f133
authored
May 10, 2021
by
Mark Nauwelaerts
Browse files
lspclient: no need to auto add parenthesis if the next character is such already
parent
f82159c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
addons/lspclient/lspclientcompletion.cpp
View file @
ae59f133
...
...
@@ -347,7 +347,8 @@ public:
const
auto
&
m
=
m_matches
.
at
(
index
.
row
());
// add parentheses if function and guestimated meaningful for language in question
// this covers at least the common cases such as clangd, python, etc
bool
addParens
=
m_complParens
&&
isFunctionKind
(
m
.
kind
)
&&
m_triggersSignature
.
contains
(
QLatin1Char
(
'('
));
// also no need to add one if the next char is already
bool
addParens
=
m_complParens
&&
next
!=
QLatin1Char
(
'('
)
&&
isFunctionKind
(
m
.
kind
)
&&
m_triggersSignature
.
contains
(
QLatin1Char
(
'('
));
if
(
addParens
)
{
matching
+=
QStringLiteral
(
"()"
);
}
...
...
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