Skip to content

Commit

Permalink
add tide plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
gvolpe committed Oct 15, 2024
1 parent 18e52e4 commit e8a7d88
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 0 deletions.
17 changes: 17 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
flake = false;
};

tide = {
url = github:jackMort/tide.nvim;
flake = false;
};

# Distraction-free coding
twilight = {
url = github:folke/twilight.nvim;
Expand Down
1 change: 1 addition & 0 deletions lib/ide.nix
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ let
harpoon.enable = true;
hop.enable = true;
notifications.enable = true;
tide.enable = true;
todo.enable = true;
zen.enable = true;
};
Expand Down
1 change: 1 addition & 0 deletions modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
./tabline
./telescope
./theme
./tide
./todo
./treesitter
./visuals
Expand Down
75 changes: 75 additions & 0 deletions modules/tide/default.nix
Original file line number Diff line number Diff line change
@@ -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
})
'';
};
}

0 comments on commit e8a7d88

Please sign in to comment.