about summary refs log tree commit diff stats
path: root/modules/by-name/nv/nvim/plgs/lf-nvim/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/by-name/nv/nvim/plgs/lf-nvim/default.nix')
-rw-r--r--modules/by-name/nv/nvim/plgs/lf-nvim/default.nix83
1 files changed, 75 insertions, 8 deletions
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 <https://www.gnu.org/licenses/gpl-3.0.txt>.
 {
-  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 = {
+          "<C-o>" = "tab drop";
+          "<C-t>" = "tabedit";
+          "<C-v>" = "vsplit";
+          "<C-x>" = "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 = "<M-u>";
+        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;
+          }
+        ];
+      };
+    };
   };
 }