This commit is contained in:
vali 2024-05-22 10:43:46 +02:00
commit 6198767e5b
47 changed files with 2430 additions and 108 deletions

View file

@ -0,0 +1,5 @@
{
plugins.comment = {
enable = true;
};
}

View file

@ -0,0 +1,56 @@
{
pkgs,
lib,
...
}: let
copilotChatRepo = {
owner = "copilotc-nvim";
repo = "CopilotChat.nvim";
rev = "2771f1fa7af502ea4226a88a792f4e4319199906";
hash = "sha256-Q+g81BQVQTY5J2c2ZWB7bjJLuNSdI0PAan+75YJ7mI0=";
};
in {
extraPlugins = with pkgs.vimUtils; [
(buildVimPlugin {
pname = "copilotchat";
version = "2.4.0";
src = pkgs.fetchFromGitHub copilotChatRepo;
meta = {
description = "Chat with GitHub Copilot in Neovim";
homepage = "https://github.com/CopilotC-Nvim/CopilotChat.nvim/";
license = lib.licenses.gpl3;
};
})
];
extraConfigLua = ''
require("CopilotChat").setup { }
'';
keymaps = [
{
mode = "x";
key = "<leader>a";
action = "+copilot";
}
{
mode = "x";
key = "<leader>ae";
action = "<cmd>CopilotChatExplain<cr>";
}
{
mode = "x";
key = "<leader>af";
action = "<cmd>CopilotChatFix<cr>";
}
{
mode = "x";
key = "<leader>ad";
action = "<cmd>CopilotChatDocs<cr>";
}
{
mode = "x";
key = "<leader>ac";
action = "<cmd>CopilotChatCommit<cr>";
}
];
}

View file

@ -0,0 +1,56 @@
{
plugins.flash = {
enable = true;
labels = "asdfghjklqwertyuiopzxcvbnm";
search = {
mode = "fuzzy";
};
jump = {
autojump = true;
};
label = {
uppercase = false;
rainbow = {
enabled = false;
shade = 5;
};
};
};
keymaps = [
{
mode = ["n" "x" "o"];
key = "s";
action = "<cmd>lua require('flash').jump()<cr>";
options = {
desc = "Flash";
};
}
{
mode = ["n" "x" "o"];
key = "S";
action = "<cmd>lua require('flash').treesitter()<cr>";
options = {
desc = "Flash Treesitter";
};
}
{
mode = "o";
key = "r";
action = "<cmd>lua require('flash').remote()<cr>";
options = {
desc = "Remote Flash";
};
}
{
mode = ["x" "o"];
key = "R";
action = "<cmd>lua require('flash').treesitter_search()<cr>";
options = {
desc = "Treesitter Search";
};
}
];
}

View file

@ -0,0 +1,20 @@
{pkgs, ...}: {
extraPlugins = with pkgs.vimUtils; [
(buildVimPlugin {
pname = "grapple.nvim";
version = "1.0";
src = pkgs.fetchFromGitHub {
owner = "cbochs";
repo = "grapple.nvim";
rev = "59d458e378c4884f22b7a68e61c07ed3e41aabf0";
hash = "sha256-4k8BE9i8kG4pL7Fj0xw9cG8sjA0u4jzJ40WSV/lBFhY=";
};
})
];
extraConfigLua = ''
require('grapple').setup({
scope = "git_branch",
})
'';
}

View file

@ -0,0 +1,26 @@
{
plugins.hardtime = {
enable = true;
enabled = true;
disableMouse = true;
disabledFiletypes = ["Oil"];
hint = true;
maxCount = 4;
maxTime = 1000;
restrictionMode = "hint";
restrictedKeys = {
"h" = ["n" "x"];
"j" = ["n" "x"];
"k" = ["n" "x"];
"l" = ["n" "x"];
"-" = ["n" "x"];
"+" = ["n" "x"];
"gj" = ["n" "x"];
"gk" = ["n" "x"];
"<CR>" = ["n" "x"];
"<C-M>" = ["n" "x"];
"<C-N>" = ["n" "x"];
"<C-P>" = ["n" "x"];
};
};
}

View file

@ -0,0 +1,17 @@
{
plugins.harpoon = {
enable = true;
enableTelescope = true;
keymapsSilent = true;
keymaps = {
addFile = "<leader>ha";
toggleQuickMenu = "<C-e>";
navFile = {
"1" = "<leader>hj";
"2" = "<leader>hk";
"3" = "<leader>hl";
"4" = "<leader>hm";
};
};
};
}

View file

@ -0,0 +1,13 @@
{
plugins.illuminate = {
enable = true;
underCursor = false;
filetypesDenylist = [
"Outline"
"TelescopePrompt"
"alpha"
"harpoon"
"reason"
];
};
}

View file

@ -0,0 +1,5 @@
{
plugins.nvim-autopairs = {
enable = true;
};
}

View file

@ -0,0 +1,50 @@
{
plugins.oil = {
enable = true;
settings = {
useDefaultKeymaps = true;
deleteToTrash = true;
float = {
padding = 2;
maxWidth = 0; # ''math.ceil(vim.o.lines * 0.8 - 4)'';
maxHeight = 0; # ''math.ceil(vim.o.columns * 0.8)'';
border = "rounded"; # 'single' | 'double' | 'shadow' | 'curved' | ... other options supported by win open
winOptions = {
winblend = 0;
};
};
preview = {
border = "rounded";
};
keymaps = {
"g?" = "actions.show_help";
"<CR>" = "actions.select";
"<C-\\>" = "actions.select_vsplit";
"<C-enter>" = "actions.select_split"; # this is used to navigate left
"<C-t>" = "actions.select_tab";
"<C-v>" = "actions.preview";
"<C-c>" = "actions.close";
"<C-r>" = "actions.refresh";
"-" = "actions.parent";
"_" = "actions.open_cwd";
"`" = "actions.cd";
"~" = "actions.tcd";
"gs" = "actions.change_sort";
"gx" = "actions.open_external";
"g." = "actions.toggle_hidden";
"q" = "actions.close";
};
};
};
keymaps = [
{
mode = "n";
key = "-";
action = ":Oil<CR>";
options = {
desc = "Open parent directory";
silent = true;
};
}
];
}

View file

@ -0,0 +1,5 @@
{
plugins.nvim-ufo = {
enable = true;
};
}

View file

@ -0,0 +1,20 @@
{
plugins.undotree = {
enable = true;
settings = {
autoOpenDiff = true;
focusOnToggle = true;
};
};
keymaps = [
{
mode = "n";
key = "<leader>ut";
action = "<cmd>UndotreeToggle<CR>";
options = {
silent = true;
desc = "Undotree";
};
}
];
}

View file

@ -0,0 +1,5 @@
{
plugins.which-key = {
enable = true;
};
}