initial commit
This commit is contained in:
commit
ebc1be5217
143 changed files with 7721 additions and 0 deletions
256
modules/home/programs/neovim/keymaps.nix
Normal file
256
modules/home/programs/neovim/keymaps.nix
Normal file
|
|
@ -0,0 +1,256 @@
|
|||
{
|
||||
programs.nvf.settings.vim = {
|
||||
globals.mapleader = " ";
|
||||
binds = {
|
||||
whichKey = {
|
||||
enable = true;
|
||||
# TODO: registers
|
||||
register = { };
|
||||
};
|
||||
};
|
||||
keymaps = [
|
||||
# General Mappings
|
||||
{
|
||||
key = "s";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua require('flash').jump()<cr>";
|
||||
desc = "Flash";
|
||||
}
|
||||
{
|
||||
key = "K";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua vim.lsp.buf.hover()<cr>";
|
||||
desc = "LSP Hover";
|
||||
}
|
||||
{
|
||||
key = "<C-tab>";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>bnext<cr>";
|
||||
desc = "Next Buffer";
|
||||
}
|
||||
{
|
||||
key = "<leader>bd";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>bd<cr>";
|
||||
desc = "Close current buffer";
|
||||
}
|
||||
|
||||
# Disable Arrow Keys in Normal Mode
|
||||
# {
|
||||
# key = "<Up>";
|
||||
# mode = "n";
|
||||
# silent = true;
|
||||
# action = "k";
|
||||
# desc = "Disable Up Arrow";
|
||||
# }
|
||||
# {
|
||||
# key = "<Down>";
|
||||
# mode = "n";
|
||||
# silent = true;
|
||||
# action = "j";
|
||||
# desc = "Disable Down Arrow";
|
||||
# }
|
||||
# {
|
||||
# key = "<Left>";
|
||||
# mode = "n";
|
||||
# silent = true;
|
||||
# action = "h";
|
||||
# desc = "Disable Left Arrow";
|
||||
# }
|
||||
# {
|
||||
# key = "<Right>";
|
||||
# mode = "n";
|
||||
# silent = true;
|
||||
# action = "l";
|
||||
# desc = "Disable Right Arrow";
|
||||
# }
|
||||
|
||||
# UI
|
||||
{
|
||||
key = "<leader>uw";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>set wrap!<cr>";
|
||||
desc = "Toggle word wrapping";
|
||||
}
|
||||
{
|
||||
key = "<leader>ul";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>set linebreak!<cr>";
|
||||
desc = "Toggle linebreak";
|
||||
}
|
||||
{
|
||||
key = "<leader>us";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>set spell!<cr>";
|
||||
desc = "Toggle spellLazyGitcheck";
|
||||
}
|
||||
{
|
||||
key = "<leader>uc";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>set cursorline!<cr>";
|
||||
desc = "Toggle cursorline";
|
||||
}
|
||||
{
|
||||
key = "<leader>un";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>set number!<cr>";
|
||||
desc = "Toggle line numbers";
|
||||
}
|
||||
{
|
||||
key = "<leader>ur";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>set relativenumber!<cr>";
|
||||
desc = "Toggle relative line numbers";
|
||||
}
|
||||
{
|
||||
key = "<leader>ut";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>set showtabline=2<cr>";
|
||||
desc = "Show tabline";
|
||||
}
|
||||
{
|
||||
key = "<leader>uT";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>set showtabline=0<cr>";
|
||||
desc = "Hide tabline";
|
||||
}
|
||||
|
||||
# Windows
|
||||
{
|
||||
key = "<leader>ws";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>split<cr>";
|
||||
desc = "Split";
|
||||
}
|
||||
{
|
||||
key = "<leader>wv";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>vsplit<cr>";
|
||||
desc = "VSplit";
|
||||
}
|
||||
{
|
||||
key = "<leader>wd";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>close<cr>";
|
||||
desc = "Close";
|
||||
}
|
||||
{
|
||||
key = "<leader>ma";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>close<cr>";
|
||||
desc = "Close";
|
||||
}
|
||||
{
|
||||
key = "<C-Left>";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua require('smart-splits').move_cursor_left()<cr>";
|
||||
desc = "Move to left split";
|
||||
}
|
||||
|
||||
{
|
||||
key = "<C-Down>";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua require('smart-splits').move_cursor_down()<cr>";
|
||||
desc = "Move to lower split";
|
||||
}
|
||||
{
|
||||
key = "<C-Up>";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua require('smart-splits').move_cursor_up()<cr>";
|
||||
desc = "Move to upper split";
|
||||
}
|
||||
{
|
||||
key = "<C-Right>";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua require('smart-splits').move_cursor_right()<cr>";
|
||||
desc = "Move to right split";
|
||||
}
|
||||
|
||||
{
|
||||
key = "<M-Left>";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua require('smart-splits').resize_left()<cr>";
|
||||
desc = "Resize left";
|
||||
}
|
||||
{
|
||||
key = "<M-Down>";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua require('smart-splits').resize_down()<cr>";
|
||||
desc = "Resize down";
|
||||
}
|
||||
{
|
||||
key = "<M-Up>";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua require('smart-splits').resize_up()<cr>";
|
||||
desc = "Resize up";
|
||||
}
|
||||
{
|
||||
key = "<M-Right>";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua require('smart-splits').resize_right()<cr>";
|
||||
desc = "Resize right";
|
||||
}
|
||||
|
||||
{
|
||||
key = "<leader>w=";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<C-w>=";
|
||||
desc = "Equalize Splits";
|
||||
}
|
||||
{
|
||||
key = "<leader>we";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua require('smart-splits').swap_buf_right()<cr>";
|
||||
desc = "Swap Buffer Right";
|
||||
}
|
||||
{
|
||||
key = "<leader>wh";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua require('smart-splits').swap_buf_left()<cr>";
|
||||
desc = "Swap Buffer Left";
|
||||
}
|
||||
|
||||
{
|
||||
key = "<C-o>";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<C-o>zz";
|
||||
desc = "Jump back and center";
|
||||
}
|
||||
{
|
||||
key = "<C-i>";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<C-i>zz";
|
||||
desc = "Jump forward and center";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
132
modules/home/programs/neovim/languages.nix
Normal file
132
modules/home/programs/neovim/languages.nix
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.nvf.settings.vim = {
|
||||
diagnostics = {
|
||||
enable = true;
|
||||
config = {
|
||||
signs = {
|
||||
text = {
|
||||
"vim.diagnostic.severity.Error" = " ";
|
||||
"vim.diagnostic.severity.Warn" = " ";
|
||||
"vim.diagnostic.severity.Hint" = " ";
|
||||
"vim.diagnostic.severity.Info" = " ";
|
||||
};
|
||||
};
|
||||
underline = true;
|
||||
update_in_insert = true;
|
||||
virtual_text = {
|
||||
format =
|
||||
lib.generators.mkLuaInline
|
||||
# lua
|
||||
''
|
||||
function(diagnostic)
|
||||
return string.format("%s", diagnostic.message)
|
||||
--return string.format("%s (%s)", diagnostic.message, diagnostic.source)
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
nvim-lint = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
syntaxHighlighting = true;
|
||||
treesitter = {
|
||||
enable = true;
|
||||
autotagHtml = true;
|
||||
context.enable = true;
|
||||
highlight = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
lsp = {
|
||||
enable = true;
|
||||
trouble.enable = true;
|
||||
lspSignature.enable = true;
|
||||
lspconfig.enable = true;
|
||||
formatOnSave = true;
|
||||
inlayHints.enable = true;
|
||||
null-ls.enable = true;
|
||||
servers.nixd.settings.nil.nix.autoArchive = true;
|
||||
otter-nvim = {
|
||||
enable = true;
|
||||
setupOpts = {
|
||||
buffers.set_filetype = true;
|
||||
lsp = {
|
||||
diagnostic_update_event = [
|
||||
"BufWritePost"
|
||||
"InsertLeave"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
lspkind.enable = true;
|
||||
lspsaga = {
|
||||
enable = true;
|
||||
setupOpts = {
|
||||
ui = {
|
||||
code_action = "";
|
||||
};
|
||||
lightbulb = {
|
||||
sign = false;
|
||||
virtual_text = true;
|
||||
};
|
||||
breadcrumbs.enable = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
languages = {
|
||||
enableDAP = true;
|
||||
enableExtraDiagnostics = true;
|
||||
enableFormat = true;
|
||||
enableTreesitter = true;
|
||||
|
||||
astro.enable = true;
|
||||
python.enable = true;
|
||||
java.enable = true;
|
||||
clang.enable = true;
|
||||
go.enable = true;
|
||||
markdown = {
|
||||
enable = true;
|
||||
format.type = [ "prettierd" ];
|
||||
extensions = {
|
||||
markview-nvim = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
extraDiagnostics.enable = true;
|
||||
};
|
||||
ts.enable = true;
|
||||
ts.extensions.ts-error-translator.enable = true;
|
||||
css.enable = true;
|
||||
svelte.enable = true;
|
||||
ocaml.enable = true;
|
||||
haskell.enable = true;
|
||||
haskell.lsp.enable = true;
|
||||
haskell.treesitter.enable = true;
|
||||
haskell.dap.enable = false;
|
||||
html.enable = true;
|
||||
bash.enable = true;
|
||||
nix.enable = true;
|
||||
nix.format.type = [ "nixfmt" ];
|
||||
tailwind.enable = true;
|
||||
typst = {
|
||||
enable = true;
|
||||
lsp.enable = true;
|
||||
lsp.servers = [ "tinymist" ];
|
||||
format.enable = true;
|
||||
treesitter.enable = true;
|
||||
};
|
||||
rust.enable = true;
|
||||
};
|
||||
formatter = {
|
||||
conform-nvim = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
14
modules/home/programs/neovim/mini.nix
Normal file
14
modules/home/programs/neovim/mini.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
programs.nvf.settings.vim.mini = {
|
||||
starter.enable = true;
|
||||
comment.enable = true;
|
||||
# cursorword.enable = true;
|
||||
icons.enable = true;
|
||||
indentscope.enable = true;
|
||||
notify.enable = true;
|
||||
pairs.enable = true;
|
||||
diff.enable = true;
|
||||
git.enable = true;
|
||||
# snippets.enable = true;
|
||||
};
|
||||
}
|
||||
23
modules/home/programs/neovim/options.nix
Normal file
23
modules/home/programs/neovim/options.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
programs.nvf.settings.vim = {
|
||||
viAlias = false;
|
||||
vimAlias = true;
|
||||
withNodeJs = true;
|
||||
# syntaxHighlighting = true;
|
||||
options = {
|
||||
autoindent = true;
|
||||
shiftwidth = 2;
|
||||
signcolumn = "yes";
|
||||
tabstop = 2;
|
||||
softtabstop = 2;
|
||||
wrap = false;
|
||||
undofile = true;
|
||||
shada = "!,'100,<50,s10,h";
|
||||
};
|
||||
clipboard = {
|
||||
enable = true;
|
||||
registers = "unnamedplus";
|
||||
providers.wl-copy.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
256
modules/home/programs/neovim/picker.nix
Normal file
256
modules/home/programs/neovim/picker.nix
Normal file
|
|
@ -0,0 +1,256 @@
|
|||
{
|
||||
programs.nvf.settings.vim = {
|
||||
utility = {
|
||||
oil-nvim.enable = true;
|
||||
snacks-nvim = {
|
||||
setupOpts = {
|
||||
picker.enabled = true;
|
||||
explorer.enabled = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
keymaps = [
|
||||
# Top Pickers & Explorer
|
||||
{
|
||||
key = "<leader> ";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.smart()<cr>";
|
||||
desc = "Smart Find Files";
|
||||
}
|
||||
{
|
||||
key = "<leader>,";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.buffers()<cr>";
|
||||
desc = "Buffers";
|
||||
}
|
||||
{
|
||||
key = "<leader>/";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.grep()<cr>";
|
||||
desc = "Grep";
|
||||
}
|
||||
{
|
||||
key = "<leader>:";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.command_history()<cr>";
|
||||
desc = "Command History";
|
||||
}
|
||||
{
|
||||
key = "<leader>e";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.explorer()<cr>";
|
||||
desc = "File Explorer";
|
||||
}
|
||||
{
|
||||
key = "-";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>Oil<cr>";
|
||||
desc = "Oil";
|
||||
}
|
||||
|
||||
# Find
|
||||
{
|
||||
key = "<leader>fb";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.buffers()<cr>";
|
||||
desc = "Buffers";
|
||||
}
|
||||
{
|
||||
key = "<leader>fc";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = ''<cmd>lua Snacks.picker.files({ cwd = vim.fn.stdpath("config") })<cr>'';
|
||||
desc = "Find Config File";
|
||||
}
|
||||
{
|
||||
key = "<leader>ff";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.files()<cr>";
|
||||
desc = "Find Files";
|
||||
}
|
||||
{
|
||||
key = "<leader>fg";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.git_files()<cr>";
|
||||
desc = "Find Git Files";
|
||||
}
|
||||
{
|
||||
key = "<leader>fp";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.projects()<cr>";
|
||||
desc = "Projects";
|
||||
}
|
||||
{
|
||||
key = "<leader>fr";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.recent()<cr>";
|
||||
desc = "Recent";
|
||||
}
|
||||
{
|
||||
key = "<leader>fn";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.notifications()<cr>";
|
||||
desc = "Notification History";
|
||||
}
|
||||
{
|
||||
key = "<leader>fe";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.icons()<cr>";
|
||||
desc = "Emoji";
|
||||
}
|
||||
|
||||
# Git
|
||||
{
|
||||
key = "<leader>gb";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.git_branches()<cr>";
|
||||
desc = "Git Branches";
|
||||
}
|
||||
{
|
||||
key = "<leader>gL";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.git_log()<cr>";
|
||||
desc = "Git Log Line";
|
||||
}
|
||||
{
|
||||
key = "<leader>gs";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.git_status()<cr>";
|
||||
desc = "Git Status";
|
||||
}
|
||||
{
|
||||
key = "<leader>gS";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.git_stash()<cr>";
|
||||
desc = "Git Stash";
|
||||
}
|
||||
{
|
||||
key = "<leader>gd";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.git_diff()<cr>";
|
||||
desc = "Git Diff (Hunks)";
|
||||
}
|
||||
{
|
||||
key = "<leader>gf";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.git_log_file()<cr>";
|
||||
desc = "Git Log File";
|
||||
}
|
||||
|
||||
# Grep
|
||||
{
|
||||
key = "<leader>sb";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.lines()<cr>";
|
||||
desc = "Buffer Lines";
|
||||
}
|
||||
{
|
||||
key = "<leader>st";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.todo_comments()<cr>";
|
||||
desc = "Todos";
|
||||
}
|
||||
{
|
||||
key = "<leader>sB";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.grep_buffers()<cr>";
|
||||
desc = "Grep Open Buffers";
|
||||
}
|
||||
{
|
||||
key = "<leader>sg";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.grep()<cr>";
|
||||
desc = "Grep";
|
||||
}
|
||||
{
|
||||
key = "<leader>sw";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.grep_word()<cr>";
|
||||
desc = "Visual selection or word";
|
||||
}
|
||||
{
|
||||
key = "<leader>sr";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>nohlsearch<cr>";
|
||||
desc = "Reset search";
|
||||
}
|
||||
|
||||
# LSP
|
||||
{
|
||||
key = "gd";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.lsp_definitions()<cr>";
|
||||
desc = "Goto Definition";
|
||||
}
|
||||
{
|
||||
key = "gD";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.lsp_declarations()<cr>";
|
||||
desc = "Goto Declaration";
|
||||
}
|
||||
{
|
||||
key = "gr";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.lsp_references()<cr>";
|
||||
desc = "References";
|
||||
nowait = true;
|
||||
}
|
||||
{
|
||||
key = "gI";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.lsp_implementations()<cr>";
|
||||
desc = "Goto Implementation";
|
||||
}
|
||||
{
|
||||
key = "gy";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.lsp_type_definitions()<cr>";
|
||||
desc = "Goto Type Definition";
|
||||
}
|
||||
{
|
||||
key = "<leader>ss";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.lsp_symbols()<cr>";
|
||||
desc = "LSP Symbols";
|
||||
}
|
||||
{
|
||||
key = "<leader>sS";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.lsp_workspace_symbols()<cr>";
|
||||
desc = "LSP Workspace Symbols";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
19
modules/home/programs/neovim/snacks.nix
Normal file
19
modules/home/programs/neovim/snacks.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
programs.nvf.settings.vim.utility.snacks-nvim = {
|
||||
enable = true;
|
||||
setupOpts = {
|
||||
image = {
|
||||
enabled = true;
|
||||
doc = {
|
||||
inline = false;
|
||||
float = true;
|
||||
};
|
||||
};
|
||||
quickfile.enabled = true;
|
||||
statuscolumn.enabled = true;
|
||||
zen.enabled = true;
|
||||
bufdelete.enabled = true;
|
||||
gitsigns.enabled = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
149
modules/home/programs/neovim/utils.nix
Normal file
149
modules/home/programs/neovim/utils.nix
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.nvf.settings.vim = {
|
||||
undoFile.enable = true;
|
||||
# theme = lib.mkForce {
|
||||
# enable = true;
|
||||
# name = "catppuccin";
|
||||
# style = "latte";
|
||||
# transparent = false;
|
||||
# };
|
||||
|
||||
navigation = {
|
||||
harpoon.enable = true;
|
||||
};
|
||||
utility = {
|
||||
motion.flash-nvim.enable = true;
|
||||
outline.aerial-nvim.enable = true;
|
||||
diffview-nvim.enable = true;
|
||||
surround.enable = true;
|
||||
smart-splits.enable = true;
|
||||
yanky-nvim.enable = true;
|
||||
};
|
||||
tabline.nvimBufferline.enable = true;
|
||||
notes.todo-comments.enable = true;
|
||||
# assistant.copilot = {
|
||||
# enable = true;
|
||||
# cmp.enable = true;
|
||||
# };
|
||||
statusline.lualine.enable = true;
|
||||
autocomplete = {
|
||||
nvim-cmp = {
|
||||
enable = true;
|
||||
sources = {
|
||||
buffer = "[Buffer]";
|
||||
nvim-cmp = null;
|
||||
path = "[Path]";
|
||||
};
|
||||
sourcePlugins = [
|
||||
pkgs.vimPlugins.cmp-cmdline
|
||||
];
|
||||
};
|
||||
};
|
||||
snippets.luasnip.enable = true;
|
||||
snippets.luasnip.customSnippets.snipmate = {
|
||||
all = [
|
||||
{
|
||||
trigger = "if";
|
||||
body = "if $1 else $2";
|
||||
}
|
||||
];
|
||||
nix = [
|
||||
{
|
||||
trigger = "mkOption";
|
||||
body = ''
|
||||
mkOption {
|
||||
type = $1;
|
||||
default = $2;
|
||||
description = $3;
|
||||
example = $4;
|
||||
}
|
||||
'';
|
||||
}
|
||||
];
|
||||
haskell = [
|
||||
{
|
||||
trigger = "zzis";
|
||||
body = ''
|
||||
insert :: (Ord a) => a -> [a] -> [a]
|
||||
insert x [] = [x]
|
||||
insert x (y:ys)
|
||||
| x <= y = x : y : ys
|
||||
| otherwise = y : insert x ys
|
||||
|
||||
insertionSort :: (Ord a) => [a] -> [a]
|
||||
insertionSort [] = []
|
||||
insertionSort (x:xs) = insert x (insertionSort xs)
|
||||
'';
|
||||
}
|
||||
{
|
||||
trigger = "zzso";
|
||||
body = ''
|
||||
sortOn :: Ord b => (a -> b) -> [a] -> [a]
|
||||
sortOn f = foldr insert []
|
||||
where
|
||||
insert x [] = [x]
|
||||
insert x (y:ys)
|
||||
| f x <= f y = x : y : ys
|
||||
| otherwise = y : insert x ys
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
ui = {
|
||||
noice.enable = true;
|
||||
colorizer.enable = true;
|
||||
};
|
||||
visuals = {
|
||||
rainbow-delimiters.enable = true;
|
||||
nvim-scrollbar = {
|
||||
enable = false;
|
||||
};
|
||||
};
|
||||
git = {
|
||||
enable = true;
|
||||
gitsigns.enable = true;
|
||||
};
|
||||
terminal.toggleterm = {
|
||||
enable = true;
|
||||
lazygit = {
|
||||
enable = true;
|
||||
mappings.open = "<leader>gl";
|
||||
};
|
||||
};
|
||||
formatter.conform-nvim.enable = true;
|
||||
binds.hardtime-nvim.enable = true;
|
||||
utility.motion.precognition.enable = true;
|
||||
binds.hardtime-nvim.setupOpts = {
|
||||
max_count = 3; # Optional: limit of consecutive presses
|
||||
disabled_keys = {
|
||||
"<Up>" = false;
|
||||
"<Down>" = false;
|
||||
"<Left>" = false;
|
||||
"<Right>" = false;
|
||||
};
|
||||
restricted_keys = {
|
||||
"<Up>" = [
|
||||
"n"
|
||||
"x"
|
||||
];
|
||||
"<Down>" = [
|
||||
"n"
|
||||
"x"
|
||||
];
|
||||
"<Left>" = [
|
||||
"n"
|
||||
"x"
|
||||
];
|
||||
"<Right>" = [
|
||||
"n"
|
||||
"x"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue