finish adding plugins for now

This commit is contained in:
Charlotte 🦝 Delenk 2023-04-15 08:48:24 +01:00
parent 5756457ffe
commit 305cf7777b
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122
21 changed files with 447 additions and 1 deletions

View file

@ -0,0 +1,9 @@
{
pkgs,
config,
...
}: {
output.plugins = with pkgs.vimPlugins; [
fidget-nvim
];
}

View file

@ -0,0 +1,7 @@
{
pkgs,
config,
...
}: {
output.plugins = with pkgs.vimPlugins; [nvim-gdb];
}

View file

@ -31,7 +31,7 @@ in {
vim.keybindings.keybindings =
if config.isDesktop
then {
"<leader>".s = {
"<leader>".l = {
e = {
command = "<cmd>lua vim.diagnostic.open_float()<cr>";
label = "Open diagnostic float";

View file

@ -0,0 +1,19 @@
{
pkgs,
config,
...
}: {
output.plugins = with pkgs.vimPlugins;
[
tabular
vim-markdown
]
++ (
if config.isDesktop
then
with pkgs.vimPlugins; [
markdown-preview-nvim
]
else []
);
}

View file

@ -0,0 +1,25 @@
{
pkgs,
config,
...
}: {
output.plugins =
if config.isDesktop
then with pkgs.vimPlugins; [neoformat]
else [];
lspconfigPath = with pkgs; [
clang-tools
cmake-format
nodePackages.prettier
dhall
elixir
go
ormolu
taplo
stylua
alejandra
yapf
rustfmt
shfmt
];
}

View file

@ -0,0 +1,13 @@
{
pkgs,
config,
...
}: {
output.plugins =
if config.isDesktop
then with pkgs.vimPlugins; [vimtex]
else [];
lspconfigPath = with pkgs; [
texlive.combined.scheme-medium
];
}

View file

@ -0,0 +1,33 @@
local gs = require("gitsigns")
local function map(mode, l, r, opts)
opts = opts or {}
vim.keymap.set(mode, l, r, opts)
end
-- Navigation
map("n", "]c", function()
if vim.wo.diff then
return "]c"
end
vim.schedule(function()
gs.next_hunk()
end)
return "<Ignore>"
end, { expr = true, desc = "next hunk" })
map("n", "[c", function()
if vim.wo.diff then
return "[c"
end
vim.schedule(function()
gs.prev_hunk()
end)
return "<Ignore>"
end, { expr = true, desc = "previous hunk" })
-- Actions
map("n", "<leader>hp", gs.preview_hunk)
map("n", "<leader>hb", function()
gs.blame_line { full = true }
end)

View file

@ -0,0 +1,7 @@
{
pkgs,
config,
...
}: {
output.plugins = with pkgs.vimPlugins; [asyncrun-vim];
}

View file

@ -0,0 +1,7 @@
{
pkgs,
config,
...
}: {
output.plugins = with pkgs.vimPlugins; [vim-eunuch];
}

View file

@ -0,0 +1,90 @@
{
pkgs,
config,
...
}: {
#
output.plugins = with pkgs.vimPlugins; [
vim-fugitive
vim-flog
gitlinker-nvim
gitsigns-nvim
committia-vim
];
vim.keybindings.keybindings."<leader>".g = {
s = {
command = "<cmd>Git<cr>";
label = "Git status";
};
w = {
command = "<cmd>Gwrite<cr>";
label = "Git add";
};
c = {
command = "<cmd>Git commit<cr>";
label = "Git commit";
};
d = {
command = "<cmd>Gdiffsplit<cr>";
label = "Git diff";
};
p = {
l = {
command = "<cmd>Git pull<cr>";
label = "Git pull";
};
u = {
command = "<cmd>15 split|term git push<cr>";
label = "Git push";
};
};
l = {
command = "<cmd>lua require('gitlinker').get_buf_range_url(vim.fn.mode())<cr>";
options.silent = true;
mode = "";
label = "get git permlink";
};
b = {
command = "<cmd>lua require('gitlinker').get_repo_url({action_callback = require('gitlinker').actions.open_in_browser})<cr>";
options.silent = true;
label = "browse repo in browser";
};
};
plugin.setup.gitlinker = {};
plugin.setup.gitsigns = {
signs = {
add = {
hl = "GitSignsAdd";
text = "+";
numhl = "GitSignsAddNr";
linehl = "GitSignsAddLn";
};
change = {
hl = "GitSignsChange";
text = "~";
numhl = "GitSignsChangeNr";
linehl = "GitSignsChangeLn";
};
delete = {
hl = "GitSignsDelete";
text = "_";
numhl = "GitSignsDeleteNr";
linehl = "GitSignsDeleteLn";
};
topdelete = {
hl = "GitSignsDelete";
text = "";
numhl = "GitSignsDeleteNr";
linehl = "GitSignsDeleteLn";
};
changedelete = {
hl = "GitSignsChange";
text = "";
numhl = "GitSignsChangeNr";
linehl = "GitSignsChangeLn";
};
};
word_diff = true;
};
extraLuaModules = ["config.gitsigns"];
}

View file

@ -0,0 +1,7 @@
{
pkgs,
config,
...
}: {
output.plugins = with pkgs.vimPlugins; [vim-indent-object];
}

View file

@ -0,0 +1,7 @@
{
pkgs,
config,
...
}: {
output.plugins = with pkgs.vimPlugins; [vim-repeat];
}

View file

@ -0,0 +1,7 @@
{
pkgs,
config,
...
}: {
output.plugins = with pkgs.vimPlugins; [vim-sandwich];
}

View file

@ -0,0 +1,7 @@
{
pkgs,
config,
...
}: {
output.plugins = with pkgs.vimPlugins; [targets-vim];
}

View file

@ -0,0 +1,7 @@
{
pkgs,
config,
...
}: {
output.plugins = with pkgs.vimPlugins; [vim-tmux];
}

View file

@ -0,0 +1,11 @@
{
pkgs,
config,
...
}: {
output.plugins = with pkgs.vimPlugins; [nvim-bqf];
plugin.setup.bqf = {
auto_resize_height = false;
preview.auto_preview = false;
};
}

View file

@ -0,0 +1,7 @@
{
pkgs,
config,
...
}: {
output.plugins = with pkgs.vimPlugins; [vim-matchup];
}

View file

@ -0,0 +1,7 @@
{
pkgs,
config,
...
}: {
output.plugins = with pkgs.vimPlugins; [vim-obsession];
}

View file

@ -0,0 +1,118 @@
{
pkgs,
config,
...
}: {
output.plugins = with pkgs.vimPlugins; [nvim-tree-lua];
plugin.setup.nvim-tree = {
auto_reload_on_write = true;
disable_netrw = false;
hijack_cursor = false;
hijack_netrw = true;
hijack_unnamed_buffer_when_opening = false;
open_on_tab = false;
sort_by = "name";
update_cwd = false;
view = {
width = 30;
hide_root_folder = false;
side = "left";
preserve_window_proportions = false;
number = false;
relativenumber = false;
signcolumn = "yes";
mappings = {
custom_only = false;
list = [];
};
};
renderer = {
indent_markers = {
enable = false;
icons = {
corner = " ";
edge = " ";
none = " ";
};
};
icons = {
webdev_colors = true;
};
};
hijack_directories = {
enable = true;
auto_open = true;
};
update_focused_file = {
enable = false;
update_cwd = false;
ignore_list = [];
};
system_open = {
cmd = "";
args = [];
};
diagnostics = {
enable = false;
show_on_dirs = false;
icons = {
hint = "";
info = "";
warning = "";
error = "";
};
};
filters = {
dotfiles = false;
custom = [];
exclude = [];
};
git = {
enable = true;
ignore = true;
timeout = 400;
};
actions = {
use_system_clipboard = true;
change_dir = {
enable = true;
global = false;
restrict_above_cwd = false;
};
open_file = {
quit_on_open = false;
resize_window = false;
window_picker = {
enable = true;
chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
exclude = {
filetype = ["notify" "packer" "qf" "diff" "fugitive" "fugitiveblame"];
buftype = ["nofile" "terminal" "help"];
};
};
};
};
trash = {
cmd = "trash";
require_confirm = true;
};
log = {
enable = false;
truncate = false;
types = {
all = false;
config = false;
copy_paste = false;
diagnostics = false;
git = false;
profile = false;
};
};
};
vim.keybindings.keybindings."<leader>".s = {
command = "<cmd>NvimTreeToggle<cr>";
label = "toggle nvim-tree";
options.silent = true;
};
}

View file

@ -1,3 +1,54 @@
_: {
vim.keybindings.which-key-nvim = true;
plugin.setup.which-key = {
plugins = {
marks = true;
registers = true;
spelling = {
enabled = true;
suggestions = 9;
};
presets = {
operators = true;
motions = true;
text_objects = true;
windows = true;
nav = true;
z = true;
g = true;
};
};
operators.gc = "Comments";
icons = {
breadcrumbs = "»";
separator = "";
group = "+";
};
window = {
border = "none";
position = "bottom";
margin = [0 0 0 0];
padding = [1 0 1 0];
};
layout = {
height = {
min = 1;
max = 25;
};
width = {
min = 20;
max = 50;
};
spacing = 1;
align = "center";
};
ignore_missing = false;
hidden = ["<silent>" "<cmd>" "<Cmd>" "<CR>" "call" "lua" "^:" "^ "];
show_help = true;
triggers = "auto";
triggers_blacklist = {
n = ["o" "O"];
};
};
}

View file

@ -0,0 +1,7 @@
{
pkgs,
config,
...
}: {
output.plugins = with pkgs.vimPlugins; [whitespace-nvim];
}