refactor: rename vim.highlight => vim.hl

Problem:
- `vim.highlight` module does not follow `:help dev-name-common`, which
  documents the name for "highlight" as "hl".
- Shorter names are usually preferred.

Solution:
Rename `vim.highlight` to `vim.hl`.

This is not a breaking change until 2.0 (or maybe never).
This commit is contained in:
Justin M. Keyes
2024-10-17 11:16:16 +02:00
parent 960fdc775a
commit 18b43c331d
15 changed files with 53 additions and 51 deletions

View File

@ -2,7 +2,6 @@ local protocol = require('vim.lsp.protocol')
local validate = vim.validate
local api = vim.api
local list_extend = vim.list_extend
local highlight = vim.highlight
local uv = vim.uv
local M = {}
@ -1716,13 +1715,13 @@ do --[[ References ]]
[protocol.DocumentHighlightKind.Write] = 'LspReferenceWrite',
}
local kind = reference['kind'] or protocol.DocumentHighlightKind.Text
highlight.range(
vim.hl.range(
bufnr,
reference_ns,
document_highlight_kind[kind],
{ start_line, start_idx },
{ end_line, end_idx },
{ priority = vim.highlight.priorities.user }
{ priority = vim.hl.priorities.user }
)
end
end