Skip to content

Commit

Permalink
feature(lsp): add [Text_document.position_encoding]
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>

<!-- ps-id: 9413bb7e-a17a-43cd-bc7b-d7eb40b91bd6 -->
  • Loading branch information
rgrinberg committed Apr 30, 2023
1 parent 07ba12b commit ee6cc02
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lsp/src/text_document.ml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ type t =
; position_encoding : [ `UTF8 | `UTF16 ]
}

let position_encoding t = t.position_encoding

let make ~position_encoding
{ DidOpenTextDocumentParams.textDocument =
{ TextDocumentItem.languageId; text; uri; version }
Expand Down
2 changes: 2 additions & 0 deletions lsp/src/text_document.mli
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ val languageId : t -> string

val documentUri : t -> Uri0.t

val position_encoding : t -> [ `Utf16 | `Utf8 ]

val version : t -> int

val text : t -> string
Expand Down

0 comments on commit ee6cc02

Please sign in to comment.