mirror of
https://github.com/folke/snacks.nvim
synced 2025-07-07 13:15:08 +00:00
99 lines
3.1 KiB
Text
99 lines
3.1 KiB
Text
*snacks-words* snacks_words
|
|
|
|
==============================================================================
|
|
Table of Contents *snacks-words-table-of-contents*
|
|
|
|
1. Setup |snacks-words-setup|
|
|
2. Config |snacks-words-config|
|
|
3. Module |snacks-words-module|
|
|
- Snacks.words.clear() |snacks-words-module-snacks.words.clear()|
|
|
- Snacks.words.disable() |snacks-words-module-snacks.words.disable()|
|
|
- Snacks.words.enable() |snacks-words-module-snacks.words.enable()|
|
|
- Snacks.words.is_enabled() |snacks-words-module-snacks.words.is_enabled()|
|
|
- Snacks.words.jump() |snacks-words-module-snacks.words.jump()|
|
|
Auto-show LSP references and quickly navigate between them
|
|
|
|
|
|
==============================================================================
|
|
1. Setup *snacks-words-setup*
|
|
|
|
>lua
|
|
-- lazy.nvim
|
|
{
|
|
"folke/snacks.nvim",
|
|
---@type snacks.Config
|
|
opts = {
|
|
words = {
|
|
-- your words configuration comes here
|
|
-- or leave it empty to use the default settings
|
|
-- refer to the configuration section below
|
|
}
|
|
}
|
|
}
|
|
<
|
|
|
|
|
|
==============================================================================
|
|
2. Config *snacks-words-config*
|
|
|
|
>lua
|
|
---@class snacks.words.Config
|
|
---@field enabled? boolean
|
|
{
|
|
debounce = 200, -- time in ms to wait before updating
|
|
notify_jump = false, -- show a notification when jumping
|
|
notify_end = true, -- show a notification when reaching the end
|
|
foldopen = true, -- open folds after jumping
|
|
jumplist = true, -- set jump point before jumping
|
|
modes = { "n", "i", "c" }, -- modes to show references
|
|
filter = function(buf) -- what buffers to enable `snacks.words`
|
|
return vim.g.snacks_words ~= false and vim.b[buf].snacks_words ~= false
|
|
end,
|
|
}
|
|
<
|
|
|
|
|
|
==============================================================================
|
|
3. Module *snacks-words-module*
|
|
|
|
|
|
`Snacks.words.clear()` *Snacks.words.clear()*
|
|
|
|
>lua
|
|
Snacks.words.clear()
|
|
<
|
|
|
|
|
|
`Snacks.words.disable()` *Snacks.words.disable()*
|
|
|
|
>lua
|
|
Snacks.words.disable()
|
|
<
|
|
|
|
|
|
`Snacks.words.enable()` *Snacks.words.enable()*
|
|
|
|
>lua
|
|
Snacks.words.enable()
|
|
<
|
|
|
|
|
|
`Snacks.words.is_enabled()` *Snacks.words.is_enabled()*
|
|
|
|
>lua
|
|
---@param opts? number|{buf?:number, modes:boolean} if modes is true, also check if the current mode is enabled
|
|
Snacks.words.is_enabled(opts)
|
|
<
|
|
|
|
|
|
`Snacks.words.jump()` *Snacks.words.jump()*
|
|
|
|
>lua
|
|
---@param count? number
|
|
---@param cycle? boolean
|
|
Snacks.words.jump(count, cycle)
|
|
<
|
|
|
|
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>
|
|
|
|
vim:tw=78:ts=8:noet:ft=help:norl:
|