Added: Nixvim modules
This commit is contained in:
@@ -12,6 +12,9 @@
|
||||
./alpha.nix
|
||||
./avante.nix
|
||||
./openscad.nix
|
||||
./jupytext.nix
|
||||
./live-server.nix
|
||||
./which-key.nix
|
||||
];
|
||||
|
||||
programs.nixvim = {
|
||||
|
||||
18
home/neovim/jupytext.nix
Normal file
18
home/neovim/jupytext.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ ... }: {
|
||||
# Jupytext: Execute Jupyter notebooks directly in Neovim
|
||||
programs.nixvim.jupytext = {
|
||||
enable = true;
|
||||
settings = {
|
||||
custom_language_formatting = {
|
||||
python = {
|
||||
extension = "md";
|
||||
force_ft = "markdown";
|
||||
style = "markdown";
|
||||
};
|
||||
};
|
||||
force_ft = null;
|
||||
output_extension = "auto";
|
||||
style = "light";
|
||||
};
|
||||
};
|
||||
}
|
||||
15
home/neovim/live-server.nix
Normal file
15
home/neovim/live-server.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ pkgs, ... }: {
|
||||
# Live Server: Auto-reload browser for web development
|
||||
# Uses browser-sync for live reload functionality
|
||||
programs.nixvim = {
|
||||
keymaps = [{
|
||||
mode = "n";
|
||||
key = "<leader>ls";
|
||||
action =
|
||||
"<cmd>terminal browser-sync start --server --files '*.html, *.css, *.js' --no-notify<cr>";
|
||||
options.desc = "Start live server (browser-sync)";
|
||||
}];
|
||||
|
||||
extraPackages = with pkgs; [ nodePackages.browser-sync ];
|
||||
};
|
||||
}
|
||||
94
home/neovim/which-key.nix
Normal file
94
home/neovim/which-key.nix
Normal file
@@ -0,0 +1,94 @@
|
||||
{ pkgs, ... }: {
|
||||
# Which-key: Display available keybindings in popup
|
||||
# Shows all possible key combinations after pressing leader or other prefix keys
|
||||
programs.nixvim.plugins.which-key = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
delay = 500; # Time in ms before popup shows
|
||||
|
||||
icons = {
|
||||
breadcrumb = "»";
|
||||
separator = "➜";
|
||||
group = "+";
|
||||
};
|
||||
|
||||
# Organize keymaps into named groups
|
||||
spec = [
|
||||
# Leader key groups
|
||||
{
|
||||
__unkeyed-1 = "<leader>a";
|
||||
group = "Avante AI";
|
||||
icon = "🤖";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>f";
|
||||
group = "Find/Files/Terminal";
|
||||
icon = "🔍";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>m";
|
||||
group = "Molten (Jupyter)";
|
||||
icon = "📓";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "<leader>o";
|
||||
group = "OpenSCAD";
|
||||
icon = "🔧";
|
||||
}
|
||||
|
||||
# Bracket navigation groups
|
||||
{
|
||||
__unkeyed-1 = "[";
|
||||
group = "Previous";
|
||||
icon = "⬅️";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "]";
|
||||
group = "Next";
|
||||
icon = "➡️";
|
||||
}
|
||||
|
||||
# g prefix groups
|
||||
{
|
||||
__unkeyed-1 = "g";
|
||||
group = "Go/LSP";
|
||||
icon = "🎯";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "gr";
|
||||
group = "LSP References/Rename";
|
||||
icon = "🔗";
|
||||
}
|
||||
{
|
||||
__unkeyed-1 = "gc";
|
||||
group = "Comments";
|
||||
icon = "💬";
|
||||
}
|
||||
|
||||
# l prefix
|
||||
{
|
||||
__unkeyed-1 = "<leader>l";
|
||||
group = "Live Server";
|
||||
icon = "🌐";
|
||||
}
|
||||
|
||||
# z prefix
|
||||
{
|
||||
__unkeyed-1 = "z";
|
||||
group = "Folds/Spell";
|
||||
icon = "📋";
|
||||
}
|
||||
];
|
||||
|
||||
# Hide specific mappings to reduce clutter
|
||||
disable = {
|
||||
builtin_keys = {
|
||||
# Hide these default vim keys from which-key
|
||||
i = [ "<C-R>" "<C-W>" ];
|
||||
n = [ "<C-W>" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user