Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

negotiate position encoding (UTF-8, UTF-16, etc) with client and handle outcome #10

Open
jokeyrhyme opened this issue Sep 28, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@jokeyrhyme
Copy link
Owner

  • Rust strings are UTF-8, and JavaScript strings are UTF-16
  • during initialisation, the client provides a list of compatible encodings, and the language server selects one and sends it back
  • we've currently hard-coded UTF-8, and https://github.com/nushell/vscode-nushell-lang likely depends on the LSP default which is UTF-16
  • we need to make sure that we support clients with either encoding, and that our text-traversing logic works in both cases
@jokeyrhyme jokeyrhyme added the enhancement New feature or request label Sep 28, 2023
@jokeyrhyme jokeyrhyme changed the title negotiate position encoding (UTF-8, UTF-16, etc) with client and handle result negotiate position encoding (UTF-8, UTF-16, etc) with client and handle outcome Sep 28, 2023
@jokeyrhyme
Copy link
Owner Author

in #13 , we hard-coded use of UTF-16 instead of UTF-8, but this is still hard-coding and not negotiating

@jokeyrhyme
Copy link
Owner Author

relates to: GiveMe-A-Name/lsp-textdocument#42

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant