Compare commits

..

No commits in common. "8e03a31999b3b4c124daa5a38ff8b89a472b254c" and "526e41767ce89a0c0ca4574dc9cf154c877d975d" have entirely different histories.

19 changed files with 140 additions and 174 deletions

View file

@ -1,58 +1,54 @@
{...}: {
imports = [
# General Configuration
# General configuration.
./keymaps.nix
./options.nix
# Themes & Appearance
# Themes
./plugins/themes/default.nix
# Plugin Collections
./plugins/collections/mini.nix
./plugins/collections/snacks.nix
# Completion & AI Assistancee
# Completion
./plugins/cmp/cmp.nix
./plugins/cmp/copilot.nix
./plugins/cmp/copilot-chat.nix
# Debugging (DAP)
# Debug Adapter Protocol
./plugins/dap/dap.nix
./plugins/dap/dap-ui.nix
./plugins/dap/dap-virtual-text.nix
./plugins/dap/dap-python.nix
# Editor Enhancements
# Editor plugins and configurations
./plugins/editor/buffers.nix
./plugins/editor/commentary.nix
./plugins/editor/harpoon.nix
./plugins/editor/mini.nix
./plugins/editor/sessions.nix
./plugins/editor/smart-splits.nix
./plugins/editor/surround.nix
./plugins/editor/treesitter.nix
# User Interface Plugins
# UI plugins
./plugins/ui/lualine.nix
./plugins/ui/nvim-tree.nix
./plugins/ui/web-devicons.nix
./plugins/ui/whichkey.nix
# LSP and Formatting
# LSP and formatting
./plugins/lsp/conform.nix
./plugins/lsp/lsp.nix
# Git Integration
# Git
./plugins/git/fugitive.nix
./plugins/git/gitsigns.nix
# Markdown, Notes & Productivity
./plugins/notes/markdown-preview.nix
./plugins/notes/neorg.nix
./plugins/notes/render-markdown.nix
./plugins/notes/todo-comments.nix
# Utilities
# Utils
./plugins/utils/copilot-chat.nix
./plugins/utils/markdown-preview.nix
./plugins/utils/render-markdown.nix
./plugins/utils/oil.nix
./plugins/utils/telescope.nix
./plugins/utils/todo-comments.nix
./plugins/utils/vimtex.nix
./plugins/utils/vimwiki.nix
];
}

View file

@ -1,8 +1,5 @@
{...}: {
globals.mapleader = " ";
globals.maplocalleader = {
__raw = "vim.api.nvim_replace_termcodes('<BS>', false, false, true)";
};
keymaps = [
{
@ -14,7 +11,7 @@
};
}
{
{ # prefix: find
mode = ["n"];
key = "<leader>f";
action = "<NOP>";
@ -22,32 +19,5 @@
desc = "+find";
};
}
{
mode = ["n"];
key = "<PageUp>";
action = "<C-u>";
options = {
silent = true;
};
}
{
mode = ["n"];
key = "<PageDown>";
action = "<C-d>";
options = {
silent = true;
};
}
{
mode = ["n"];
key = "<Del>";
action = "zz";
options = {
silent = true;
};
}
];
}

View file

@ -6,6 +6,7 @@
showmode = false;
swapfile = false;
clipboard = "unnamedplus";
conceallevel = 1;
updatetime=100;
undofile = true;
splitright = true;
@ -16,10 +17,6 @@
shiftwidth = 2;
expandtab = true;
# Required for neorg
conceallevel = 2;
foldlevel = 99;
# Using this config for sessionoptions is recommended:
sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions";
};

View file

@ -27,10 +27,6 @@
{ # VimTex
name = "vimtex";
}
{ # Neorg
name = "neorg";
}
];
# Key mappings for the completion menu.

View file

@ -1,19 +0,0 @@
{...}:{
plugins.mini = {
enable = true;
# Extend and create a/i textobjects.
modules.ai = {
# Number of lines within which textobject is searched
n_lines = 50;
# How to search for object
search_method = "cover_or_next";
};
# Go forward/backward with square brackets.
modules.bracketed = { };
modules.align = { };
};
}

View file

@ -1,41 +0,0 @@
{...}:{
plugins.snacks = {
enable = true;
settings = {
bufdelete = {
enabled = true;
};
scroll = {
enabled = true;
};
};
};
keymaps = [
{
mode = ["n"];
key = "<leader>q";
action = {
__raw = "function() require('snacks').bufdelete() end";
};
options = {
desc = "Close current buffer";
silent = true;
};
}
{
mode = ["n"];
key = "<leader>Q";
action = {
__raw = "function() require('snacks').bufdelete.other() end";
};
options = {
desc = "Close other buffers";
silent = true;
};
}
];
}

View file

@ -0,0 +1,59 @@
{...}: {
plugins.bufdelete = {
enable = true;
};
keymaps = [
{
# buffer prefix
mode = "n";
key = "<leader>b";
action = "<Nop>";
options = {
desc = "+buffer";
};
}
{
# goto next buffer
mode = ["n"];
key = "]b";
action = ":bnext<cr>";
options = {
silent = true;
};
}
{
# goto previous buffer
mode = ["n"];
key = "[b";
action = ":bprevious<cr>";
options = {
silent = true;
};
}
{
# delete buffer
mode = ["n"];
key = "<leader>bd";
action = ":Bdelete<cr>";
options = {
desc = "bdelete";
silent = true;
};
}
{
# wipeout buffer
mode = ["n"];
key = "<leader>bw";
action = ":Bwipeout<cr>";
options = {
desc = "bwipeout";
silent = true;
};
}
];
}

View file

@ -0,0 +1,31 @@
{...}:{
plugins.mini = {
enable = true;
# Extend and create a/i textobjects.
modules.ai = {
# Module mappings.
mappings = {
# Main textobject prefixes
around = "a";
inside = "i";
# Next/last variants
around_next = "an";
inside_next = "in";
around_last = "al";
inside_last = "il";
# Move cursor to corresponding edge of `a` textobject
goto_left = "g[";
goto_right = "g]";
};
# Number of lines within which textobject is searched
n_lines = 50;
# How to search for object
search_method = "cover_or_next";
};
};
}

View file

@ -3,7 +3,7 @@
enable = true;
settings = {
multiplexer_integration = "wezterm";
multiplexer_integration = "WezTerm";
};
};

View file

@ -18,4 +18,25 @@
# Install all grammar packages.
grammarPackages = pkgs.vimPlugins.nvim-treesitter.allGrammars;
};
# Refactor modules for nvim-treesitter
plugins.treesitter-refactor = {
enable = true;
# Highlights definitions and usages.
highlightDefinitions = {
enable = true;
};
# Provides "go to usage"
navigation = {
enable = true;
# Go to the next / previous usage.
keymaps = {
gotoNextUsage = "]u";
gotoPreviousUsage = "[u";
};
};
};
}

View file

@ -49,6 +49,8 @@
# Configure keymaps for our diagnostics.
diagnostic = {
"<C-W>d" = "open_float"; # Show diagnostics in floating window.
"[d" = "goto_prev"; # Jump to previous diagnostic.
"]d" = "goto_next"; # Jump to next diagnostic.
};
# Configure keymaps for our lspbuf.
lspBuf = {
@ -63,7 +65,7 @@
# Renames all references to the symbol under the cursor.
"<leader>r" = {
action = "rename";
desc = "Rename reference";
desc = "Rename";
};
};

View file

@ -1,48 +0,0 @@
{...}:{
plugins.neorg = {
enable = true;
# Settings for the Neorg plugin
settings = {
load = {
# Load the core modules for Neorg
"core.defaults" = {
__empty = null;
};
# Display markup as icons, not text
"core.concealer" = {
__empty = null;
};
# Handle collections of notes
"core.dirman" = {
config = {
workspaces = {
notes = "~/Notes";
};
default_workspace = "notes";
};
};
# Treesitter integration
"core.integrations.treesitter" = {
config = {
install_parsers = true;
configure_parsers = true;
};
};
# Enable completions with nvim-cmp
"core.completion" = {
config = {
engine = "nvim-cmp";
};
};
"core.integrations.nvim-cmp" = {
__empty = null;
};
};
};
};
}

View file

@ -31,7 +31,7 @@
key = "<leader>n";
action = "<cmd>NvimTreeToggle<cr>";
options = {
desc = "Toggle file explorer";
desc = "Toggle NvimTree";
};
}
@ -40,7 +40,7 @@
key = "<leader>e";
action = "<cmd>NvimTreeFocus<cr>";
options = {
desc = "Focus file explorer";
desc = "Focus NvimTree";
};
}
];

View file

@ -3,9 +3,6 @@
enable = true;
settings = {
preset = "modern";
icons = {
mappings = false;
};
};
};

View file

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