forked from openlawlibrary/pygls
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: respect client's preferred encoding when possible
Previously, `pygls` would always use `UTF-16` except when the client tried to hide the fact that it supports `UTF-16` (which the LSP spec requires it to do in all cases). Now, `pygls` will choose the editor's preferred encoding. When it is `UTF-32`, `pygls` saves a bit of computation in most position codec related operations (`X_to_client_units` + `client_num_units` are faster, `X_from_client_units` is about the same), which is great. When it is `UTF-16` or `UTF-8`, the computational load is about the same. Closes: openlawlibrary#445
- Loading branch information
Showing
2 changed files
with
27 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters