diff options
author | Gustaf Rydholm <gustaf@nexure.io> | 2022-10-18 11:35:46 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf@nexure.io> | 2022-10-18 11:35:46 +0200 |
commit | c84be23430181db27200d0ec6def0e23817ea88d (patch) | |
tree | 2e13945842f7286d91c63035f7e73f91653d675f /fnl/config/cmd.fnl | |
parent | f9c022399a35558fe7f997dbeab3c26d7f955992 (diff) | |
parent | e16303d85286e5661093e2029d54593e3a3481ec (diff) |
Merge branch 'master' of github.com:aktersnurra/nvim
Diffstat (limited to 'fnl/config/cmd.fnl')
-rw-r--r-- | fnl/config/cmd.fnl | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/fnl/config/cmd.fnl b/fnl/config/cmd.fnl new file mode 100644 index 0000000..20ef377 --- /dev/null +++ b/fnl/config/cmd.fnl @@ -0,0 +1,68 @@ +;; Commands for plugins. +(module config.cmd {autoload {nvim aniseed.nvim util config.util}}) + +(nvim.create_user_command :OrgAgendaPrompt + (lambda [] + (let [orgmode (util.prequire :orgmode)] + (orgmode.action :agenda.prompt))) + {:nargs 0}) + +(nvim.create_user_command :OrgCapturePrompt + (lambda [] + (let [orgmode (util.prequire :orgmode)] + (orgmode.action :capture.prompt))) + {:nargs 0}) + +(nvim.create_user_command :CommentNormal + (lambda [] + (let [comment-api (util.prequire :Comment.api)] + (comment-api.toggle.linewise.current))) + {:nargs 0}) + +(nvim.create_user_command :CommentVisual + (lambda [] + (let [comment-api (util.prequire :Comment.api)] + (comment-api.toggle.linewise (vim.fn.visualmode)))) + {:nargs 0}) + +(nvim.create_user_command :HarpoonAdd + (lambda [] + (let [harpoon (util.prequire :harpoon.mark)] + (harpoon.add_file))) + {:nargs 0}) + +(nvim.create_user_command :HarpoonNext + (lambda [] + (let [harpoon (util.prequire :harpoon.ui)] + (harpoon.nav_next))) + {:nargs 0}) + +(nvim.create_user_command :HarpoonPrev + (lambda [] + (let [harpoon (util.prequire :harpoon.ui)] + (harpoon.nav_prev))) + {:nargs 0}) + +(nvim.create_user_command :HarpoonUI + (lambda [] + (let [harpoon (util.prequire :harpoon.ui)] + (harpoon.toggle_quick_menu))) + {:nargs 0}) + +(nvim.create_user_command :Replace + (lambda [] + (let [spectre (util.prequire :spectre)] + (spectre.open))) + {:nargs 0}) + +(nvim.create_user_command :ReplaceWord + (lambda [] + (let [spectre (util.prequire :spectre)] + (spectre.open.open_visual {:select_word true}))) + {:nargs 0}) + +(nvim.create_user_command :ReplaceInBuf + (lambda [] + (let [spectre (util.prequire :spectre)] + (spectre.open_file_search))) + {:nargs 0}) |