openlawlibrary / pygls

A pythonic generic language server
https://pygls.readthedocs.io/en/latest/
Apache License 2.0
546 stars 101 forks source link

Respect client's preferred encoding when possible #446

Closed nthykier closed 3 months ago

nthykier commented 3 months ago

Description (e.g. "Related to ...", etc.)

Related to #445

This change would make pygls accept the client's preferred encoding rather than preferring UTF-16 blindly. For editors that prefer UTF-32 this is advantageous for pygls since the position encoding/decoding becomes simpler.

Code review checklist (for code reviewer to complete)

tombh commented 3 months ago

Thank you. I'll merge it now so it's available on the main branch. I won't cut a release immediately. But if you want a release soonder, please feel free to let us know.

nthykier commented 3 months ago

Thanks for the merge. No urgent need for this released. :)