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

@ -32,7 +32,7 @@ for k, v in pairs({
func = true,
F = true,
lsp = true,
highlight = true,
hl = true,
diagnostic = true,
keymap = true,
ui = true,
@ -1197,4 +1197,7 @@ require('vim._options')
---@deprecated
vim.loop = vim.uv
-- Deprecated. Remove at Nvim 2.0
vim.highlight = vim._defer_deprecated_module('vim.highlight', 'vim.hl')
return vim