dotfiles/modules/programs/nvim/new_plugins/other.nix

90 lines
2.5 KiB
Nix

{ config, lib, pkgs, inputs, ... }:
let
inherit (lib) mkEnableOption mkIf readFile;
in
{
home-manager.users.moritz = {
programs.nixvim = lib.mkMerge [
{ plugins.which-key.enable = true; }
{ plugins.lastplace.enable = true; }
{ plugins.comment.enable = true; }
{ plugins.ts-context-commentstring.enable = true; }
{
plugins.vimtex = {
enable = true;
settings.view_method = "zathura";
};
}
{
plugins.todo-comments = {
enable = true;
keymaps.todoTelescope.key = "<leader>fc";
};
}
{
keymaps = [
{ key = "<esc>"; action = "<cmd>noh<cr><esc>"; options.desc = "Escape and clear hlsearch"; mode = [ "i" "n" ]; }
];
}
{ plugins.oil.enable = true; }
{
plugins = {
telescope = {
enable = true;
extensions.fzf-native.enable = true;
keymaps = {
"<leader>ff" = {
action = "find_files";
options.desc = "Find files";
};
"<leader>fb" = {
action = "buffers";
options.desc = "Find buffers";
};
"<leader>fl" = {
action = "current_buffer_fuzzy_find";
options.desc = "Search lines";
};
"<leader>fg" = {
action = "live_grep";
options.desc = "Live grep";
};
"<leader>fh" = {
action = "help_tags";
options.desc = "Help tags";
};
"<leader>fr" = {
action = "oldfiles";
options.desc = "Recent files";
};
};
};
web-devicons.enable = true;
};
}
{ plugins.nvim-autopairs.enable = true; }
{ plugins.vim-surround.enable = true; }
{
plugins.lint.enable = true;
# TODO: add linters
plugins.lint.lintersByFt = { };
}
{
plugins.marks.enable = true;
plugins.marks.defaultMappings = false;
}
{
plugins.hmts.enable = true;
performance.combinePlugins.standalonePlugins = [ "hmts.nvim" ];
}
{ plugins.gitsigns.enable = true; }
{ plugins.fugitive.enable = true; }
{ plugins.friendly-snippets.enable = true; }
{ plugins.direnv.enable = true; }
{ plugins.crates-nvim.enable = true; }
];
};
}