dotfiles
bugabingas dorkfiles
owned by bugabinga
neovim: fix missing keymaps in command_center
123ff6c5a6c0ef618ef69e7852166e0be1bc78b7
Oliver Jan Krylow <olver@bugabinga.net> ·
unsigned
Browse filesCompare with HEAD
Changed files (4)
neovim/ftplugin/markdown.lua
Modified 6 6 local want
= require 'bugabinga.std.want' 8 8 local map
= require 'bugabinga.std.keymap' 11 10 want {
'toggleterm.terminal' } (
function(toggleterm)
12 11 local Terminal
= toggleterm.Terminal
14 12 local file
= vim.api.nvim_buf_get_name(
0)
13 + local markdown_preview_command
= 'mdcat ' .. file
15 16 local mdcat
= Terminal:new {
16 - cmd =
'mdcat ' .. file,
17 + cmd = markdown_preview_command,
17 18 direction =
'float',
18 - float_opts = {
border =
'curved' },
19 19 start_in_insert =
false,
20 - on_open =
function(terminal)
20 + close_on_exit =
false,
25 - name =
'Open Markdown Preview',
26 - description =
'Opens a preview of the current markdown buffer in a terminal.',
24 + description =
'Opens a preview of the current markdown buffer.',
27 25 category = map.CATEGORY.MARKDOWN,
28 26 mode = map.MODE.NORMAL,
27 + keys =
'<LEADER>mp',
30 28 command =
function()
neovim/lua/bugabinga/plugins/init.lua
Modified 58 58 'lukas-reineke/indent-blankline.nvim',
60 60 'booperlv/nvim-gomove',
62 64 'rockerBOO/boo-colorscheme-nvim',
neovim/lua/bugabinga/std/keymap.lua
Modified 1 1 local want
= require 'bugabinga.std.want' 2 2 local bind
= want {
'command_center' } (
function(command_center)
4 - map.visible
= map.visible
or true 4 + map.visible
= map.visible
== nil or map.visible
5 5 map.options
= map.options
or {}
6 6 local options
= vim.tbl_extend(
'keep', map.options, {
silent =
true })
10 - description = map.description,
11 - category = map.category,
13 - keybindings = { map.mode, map.keys, options },
14 - }, command_center.mode.ADD_ONLY)
10 + description = map.description,
11 + category = map.category,
13 + keybindings = { map.mode, map.keys, options },
15 + }, command_center.mode.ADD_ONLY)
40 41 NAVIGATION
= 'navigation',
44 - __call =
function(_,
...)
return bind(
...)
end,
45 + __call =
function(_,
...)