(overrides: KeymapOverrides)
| 173 | } |
| 174 | |
| 175 | function syncVimKeymaps(overrides: KeymapOverrides): void { |
| 176 | const mappings: Array<{ id: KeymapId; action: string; bindings: string[] }> = [ |
| 177 | { |
| 178 | id: 'vim.goToDefinition', |
| 179 | action: 'goToDefinition', |
| 180 | bindings: [toVimSequence(getKeymapBinding(overrides, 'vim.goToDefinition'))].filter( |
| 181 | (binding): binding is string => !!binding |
| 182 | ) |
| 183 | }, |
| 184 | { |
| 185 | id: 'vim.paneFocusLeft', |
| 186 | action: 'focusPaneLeft', |
| 187 | bindings: paneMapBindings(overrides, 'vim.paneFocusLeft') |
| 188 | }, |
| 189 | { |
| 190 | id: 'vim.paneFocusDown', |
| 191 | action: 'focusPaneDown', |
| 192 | bindings: paneMapBindings(overrides, 'vim.paneFocusDown') |
| 193 | }, |
| 194 | { |
| 195 | id: 'vim.paneFocusUp', |
| 196 | action: 'focusPaneUp', |
| 197 | bindings: paneMapBindings(overrides, 'vim.paneFocusUp') |
| 198 | }, |
| 199 | { |
| 200 | id: 'vim.paneFocusRight', |
| 201 | action: 'focusPaneRight', |
| 202 | bindings: paneMapBindings(overrides, 'vim.paneFocusRight') |
| 203 | }, |
| 204 | { |
| 205 | id: 'vim.bufferPrevious', |
| 206 | action: 'previousBuffer', |
| 207 | bindings: [toVimSequence(getKeymapBinding(overrides, 'vim.bufferPrevious'))].filter( |
| 208 | (binding): binding is string => !!binding |
| 209 | ) |
| 210 | }, |
| 211 | { |
| 212 | id: 'vim.bufferNext', |
| 213 | action: 'nextBuffer', |
| 214 | bindings: [toVimSequence(getKeymapBinding(overrides, 'vim.bufferNext'))].filter( |
| 215 | (binding): binding is string => !!binding |
| 216 | ) |
| 217 | }, |
| 218 | { |
| 219 | id: 'vim.tabPrevious', |
| 220 | action: 'previousBuffer', |
| 221 | bindings: [toVimSequence(getKeymapBinding(overrides, 'vim.tabPrevious'))].filter( |
| 222 | (binding): binding is string => !!binding |
| 223 | ) |
| 224 | }, |
| 225 | { |
| 226 | id: 'vim.tabNext', |
| 227 | action: 'nextBuffer', |
| 228 | bindings: [toVimSequence(getKeymapBinding(overrides, 'vim.tabNext'))].filter( |
| 229 | (binding): binding is string => !!binding |
| 230 | ) |
| 231 | }, |
| 232 | { |
no test coverage detected