2024-09-14 11:05:12 +02:00
|
|
|
{ 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" ]; }
|
2024-10-26 17:05:31 +02:00
|
|
|
{ key = "<"; action = "<gv"; options.desc = "Shift left"; mode = [ "v" ]; }
|
|
|
|
{ key = ">"; action = ">gv"; options.desc = "Shift right"; mode = [ "v" ]; }
|
|
|
|
{ key = "y"; action = "ygv<esc>"; options.desc = "Yank"; mode = [ "v" ]; }
|
2024-09-14 11:05:12 +02:00
|
|
|
];
|
|
|
|
}
|
|
|
|
{ plugins.oil.enable = true; }
|
|
|
|
{ plugins.nvim-autopairs.enable = true; }
|
2024-10-08 09:42:32 +02:00
|
|
|
{ plugins.vim-surround.enable = true; }
|
2024-10-26 17:09:27 +02:00
|
|
|
|
|
|
|
# TODO: add linters
|
|
|
|
# {
|
|
|
|
# plugins.lint.enable = true;
|
|
|
|
# plugins.lint.lintersByFt = { };
|
|
|
|
# }
|
|
|
|
|
2024-09-14 11:05:12 +02:00
|
|
|
{
|
|
|
|
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; }
|
2024-10-17 13:03:45 +02:00
|
|
|
{
|
|
|
|
plugins.helpview.enable = true;
|
|
|
|
performance.combinePlugins.standalonePlugins = [ "helpview.nvim" ];
|
|
|
|
}
|
2024-11-11 13:23:21 +01:00
|
|
|
{
|
|
|
|
plugins.obsidian.enable = true;
|
|
|
|
plugins.obsidian.settings = {
|
|
|
|
dir = "~/Documents/Nextcloud/Notes/zettelkasten/";
|
|
|
|
note_id_func.__raw = ''
|
|
|
|
function(title)
|
|
|
|
if title ~= nil then
|
|
|
|
return title
|
|
|
|
else
|
|
|
|
suffix = ""
|
|
|
|
for _ = 1, 4 do
|
|
|
|
suffix = suffix .. string.char(math.random(65, 90))
|
|
|
|
end
|
|
|
|
return tostring(os.date("%Y-%m-%d")) .. "-" .. suffix
|
|
|
|
end
|
|
|
|
end
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|
2024-09-14 11:05:12 +02:00
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|