From 55654639c933860d9bbb5f442c2c834be2828181 Mon Sep 17 00:00:00 2001 From: sefidel Date: Sat, 26 Feb 2022 21:20:19 +0900 Subject: feat(keybinds): use lua functions directly --- fnl/nvrc/keymaps.fnl | 19 ++++++++++--------- fnl/nvrc/pack.fnl | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) (limited to 'fnl') diff --git a/fnl/nvrc/keymaps.fnl b/fnl/nvrc/keymaps.fnl index 5af2d04..fb7091e 100644 --- a/fnl/nvrc/keymaps.fnl +++ b/fnl/nvrc/keymaps.fnl @@ -6,24 +6,23 @@ (map! [n :silent] :e ":bprev ") (map! [n :silent] :r ":bnext ") -(map! [n :silent] :q ":lua require('nvrc.utils').del_buf() ") +(map! [n :silent] :q ((. (require :nvrc.utils) :del_buf))) (map! [n :silent] :w ":enew ") (map! [n :silent] :a ":tabnew ") (map! [n :silent] :s ":set nu! ") (map! [n :silent] :d ":buffers ") (map! [n :silent] :ya ":%y+ ") -(map! [n :silent] :/ - ":lua require('Comment.api').toggle_current_linewise() ") +(map! [n :silent] :/ ((. (require :Comment.api) :toggle_current_linewise))) (map! [v :silent] :/ ":lua require('Comment.api').toggle_linewise_op(vim.fn.visualmode()) ") -(map! [n :silent] :ff ":FzfLua files ") -(map! [n :silent] :fd ":FzfLua grep ") -(map! [n :silent] :fl ":FzfLua live_grep ") -(map! [n :silent] :fb ":FzfLua buffers ") -(map! [n :silent] :fg ":FzfLua git_commits ") -(map! [n :silent] :fh ":FzfLua git_status ") +(map! [n :silent] :ff ((. (require :fzf-lua) :files))) +(map! [n :silent] :fd ((. (require :fzf-lua) :grep))) +(map! [n :silent] :fl ((. (require :fzf-lua) :live_grep))) +(map! [n :silent] :fb ((. (require :fzf-lua) :buffer))) +(map! [n :silent] :fg ((. (require :fzf-lua) :git_commits))) +(map! [n :silent] :fh ((. (require :fzf-lua) :git_status))) (map! [n] :f :Lightspeed_f) (map! [n] :F :Lightspeed_F) @@ -31,3 +30,5 @@ (map! [n] :T :Lightspeed_T) (map! [n :silent] :t ":TZAtaraxis ") + +(map! [n :silent] :g ((. (require :lir.float) :toggle))) diff --git a/fnl/nvrc/pack.fnl b/fnl/nvrc/pack.fnl index e207602..73a038f 100644 --- a/fnl/nvrc/pack.fnl +++ b/fnl/nvrc/pack.fnl @@ -26,7 +26,7 @@ (pack! :hrsh7th/nvim-cmp {:req :cmp :event :InsertCharPre}) (pack! :numToStr/Comment.nvim {:module :Comment :init :Comment}) -(pack! :ibhagwan/fzf-lua {:req :fzf :cmd :FzfLua}) +(pack! :ibhagwan/fzf-lua {:req :fzf :module :fzf-lua}) (pack! :ggandor/lightspeed.nvim) (unpack!) -- cgit 1.4.1