diff --git a/flake.lock b/flake.lock index 5c99ea0..a52b7a5 100644 --- a/flake.lock +++ b/flake.lock @@ -1214,6 +1214,7 @@ "telescope": "telescope", "telescope-media-files": "telescope-media-files", "telescope-tabs": "telescope-tabs", + "tide": "tide", "todo-comments": "todo-comments", "tokyonight": "tokyonight", "tree-sitter-scala": "tree-sitter-scala", @@ -1352,6 +1353,22 @@ "type": "github" } }, + "tide": { + "flake": false, + "locked": { + "lastModified": 1728827703, + "narHash": "sha256-LbToO81yRROSbwjNTtY8hzQvO4qgAtv5iiUyjowvxhU=", + "owner": "jackMort", + "repo": "tide.nvim", + "rev": "0b6ccbcc026158e66c7d67f1f289812bbb3b48cf", + "type": "github" + }, + "original": { + "owner": "jackMort", + "repo": "tide.nvim", + "type": "github" + } + }, "todo-comments": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 549e23a..8f60752 100644 --- a/flake.nix +++ b/flake.nix @@ -63,6 +63,11 @@ flake = false; }; + tide = { + url = github:jackMort/tide.nvim; + flake = false; + }; + # Distraction-free coding twilight = { url = github:folke/twilight.nvim; diff --git a/lib/ide.nix b/lib/ide.nix index 1c69e2a..37a3026 100644 --- a/lib/ide.nix +++ b/lib/ide.nix @@ -133,6 +133,7 @@ let harpoon.enable = true; hop.enable = true; notifications.enable = true; + tide.enable = true; todo.enable = true; zen.enable = true; }; diff --git a/modules/default.nix b/modules/default.nix index be56769..d7e1edc 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -30,6 +30,7 @@ ./tabline ./telescope ./theme + ./tide ./todo ./treesitter ./visuals diff --git a/modules/tide/default.nix b/modules/tide/default.nix new file mode 100644 index 0000000..1706d37 --- /dev/null +++ b/modules/tide/default.nix @@ -0,0 +1,75 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.vim.tide; +in +{ + options.vim.tide = { + enable = mkOption { + type = types.bool; + description = "Enable the Tide plugin (better marks-based navigation)"; + }; + + keys = { + leader = mkOption { + type = types.str; + default = ";"; + description = "Leader key to prefix all Tide commands"; + }; + panel = mkOption { + type = types.str; + default = ";"; + description = "Open the panel (uses leader key as prefix)"; + }; + addItem = mkOption { + type = types.str; + default = "a"; + description = "Add new tiem to the list"; + }; + deleteItem = mkOption { + type = types.str; + default = "d"; + description = "Remove an tiem from the list"; + }; + clearAll = mkOption { + type = types.str; + default = "x"; + description = "Clear all items"; + }; + splits = { + horizonal = mkOption { + type = types.str; + default = "-"; + description = "Split window horizontally"; + }; + vertical = mkOption { + type = types.str; + default = "|"; + description = "Split window vertically"; + }; + }; + }; + }; + + config = mkIf cfg.enable { + vim.startPlugins = [ pkgs.neovimPlugins.tide ]; + + vim.luaConfigRC = '' + require('tide').setup({ + keys = { + leader = "${cfg.keys.leader}", + panel = "${cfg.keys.panel}", + add_item = "${cfg.keys.addItem}", + delete = "${cfg.keys.deleteItem}", + clear_all = "${cfg.keys.clearAll}", + horizontal = "${cfg.keys.splits.horizonal}", + vertical = "${cfg.keys.splits.vertical}", + }, + animation_duration = 300, -- Animation duration in milliseconds + animation_fps = 30, -- Frames per second for animations + }) + ''; + }; +}