mirror of
https://github.com/c-cube/linol.git
synced 2025-12-06 11:15:46 -05:00
methods for codelens handling
This commit is contained in:
parent
28fc622cbe
commit
47da02e18c
1 changed files with 15 additions and 2 deletions
|
|
@ -123,6 +123,16 @@ module Make(IO : IO) = struct
|
|||
method on_req_definition ~uri:_ ~pos:_ (_ : doc_state) : Locations.t option IO.t =
|
||||
IO.return None
|
||||
|
||||
(** List code lenses for the given document
|
||||
@since NEXT_RELEASE *)
|
||||
method on_req_code_lens ~uri:_ (_ : doc_state) : CodeLens.t list IO.t =
|
||||
IO.return []
|
||||
|
||||
(** Code lens resolution, must return a code lens with non null "command"
|
||||
@since NEXT_RELEASE *)
|
||||
method on_req_code_lens_resolve (cl:CodeLens.t) : CodeLens.t IO.t =
|
||||
IO.return cl
|
||||
|
||||
method on_request
|
||||
: type r. r Lsp.Client_request.t -> r IO.t
|
||||
= fun (r:_ Lsp.Client_request.t) ->
|
||||
|
|
@ -138,10 +148,13 @@ module Make(IO : IO) = struct
|
|||
| Lsp.Client_request.TextDocumentDefinition { textDocument; position } ->
|
||||
let doc_st = Hashtbl.find docs textDocument.uri in
|
||||
self#on_req_definition ~uri:textDocument.uri ~pos:position doc_st
|
||||
| Lsp.Client_request.TextDocumentCodeLens {textDocument} ->
|
||||
let doc_st = Hashtbl.find docs textDocument.uri in
|
||||
self#on_req_code_lens ~uri:textDocument.uri doc_st
|
||||
| Lsp.Client_request.TextDocumentCodeLensResolve cl ->
|
||||
self#on_req_code_lens_resolve cl
|
||||
| Lsp.Client_request.TextDocumentDeclaration _
|
||||
| Lsp.Client_request.TextDocumentTypeDefinition _
|
||||
| Lsp.Client_request.TextDocumentCodeLens _
|
||||
| Lsp.Client_request.TextDocumentCodeLensResolve _
|
||||
| Lsp.Client_request.TextDocumentPrepareRename _
|
||||
| Lsp.Client_request.TextDocumentRename _
|
||||
| Lsp.Client_request.TextDocumentLink _
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue