mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-11-23 20:56:42 +00:00
refactor: simplify and document lsp_typst_boundary crate (#1049)
This commit is contained in:
parent
5db1cf984a
commit
497a1e0aea
18 changed files with 205 additions and 233 deletions
|
|
@ -389,7 +389,7 @@ impl Tokenizer {
|
|||
range,
|
||||
} = token;
|
||||
|
||||
use crate::typst_to_lsp;
|
||||
use crate::lsp_typst_boundary;
|
||||
use lsp_types::Position;
|
||||
let utf8_start = range.start;
|
||||
if self.pos_offset > utf8_start {
|
||||
|
|
@ -404,7 +404,7 @@ impl Tokenizer {
|
|||
return;
|
||||
}
|
||||
|
||||
let position = typst_to_lsp::offset_to_position(utf8_start, self.encoding, &self.source);
|
||||
let position = lsp_typst_boundary::to_lsp_position(utf8_start, self.encoding, &self.source);
|
||||
|
||||
let delta = self.curr_pos.delta(&position);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue