aboutsummaryrefslogtreecommitdiffstats
path: root/home-manager/soispha/config/neovim/nixvim/plugins/lf-nvim/lua
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-08-19 17:10:01 +0200
committerSoispha <soispha@vhack.eu>2023-08-19 17:36:04 +0200
commitde266305ddfcaec0e3477164b4d9bdf1a596a124 (patch)
tree0c24d98855fa602157ef84e50769aa23614ed23c /home-manager/soispha/config/neovim/nixvim/plugins/lf-nvim/lua
parentFix(hm/conf/nvim): Import neovim config (diff)
downloadnixos-config-de266305ddfcaec0e3477164b4d9bdf1a596a124.zip
Fix(hm/conf/neovim): Fully import nvim config through nixVim
Diffstat (limited to 'home-manager/soispha/config/neovim/nixvim/plugins/lf-nvim/lua')
-rw-r--r--home-manager/soispha/config/neovim/nixvim/plugins/lf-nvim/lua/lf-nvim.lua43
1 files changed, 43 insertions, 0 deletions
diff --git a/home-manager/soispha/config/neovim/nixvim/plugins/lf-nvim/lua/lf-nvim.lua b/home-manager/soispha/config/neovim/nixvim/plugins/lf-nvim/lua/lf-nvim.lua
new file mode 100644
index 00000000..f6b249ce
--- /dev/null
+++ b/home-manager/soispha/config/neovim/nixvim/plugins/lf-nvim/lua/lf-nvim.lua
@@ -0,0 +1,43 @@
+local fn = vim.fn
+
+-- Defaults
+require("lf").setup({
+ default_action = "drop", -- default action when `Lf` opens a file
+ -- TODO document these mappings:
+ default_actions = { -- default action keybindings
+ ["<C-t>"] = "tabedit",
+ ["<C-x>"] = "split",
+ ["<C-v>"] = "vsplit",
+ ["<C-o>"] = "tab drop",
+ },
+
+ winblend = 10, -- psuedotransparency level
+ dir = "", -- directory where `lf` starts ('gwd' is git-working-directory, ""/nil is CWD)
+ direction = "float", -- window type: float horizontal vertical
+ border = "rounded", -- border kind: single double shadow curved
+ height = fn.float2nr(fn.round(0.75 * o.lines)), -- height of the *floating* window
+ width = fn.float2nr(fn.round(0.75 * o.columns)), -- width of the *floating* window
+ escape_quit = true, -- map escape to the quit command (so it doesn't go into a meta normal mode)
+ focus_on_open = true, -- focus the current file when opening Lf (experimental)
+ mappings = true, -- whether terminal buffer mapping is enabled
+ tmux = false, -- tmux statusline can be disabled on opening of Lf
+ default_file_manager = true, -- make lf default file manager
+ disable_netrw_warning = true, -- don't display a message when opening a directory with `default_file_manager` as true
+ highlights = { -- highlights passed to toggleterm
+ Normal = { link = "Normal" },
+ NormalFloat = { link = 'Normal' },
+ FloatBorder = { guifg = "<VALUE>", guibg = "<VALUE>" },
+ },
+
+ -- Layout configurations
+ layout_mapping = "<M-u>", -- resize window with this key
+ views = { -- window dimensions to rotate through
+ { width = 0.800, height = 0.800 },
+ { width = 0.600, height = 0.600 },
+ { width = 0.950, height = 0.950 },
+ { width = 0.500, height = 0.500, col = 0, row = 0 },
+ { width = 0.500, height = 0.500, col = 0, row = 0.5 },
+ { width = 0.500, height = 0.500, col = 0.5, row = 0 },
+ { width = 0.500, height = 0.500, col = 0.5, row = 0.5 },
+ }
+})