|
7 | 7 | -- copyright 2023 |
8 | 8 | -- GNU General Public License v3.0 |
9 | 9 |
|
| 10 | +---@class AstroCoreMapping: vim.api.keyset.keymap |
| 11 | +---@field [1] string|function rhs of keymap |
| 12 | +---@field name string? optional which-key mapping name |
| 13 | + |
| 14 | +---@alias AstroCoreMappings table<string,table<string,(AstroCoreMapping|string|false)?>?> |
| 15 | + |
| 16 | +---@class AstroCoreCommand: vim.api.keyset.user_command |
| 17 | +---@field [1] string|function the command to execute |
| 18 | + |
| 19 | +---@class AstroCoreAutocmd: vim.api.keyset.create_autocmd |
| 20 | +---@field event string|string[] Event(s) that will trigger the handler |
| 21 | + |
10 | 22 | ---@class AstroCoreGitWorktree |
11 | 23 | ---@field toplevel string the top level directory |
12 | 24 | ---@field gitdir string the location of the git directory |
|
85 | 97 | --- } |
86 | 98 | ---} |
87 | 99 | ---``` |
88 | | ----@field autocmds table<string,table[]|false>? |
| 100 | +---@field autocmds table<string,AstroCoreAutocmd[]|false>? |
89 | 101 | ---Configuration of user commands |
90 | 102 | ---The key into the table is the name of the user command and the value is a table of command options |
91 | 103 | ---Example: |
|
101 | 113 | --- } |
102 | 114 | ---} |
103 | 115 | ---``` |
104 | | ----@field commands table<string,table|false>? |
| 116 | +---@field commands table<string,AstroCoreCommand|false>? |
105 | 117 | ---Configuration of vim mappings to create. |
106 | 118 | ---The first key into the table is the vim map mode (`:h map-modes`), and the value is a table of entries to be passed to `vim.keymap.set` (`:h vim.keymap.set`): |
107 | 119 | --- - The key is the first parameter or the vim mode (only a single mode supported) and the value is a table of keymaps within that mode: |
|
133 | 145 | --- } |
134 | 146 | ---} |
135 | 147 | ---``` |
136 | | ----@field mappings table<string,table<string,(table|string|false)?>?>? |
| 148 | +---@field mappings AstroCoreMappings? |
137 | 149 | ---@field _map_sections table<string,{ desc: string?, name: string? }>? |
138 | 150 | ---Configuration of vim `on_key` functions. |
139 | 151 | ---The key into the table is the namespace of the function and the value is a list like table of `on_key` functions |
|
0 commit comments