I fixed a bug that introduced in previous PR, which caused textDocument/definition method cannot return the correct place for the symbol whose definition is in another file.
It basically change the code in get-definition
(start/end->range this-doc start end)
to
(start/end->range doc-text start end)
The a lot of changes happen because doc-text is a lsp-editor% object, not a Doc struct, it can't use Doc method.
I also want to push to gradually use internal structs which use contract to make sure they are compatible with lsp specification types.
These structs can also convert from/to jsexpr when necessary. This would avoid the need to build jsexpr everywhere.
I fixed a bug that introduced in previous PR, which caused
textDocument/definition
method cannot return the correct place for the symbol whose definition is in another file.It basically change the code in
get-definition
to
The a lot of changes happen because
doc-text
is alsp-editor%
object, not aDoc
struct, it can't useDoc
method.I also want to push to gradually use internal structs which use contract to make sure they are compatible with lsp specification types. These structs can also convert from/to jsexpr when necessary. This would avoid the need to build jsexpr everywhere.