refactor(lsp): rename offset_encoding to position_encoding #31286

Problem:
LSP spec uses the term "position encoding" where we say "offset encoding".

Solution:
- Rename it everywhere except `vim.lsp.Client.offset_encoding` (which would be breaking).
- Mention "position encoding" in the documentation for `vim.lsp.Client.offset_encoding`.
This commit is contained in:
Yi Ming
2024-11-26 00:06:05 +08:00
committed by GitHub
parent a811d4babd
commit 165b099fa3
12 changed files with 188 additions and 175 deletions

View File

@@ -118,9 +118,9 @@ describe('luacats grammar', function()
type = '"rfc2396" | "rfc2732" | "rfc3986" | nil',
})
test('@param offset_encoding "utf-8" | "utf-16" | "utf-32" | nil', {
test('@param position_encoding "utf-8" | "utf-16" | "utf-32" | nil', {
kind = 'param',
name = 'offset_encoding',
name = 'position_encoding',
type = '"utf-8" | "utf-16" | "utf-32" | nil',
})