From a9e30eb2f653d9a61501a8102089cf0c862c3fc0 Mon Sep 17 00:00:00 2001 From: nganhkhoa Date: Mon, 11 Oct 2021 04:22:15 +0000 Subject: [PATCH] use vaffle | bench nvim-tree --- fnl/plugins.fnl | 3 +-- fnl/settings.fnl | 9 ++++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/fnl/plugins.fnl b/fnl/plugins.fnl index 9628a8c..950b8e9 100644 --- a/fnl/plugins.fnl +++ b/fnl/plugins.fnl @@ -18,8 +18,7 @@ (use :valloric/matchtagalways) ; util - ; (use :cocopon/vaffle.vim) - (use :kyazdani42/nvim-tree.lua) + (use :cocopon/vaffle.vim) (use :jeetsukumaran/vim-buffergator) (use :tpope/vim-fugitive) (use :kana/vim-operator-user) diff --git a/fnl/settings.fnl b/fnl/settings.fnl index afeb29b..944a607 100644 --- a/fnl/settings.fnl +++ b/fnl/settings.fnl @@ -10,7 +10,14 @@ (set nvim.g.buffergator_display_regime "parentdir") ;; nvim tree -(nvim.set_keymap :n :dd ":NvimTreeFindFile" {:noremap true :silent true}) +(defn open-vaffle [] + (let [bufname (nvim.fn.bufname "%")] + (if (= bufname "") + (nvim.fn.vaffle#init) + (nvim.fn.vaffle#init (nvim.fn.expand "%:p"))))) + +(nu.fn-bridge :OpenVaffle :user.plugin.settings :open-vaffle) +(nvim.set_keymap :n :dd ":call OpenVaffle()" {:noremap true :silent true}) ;; vim-operator-surround (nvim.set_keymap "" :sa "(operator-surround-append)" {:silent true})