]> git.r.bdr.sh - rbdr/oleoboard.nvim/blob - plugin/oleoboard.lua
Update README
[rbdr/oleoboard.nvim] / plugin / oleoboard.lua
1 --- @type tOleoBoardConfiguration
2 -- @field [default_keybinds] boolean whether to use the default key bindings or not. Defaults to true.
3
4 --- Sets up the Oleoboard commands and keybins
5 -- @param user_configuration tOleoBoardConfiguration the user provided configuration for the plugin
6 local api = vim.api
7 local fs = vim.loop
8 local fn = vim.fs
9
10 if not api.nvim_create_user_command then
11 return
12 end
13
14 local command = api.nvim_create_user_command
15
16 local configuration = require('oleoboard.configuration').configuration
17
18 if configuration.default_keybinds then
19 require('oleoboard.keybinds').bind()
20 end
21
22 -- Note Handling Commands
23 command('OleoBoardToggle', function(options) require('oleoboard.board').toggle(options.args) end, { nargs = '?' })
24 command('OleoBoardMoveEntryRight', function() require('oleoboard.board').move_entry_right() end, { nargs = 0 })
25 command('OleoBoardMoveEntryLeft', function() require('oleoboard.board').move_entry_left() end, { nargs = 0 })
26 command('OleoBoardMoveColumnRight', function() require('oleoboard.board').move_column_right() end, { nargs = 0 })
27 command('OleoBoardMoveColumnLeft', function() require('oleoboard.board').move_column_left() end, { nargs = 0 })