Commit ae59f133 authored by Mark Nauwelaerts's avatar Mark Nauwelaerts
Browse files

lspclient: no need to auto add parenthesis if the next character is such already

parent f82159c8
......@@ -347,7 +347,8 @@ public:
const auto &m =;
// 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("()");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment