about summary refs log tree commit diff stats
path: root/modules
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-11-23 13:14:04 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-11-23 13:22:07 +0100
commit90a049ccbd48184af95b865f6a1f75eec064f350 (patch)
tree6c7fd847bbb3f3d21c1b365cea65e201bc4944e2 /modules
parentrefactor(pkgs/less): Remove and use less from nixpkgs (diff)
downloadnixos-config-90a049ccbd48184af95b865f6a1f75eec064f350.tar.gz
nixos-config-90a049ccbd48184af95b865f6a1f75eec064f350.zip
refactor(modules/nvim/files): Move to their respective plugin
Diffstat (limited to 'modules')
-rw-r--r--modules/by-name/nv/nvim/files/default.nix15
-rw-r--r--modules/by-name/nv/nvim/module.nix1
-rw-r--r--modules/by-name/nv/nvim/plgs/telescope/extensions/bibtex/default.nix10
-rw-r--r--modules/by-name/nv/nvim/plgs/telescope/extensions/bibtex/tex.lua (renamed from modules/by-name/nv/nvim/files/ftplugin/tex.lua)0
4 files changed, 9 insertions, 17 deletions
diff --git a/modules/by-name/nv/nvim/files/default.nix b/modules/by-name/nv/nvim/files/default.nix
deleted file mode 100644
index ef8afa1a..00000000
--- a/modules/by-name/nv/nvim/files/default.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-  config,
-  lib,
-  ...
-}: let
-  cfg = config.soispha.programs.nvim;
-in {
-  home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable {
-    extraFiles = {
-      "ftplugin/tex.lua".text = ''
-        ${lib.strings.fileContents ./ftplugin/tex.lua}
-      '';
-    };
-  };
-}
diff --git a/modules/by-name/nv/nvim/module.nix b/modules/by-name/nv/nvim/module.nix
index 829a9c2b..69e417bb 100644
--- a/modules/by-name/nv/nvim/module.nix
+++ b/modules/by-name/nv/nvim/module.nix
@@ -9,7 +9,6 @@ in {
   imports = [
     ./autocmds
     ./clipboard
-    ./files
     ./mappings
     ./options
     ./plgs
diff --git a/modules/by-name/nv/nvim/plgs/telescope/extensions/bibtex/default.nix b/modules/by-name/nv/nvim/plgs/telescope/extensions/bibtex/default.nix
index e263cfdc..818aa18e 100644
--- a/modules/by-name/nv/nvim/plgs/telescope/extensions/bibtex/default.nix
+++ b/modules/by-name/nv/nvim/plgs/telescope/extensions/bibtex/default.nix
@@ -6,11 +6,19 @@
 }: let
   cfg = config.soispha.programs.nvim;
 in {
-  # WARNING: This is only activated in tex files via the ftplugin.
   home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable {
     extraPlugins = [
       pkgs.vimExtraPlugins.telescope-bibtex-nvim
     ];
+
+    # Only activate this in tex files.
+    # TODO: Why? <2024-11-23>
+    extraFiles = {
+      "ftplugin/tex.lua".text = ''
+        ${lib.strings.fileContents ./tex.lua}
+      '';
+    };
+
     keymaps = [
       {
         key = "<space>ib";
diff --git a/modules/by-name/nv/nvim/files/ftplugin/tex.lua b/modules/by-name/nv/nvim/plgs/telescope/extensions/bibtex/tex.lua
index 4107a7c5..4107a7c5 100644
--- a/modules/by-name/nv/nvim/files/ftplugin/tex.lua
+++ b/modules/by-name/nv/nvim/plgs/telescope/extensions/bibtex/tex.lua