From a2bf2823093778a3a77fb0a35efd45bffc7aeb29 Mon Sep 17 00:00:00 2001 From: sefidel Date: Sat, 26 Feb 2022 21:20:00 +0900 Subject: feat(pack): add lir --- fnl/nvrc/colors.fnl | 28 +++++++--------------------- fnl/nvrc/pack.fnl | 3 ++- fnl/nvrc/packs/lir.fnl | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 22 deletions(-) create mode 100644 fnl/nvrc/packs/lir.fnl (limited to 'fnl/nvrc') diff --git a/fnl/nvrc/colors.fnl b/fnl/nvrc/colors.fnl index 58ab4cd..1392a9f 100644 --- a/fnl/nvrc/colors.fnl +++ b/fnl/nvrc/colors.fnl @@ -50,26 +50,12 @@ (highlight :NvimInternalError {:fg (. colors :red)}) (highlight :VertSplit {:fg (. colors :grey2)}) - ; Gitdgreys - (highlight :DiffAdd {:fg (. colors :green) :bg (. colors :dgrey)}) - (highlight :DiffChange {:fg (. colors :yellow) :bg (. colors :dgrey)}) - (highlight :DiffChangeDelete {:fg (. colors :red) :bg (. colors :dgrey)}) - (highlight :DiffModified {:fg (. colors :red) :bg (. colors :dgrey)}) - (highlight :DiffDelete {:fg (. colors :red) :bg (. colors :dgrey)}) - - ; Nvimtree - (highlight :NvimTreeNormal {:bg (. colors :black)}) - (highlight :NvimTreeNormalNC {:bg (. colors :black)}) - (highlight :NvimTreeStatuslineNC {:fg (. colors :black) :bg (. colors :black)}) - (highlight :NvimTreeVertSplit {:fg (. colors :black) :bg (. colors :black)}) - (highlight :NvimTreeWindowPicker {:fg (. colors :red) :bg (. colors :black2)}) - (highlight :NvimTreeIndentMarker {:fg (. colors :grey)}) - (highlight :NvimTreeGitDirty {:fg (. colors :red)}) - (highlight :NvimTreeRootFolder {:fg (. colors :red) :underline true}) - (highlight :NvimTreeEmptyFolderName {:fg (. colors :skyblue)}) - (highlight :NvimTreeFolderIcon {:fg (. colors :skyblue)}) - (highlight :NvimTreeFolderName {:fg (. colors :skyblue)}) - (highlight :NvimTreeOpenedFolderName {:fg (. colors :magenta)}) - (highlight :NvimTreeEndOfBuffer {:fg (. colors :black2)})) + ; Lir + (highlight :LirFloatNormal {:bg (. colors :black)}) + (highlight :LirDir {:fg (. colors :skyblue)}) + (highlight :LirSymLink {:fg (. colors :grey)}) + (highlight :LirEmptyDirText {:fg (. colors :blue)}) + (highlight :LirFloatCurdirWindowNormal {:bg (. colors :black)}) + (highlight :LirFloatCurdirWindowDirName {:fg (. colors :skyblue)})) colors diff --git a/fnl/nvrc/pack.fnl b/fnl/nvrc/pack.fnl index 40d6203..e207602 100644 --- a/fnl/nvrc/pack.fnl +++ b/fnl/nvrc/pack.fnl @@ -3,7 +3,7 @@ (pack! :wbthomason/packer.nvim) (pack! :rktjmp/hotpot.nvim) (pack! :lewis6991/impatient.nvim) -(pack! :nvim-lua/plenary.nvim {:module :plenary}) +(pack! :nvim-lua/plenary.nvim) (pack! :nanotech/jellybeans.vim {:config "require('nvrc.colors').apply('jellybeans')"}) (pack! :nvim-treesitter/nvim-treesitter {:req :treesitter @@ -13,6 +13,7 @@ (pack! :Pocco81/TrueZen.nvim {:cmd :TZAtaraxis}) (pack! :antoinemadec/FixCursorHold.nvim) (pack! :luukvbaal/stabilize.nvim {:init :stabilize}) +(pack! :tamago324/lir.nvim {:req :lir}) (pack! :neovim/nvim-lspconfig {:req :lspconfig :requires [(pack :hrsh7th/cmp-nvim-lsp {:after :nvim-cmp}) diff --git a/fnl/nvrc/packs/lir.fnl b/fnl/nvrc/packs/lir.fnl new file mode 100644 index 0000000..18b85d6 --- /dev/null +++ b/fnl/nvrc/packs/lir.fnl @@ -0,0 +1,36 @@ +(local lir (require :lir)) +(local actions (require :lir.actions)) +(local mark-actions (require :lir.mark.actions)) +(local clipboard-actions (require :lir.clipboard.actions)) + +(lir.setup {:show_hidden_files false + :mappings {:l actions.edit + : actions.split + : actions.vsplit + : actions.tabedit + :h actions.up + :q actions.quit + :K actions.mkdir + :N actions.newfile + :R actions.rename + "@" actions.cd + :Y actions.yank_path + :. actions.toggle_show_hidden + :D actions.delete + :J (fn [] + (mark-actions.toggle_mark) + (vim.cmd "normal! j")) + :C clipboard-actions.copy + :X clipboard-actions.cut + :P clipboard-actions.paste} + :float {:winblend 0 + :win_opts (fn [] + (let [width (math.floor (* vim.o.columns 0.5)) + height (math.floor (* vim.o.lines 0.5))] + {:border :rounded + : width + : height + :row (-> vim.o.lines (- height) (/ 2) (math.floor) (- 5)) + :col (-> vim.o.columns (- width) (/ 2) + (math.floor))}))} + :hide_cursor false}) -- cgit 1.4.1