Skip to content

Commit

Permalink
chore: auto-generate vimdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgrieser committed Dec 6, 2024
1 parent 5bac039 commit a0bc973
Showing 1 changed file with 35 additions and 24 deletions.
59 changes: 35 additions & 24 deletions doc/nvim-various-textobjs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,22 @@ table above for you.
{
"chrisgrieser/nvim-various-textobjs",
event = "VeryLazy",
opts = { useDefaultKeymaps = true },
opts = {
keymaps = {
useDefaults = true
}
},
},

-- packer
use {
"chrisgrieser/nvim-various-textobjs",
config = function ()
require("various-textobjs").setup({ useDefaultKeymaps = true })
require("various-textobjs").setup({
keymaps = {
useDefaults = true
}
})
end,
}
<
Expand All @@ -210,27 +218,30 @@ own keymaps.
<


[!TIP] You can also use the `disabledKeymaps` config option to disable only
_some_ default keymaps.
[!TIP] You can also use the `keymaps.disabledDefaults` config option to disable
only _some_ default keymaps.

CONFIGURATION *nvim-various-textobjs-nvim-various-textobjs--configuration*


OPTIONS ~

The `.setup()` call is optional if you are fine with the defaults below.
The `.setup()` call is optional if you do not want to use the default keymaps.

>lua
-- default config
require("various-textobjs").setup {
-- See overview table in README for the defaults keymaps.
-- (Note that lazy-loading this plugin, the default keymaps cannot be set up.
-- if you set this to `true`, you thus need to add `lazy = false` to your
-- lazy.nvim config.)
useDefaultKeymaps = false,
keymaps = {
-- See overview table in README for the defaults. (Note that lazy-loading
-- this plugin, the default keymaps cannot be set up. if you set this to
-- `true`, you thus need to add `lazy = false` to your lazy.nvim config.)
useDefaults = false,

---@type string[]
disabledKeymaps = {}, -- disable only some default keymaps, e.g. { "ai", "ii" }
-- disable only some default keymaps, for example { "ai", "!" }
-- (only relevant when you set `useDefaults = true`)
---@type string[]
disabledDefaults = {},
},

-- Number of lines to seek forwards for a text object. See the overview table
-- in the README for which text object uses which value.
Expand All @@ -239,26 +250,26 @@ The `.setup()` call is optional if you are fine with the defaults below.
big = 15,
},

notify = {
icon = "󰠱", -- only used with notification plugins like `nvim-notify`
whenObjectNotFound = true,
},

-- extra configuration for specific text objects
textobjs = {
indentation = {
-- `false`: only indentation changes delimit the text object
-- `true`: indentation changes as well as blanks delimit the text object
-- `true`: indentation changes as well as blank lines delimit the text object
blanksAreDelimiter = false,
},
diagnostic = {
wrap = true,
},
subword = {
-- When deleting the start of a camelCased word, the result should
-- still be camelCased and not PascalCased (see #113).
noCamelToPascalCase = true,
},
diagnostic = {
wrap = true,
},
},

notify = {
icon = "󰠱", -- only used with notification plugins like `nvim-notify`
whenObjectNotFound = true,
},
}
<
Expand All @@ -272,8 +283,8 @@ from the |nvim-various-textobjs-overview-table|.


[!NOTE] For dot-repeat to work, you have to call the motions as Ex-commands.
When using `function() require("various-textobjs").diagnostic() end` as third
argument of the keymap, dot-repeatability is not going to work.
Using `function() require("various-textobjs").diagnostic() end` as third
argument of the keymap will not work.
>lua
-- example: `U` for url textobj
vim.keymap.set({ "o", "x" }, "U", '<cmd>lua require("various-textobjs").url()<CR>')
Expand All @@ -284,7 +295,7 @@ from the |nvim-various-textobjs-overview-table|.
<

For most text objects, there is only one parameter which accepts `"inner"` or
`"outer"`. There only exceptions is the indentation text object:
`"outer"`. There only exceptions is the `indentation` text object:

>lua
-- THE INDENTATION TEXTOBJ requires two parameters, the first for
Expand Down

0 comments on commit a0bc973

Please sign in to comment.