aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2024-10-20 16:44:39 -0700
committerGitHub <noreply@github.com>2024-10-20 16:44:39 -0700
commit86832dcd1922eee37acc26310f72aa70def1514b (patch)
treed9db0de1011d6b495e62e7a2a90d46de97f06996 /runtime/doc
parent8c2d45be77299d6eb70165697bc5c29898cdb25e (diff)
parent18b43c331d8a0ed87d7cbefe2a18543b8e4ad360 (diff)
downloadrneovim-86832dcd1922eee37acc26310f72aa70def1514b.tar.gz
rneovim-86832dcd1922eee37acc26310f72aa70def1514b.tar.bz2
rneovim-86832dcd1922eee37acc26310f72aa70def1514b.zip
Merge #30840 from justinmk/renamehl
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/deprecated.txt1
-rw-r--r--runtime/doc/lsp.txt6
-rw-r--r--runtime/doc/lua-guide.txt4
-rw-r--r--runtime/doc/lua.txt17
-rw-r--r--runtime/doc/vim_diff.txt2
5 files changed, 15 insertions, 15 deletions
diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt
index ace509845a..7a3e2664c2 100644
--- a/runtime/doc/deprecated.txt
+++ b/runtime/doc/deprecated.txt
@@ -21,6 +21,7 @@ API
LUA
- vim.region() Use |getregionpos()| instead.
+- *vim.highlight* Renamed to |vim.hl|.
DIAGNOSTICS
- *vim.diagnostic.goto_next()* Use |vim.diagnostic.jump()| with `{count=1, float=true}` instead.
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
index f601ffab4c..c2410526e7 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -464,7 +464,7 @@ Use |:Inspect| to view the highlights for a specific token. Use |:hi| or
hi @lsp.mod.deprecated gui=strikethrough " deprecated is crossed out
hi @lsp.typemod.function.async guifg=Blue " async functions are blue
<
-The value |vim.highlight.priorities|`.semantic_tokens` is the priority of the
+The value |vim.hl.priorities|`.semantic_tokens` is the priority of the
`@lsp.type.*` highlights. The `@lsp.mod.*` and `@lsp.typemod.*` highlights
have priorities one and two higher, respectively.
@@ -1780,8 +1780,8 @@ highlight_token({token}, {bufnr}, {client_id}, {hl_group}, {opts})
• {hl_group} (`string`) Highlight group name
• {opts} (`table?`) Optional parameters:
• {priority}? (`integer`, default:
- `vim.highlight.priorities.semantic_tokens + 3`)
- Priority for the applied extmark.
+ `vim.hl.priorities.semantic_tokens + 3`) Priority for
+ the applied extmark.
start({bufnr}, {client_id}, {opts}) *vim.lsp.semantic_tokens.start()*
Start the semantic token highlighting engine for the given buffer with the
diff --git a/runtime/doc/lua-guide.txt b/runtime/doc/lua-guide.txt
index 5f06d51f42..b40d5a0791 100644
--- a/runtime/doc/lua-guide.txt
+++ b/runtime/doc/lua-guide.txt
@@ -552,7 +552,7 @@ This means that if your callback itself takes an (even optional) argument, you
must wrap it in `function() end` to avoid an error:
>lua
vim.api.nvim_create_autocmd('TextYankPost', {
- callback = function() vim.highlight.on_yank() end
+ callback = function() vim.hl.on_yank() end
})
<
(Since unused arguments can be omitted in Lua function definitions, this is
@@ -576,7 +576,7 @@ Instead of using a pattern, you can create a buffer-local autocommand (see
Similarly to mappings, you can (and should) add a description using `desc`:
>lua
vim.api.nvim_create_autocmd('TextYankPost', {
- callback = function() vim.highlight.on_yank() end,
+ callback = function() vim.hl.on_yank() end,
desc = "Briefly highlight yanked text"
})
<
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index aba1ef476b..280e9ebf79 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -636,13 +636,13 @@ A subset of the `vim.*` API is available in threads. This includes:
==============================================================================
-VIM.HIGHLIGHT *vim.highlight*
+VIM.HL *vim.hl*
-vim.highlight.on_yank({opts}) *vim.highlight.on_yank()*
+vim.hl.on_yank({opts}) *vim.hl.on_yank()*
Highlight the yanked text during a |TextYankPost| event.
Add the following to your `init.vim`: >vim
- autocmd TextYankPost * silent! lua vim.highlight.on_yank {higroup='Visual', timeout=300}
+ autocmd TextYankPost * silent! lua vim.hl.on_yank {higroup='Visual', timeout=300}
<
Parameters: ~
@@ -655,9 +655,9 @@ vim.highlight.on_yank({opts}) *vim.highlight.on_yank()*
true)
• event event structure (default vim.v.event)
• priority integer priority (default
- |vim.highlight.priorities|`.user`)
+ |vim.hl.priorities|`.user`)
-vim.highlight.priorities *vim.highlight.priorities*
+vim.hl.priorities *vim.hl.priorities*
Table with default priorities used for highlighting:
• `syntax`: `50`, used for standard syntax highlighting
• `treesitter`: `100`, used for treesitter-based highlighting
@@ -666,8 +666,8 @@ vim.highlight.priorities *vim.highlight.priorities*
• `user`: `200`, used for user-triggered highlights such as LSP document
symbols or `on_yank` autocommands
- *vim.highlight.range()*
-vim.highlight.range({bufnr}, {ns}, {higroup}, {start}, {finish}, {opts})
+ *vim.hl.range()*
+vim.hl.range({bufnr}, {ns}, {higroup}, {start}, {finish}, {opts})
Apply highlight group to range of text.
Parameters: ~
@@ -684,8 +684,7 @@ vim.highlight.range({bufnr}, {ns}, {higroup}, {start}, {finish}, {opts})
• {inclusive}? (`boolean`, default: `false`) Indicates
whether the range is end-inclusive
• {priority}? (`integer`, default:
- `vim.highlight.priorities.user`) Indicates priority of
- highlight
+ `vim.hl.priorities.user`) Highlight priority
==============================================================================
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index d032baf55c..78d0329b00 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -249,7 +249,7 @@ backwards-compatibility cost. Some examples:
Some features are built in that otherwise required external plugins:
-- Highlighting the yanked region, see |vim.highlight|.
+- Highlighting the yanked region, see |vim.hl|.
ARCHITECTURE