Support custom locations request#587
Conversation
Shane-XB-Qian
left a comment
There was a problem hiding this comment.
try the instr in 'lsp-cfg-customRequestHandlers', maybe that is your need.
|
or if you just want to ignore some custom, then refer #386 |
|
@Shane-XB-Qian I want to use custom locations, not to ignore them. Can we specify a lsp server by name? For example, |
|
yes, you can customized add your request handler too, please check that example: in doc, or if not fit, then maybe need to refine this custom filter code. |
|
|
|
Since custom command is only available in certain lsp server, I added |
|
`lsp-custom-commands` is about handling command **from server to client**.
This PR is about sending command **from client to server**.
ohh, seems there is `CreateRequest()` func, but never used before, maybe didnot expect custom msg from client to server,
so i donot know if should support or how to make it support better, e.g something like the one from server to client?
…--
shane.xb.qian
|
|
|
|
yes, i mean if like to support this feat, maybe began to use this CreateRequest() to constructs request. |
Shane-XB-Qian
left a comment
There was a problem hiding this comment.
yegappan accepted your PR, though maybe some tiny flaw, but not a big deal, it's ok.
//similar like others PR i reviewed here today, you maybe can refine it in the future..
|
|
||
| # Result: Location[] | null | ||
| if reply->empty() || reply.result->empty() | ||
| util.WarnMsg('No references found') |
There was a problem hiding this comment.
according to your example in the OP, looks your custom msg were not all for references, but do location related things, so:
- the description here and next
symbol.ShowLocationslooks not accurate? - for now so-called 'custom request' actually only for 'location' related things.
This feature is for lsp server with custom locations request(e.g. ccls). It's similar to CocLocations in coc.nvim.
Example config for ccls