hcl-lang icon indicating copy to clipboard operation
hcl-lang copied to clipboard

Move document encoding code from `hashicorp/terraform-ls` to `hashicorp/hcl-lang`

Open rcjsuen opened this issue 1 year ago • 2 comments

This library operates off of byte offsets instead of lines and columns which is the basis of many LSP requests. This effectively means that anyone adopting this library will have to calculate byte offsets before calling functions such as HoverAtPos.

From what I can tell, hashicorp/terraform-ls has internal/document/position.go and internal/lsp/position.go that performs these conversions from LSP types. Are there any plans to move those functions over here to hashicorp/hcl-lang to make people's lives easier?

rcjsuen avatar Oct 08 '24 16:10 rcjsuen