From b8d9815567bb11f3d55edeae928db9bae7c27c94 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Tue, 24 Jun 2025 13:32:45 +0200 Subject: modules/nvim/plgs/lf: Use the nixvim module --- modules/by-name/nv/nvim/plgs/lf-nvim/default.nix | 83 +++++++++++++++++++++--- 1 file changed, 75 insertions(+), 8 deletions(-) (limited to 'modules/by-name/nv/nvim/plgs/lf-nvim/default.nix') diff --git a/modules/by-name/nv/nvim/plgs/lf-nvim/default.nix b/modules/by-name/nv/nvim/plgs/lf-nvim/default.nix index 3a1c6bf9..e652a60d 100644 --- a/modules/by-name/nv/nvim/plgs/lf-nvim/default.nix +++ b/modules/by-name/nv/nvim/plgs/lf-nvim/default.nix @@ -8,21 +8,88 @@ # You should have received a copy of the License along with this program. # If not, see . { - pkgs, lib, config, ... }: let cfg = config.soispha.programs.nvim; in { - # TODO: package lf-nvim though a module # TODO: change the nvim path, when I change the path with lf home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { - extraConfigLuaPost = '' - ${lib.strings.fileContents ./lua/lf-nvim.lua} - ''; - extraPlugins = [ - pkgs.vimPlugins.lf-nvim - ]; + plugins.lf = { + enable = true; + + settings = { + default_actions = { + "" = "tab drop"; + "" = "tabedit"; + "" = "vsplit"; + "" = "split"; + }; + + default_action = "drop"; + + winblend = 10; + dir = ""; + direction = "float"; + border = "rounded"; + height.__raw = "vim.fn.float2nr(vim.fn.round(0.75 * vim.o.lines))"; + width.__raw = "vim.fn.float2nr(vim.fn.round(0.75 * vim.o.columns))"; + escape_quit = true; + focus_on_open = true; + mappings = true; + tmux = false; + default_file_manager = true; + disable_netrw_warning = true; + highlights = { + Normal = {link = "Normal";}; + NormalFloat = {link = "Normal";}; + FloatBorder = { + guifg = "#cdcbe0"; + guibg = "#191726"; + }; + }; + + layout_mapping = ""; + views = [ + { + 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; + } + ]; + }; + }; }; } -- cgit 1.4.1