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
7214f460
Commit
7214f460
authored
Jun 13, 2020
by
Mark Nauwelaerts
Browse files
lspclient: support error handling for documentSymbols request
parent
d6f057a6
Changes
2
Hide whitespace changes
Inline
Side-by-side
addons/lspclient/lspclientserver.cpp
View file @
7214f460
...
...
@@ -1097,10 +1097,10 @@ public:
}
}
RequestHandle
documentSymbols
(
const
QUrl
&
document
,
const
GenericReplyHandler
&
h
)
RequestHandle
documentSymbols
(
const
QUrl
&
document
,
const
GenericReplyHandler
&
h
,
const
GenericReplyHandler
&
eh
)
{
auto
params
=
textDocumentParams
(
document
);
return
send
(
init_request
(
QStringLiteral
(
"textDocument/documentSymbol"
),
params
),
h
);
return
send
(
init_request
(
QStringLiteral
(
"textDocument/documentSymbol"
),
params
),
h
,
eh
);
}
RequestHandle
documentDefinition
(
const
QUrl
&
document
,
const
LSPPosition
&
pos
,
const
GenericReplyHandler
&
h
)
...
...
@@ -1342,9 +1342,9 @@ int LSPClientServer::cancel(int reqid)
return
d
->
cancel
(
reqid
);
}
LSPClientServer
::
RequestHandle
LSPClientServer
::
documentSymbols
(
const
QUrl
&
document
,
const
QObject
*
context
,
const
DocumentSymbolsReplyHandler
&
h
)
LSPClientServer
::
RequestHandle
LSPClientServer
::
documentSymbols
(
const
QUrl
&
document
,
const
QObject
*
context
,
const
DocumentSymbolsReplyHandler
&
h
,
const
ErrorReplyHandler
&
eh
)
{
return
d
->
documentSymbols
(
document
,
make_handler
(
h
,
context
,
parseDocumentSymbols
));
return
d
->
documentSymbols
(
document
,
make_handler
(
h
,
context
,
parseDocumentSymbols
)
,
make_handler
(
eh
,
context
,
parseResponseError
)
);
}
LSPClientServer
::
RequestHandle
LSPClientServer
::
documentDefinition
(
const
QUrl
&
document
,
const
LSPPosition
&
pos
,
const
QObject
*
context
,
const
DocumentDefinitionReplyHandler
&
h
)
...
...
addons/lspclient/lspclientserver.h
View file @
7214f460
...
...
@@ -120,7 +120,7 @@ public:
const
LSPServerCapabilities
&
capabilities
()
const
;
// language
RequestHandle
documentSymbols
(
const
QUrl
&
document
,
const
QObject
*
context
,
const
DocumentSymbolsReplyHandler
&
h
);
RequestHandle
documentSymbols
(
const
QUrl
&
document
,
const
QObject
*
context
,
const
DocumentSymbolsReplyHandler
&
h
,
const
ErrorReplyHandler
&
eh
=
nullptr
);
RequestHandle
documentDefinition
(
const
QUrl
&
document
,
const
LSPPosition
&
pos
,
const
QObject
*
context
,
const
DocumentDefinitionReplyHandler
&
h
);
RequestHandle
documentDeclaration
(
const
QUrl
&
document
,
const
LSPPosition
&
pos
,
const
QObject
*
context
,
const
DocumentDefinitionReplyHandler
&
h
);
RequestHandle
documentHighlight
(
const
QUrl
&
document
,
const
LSPPosition
&
pos
,
const
QObject
*
context
,
const
DocumentHighlightReplyHandler
&
h
);
...
...
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