]> git.r.bdr.sh - rbdr/oleoboard.nvim/blame_incremental - plugin/oleoboard.lua
Update README
[rbdr/oleoboard.nvim] / plugin / oleoboard.lua
... / ...
CommitLineData
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
6local api = vim.api
7local fs = vim.loop
8local fn = vim.fs
9
10if not api.nvim_create_user_command then
11 return
12end
13
14local command = api.nvim_create_user_command
15
16local configuration = require('oleoboard.configuration').configuration
17
18if configuration.default_keybinds then
19 require('oleoboard.keybinds').bind()
20end
21
22-- Note Handling Commands
23command('OleoBoardToggle', function(options) require('oleoboard.board').toggle(options.args) end, { nargs = '?' })
24command('OleoBoardMoveEntryRight', function() require('oleoboard.board').move_entry_right() end, { nargs = 0 })
25command('OleoBoardMoveEntryLeft', function() require('oleoboard.board').move_entry_left() end, { nargs = 0 })
26command('OleoBoardMoveColumnRight', function() require('oleoboard.board').move_column_right() end, { nargs = 0 })
27command('OleoBoardMoveColumnLeft', function() require('oleoboard.board').move_column_left() end, { nargs = 0 })