Added: Nixvim modules
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
inputs.nixvim.homeModules.nixvim
|
||||
./neovim
|
||||
./python.nix
|
||||
|
||||
inputs.nixcord.homeModules.nixcord
|
||||
./nixcord.nix
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
_: {
|
||||
{ pkgs, ... }: {
|
||||
programs.sketchybar = {
|
||||
enable = true;
|
||||
|
||||
configType = "lua";
|
||||
sbarLuaPackage = pkgs.sbarlua;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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>" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -10,6 +10,7 @@
|
||||
ripgrep
|
||||
gh # Move to git
|
||||
zoxide # Move to fish
|
||||
unrar
|
||||
|
||||
# programming languages
|
||||
#mise # node, deno, bun, rust, python, etc.
|
||||
|
||||
26
home/python.nix
Normal file
26
home/python.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
# Python 3.13 (newest stable)
|
||||
python313
|
||||
python313Packages.pip
|
||||
python313Packages.virtualenv
|
||||
|
||||
# Additional useful tools
|
||||
python313Packages.pipx # Install Python apps in isolated environments
|
||||
uv # Fast Python package installer (alternative to pip)
|
||||
];
|
||||
|
||||
# Set up default Python version
|
||||
home.sessionVariables = { PYTHON = "${pkgs.python313}/bin/python3"; };
|
||||
|
||||
# Shell aliases for convenience
|
||||
programs.zsh.shellAliases = {
|
||||
venv = "python3 -m venv";
|
||||
activate = "source venv/bin/activate";
|
||||
};
|
||||
|
||||
programs.fish.shellAliases = {
|
||||
venv = "python3 -m venv";
|
||||
activate = "source venv/bin/activate.fish";
|
||||
};
|
||||
}
|
||||
@@ -7,6 +7,9 @@
|
||||
tree
|
||||
fastfetch # system stats
|
||||
tabiew # Table viewer
|
||||
glow # MD Viewer
|
||||
|
||||
llm # LLM in the Terminal
|
||||
|
||||
# Fun stuff
|
||||
lolcat
|
||||
@@ -87,7 +90,12 @@
|
||||
"sudo darwin-rebuild switch --flake ~/.config/nix#cyper-mac";
|
||||
};
|
||||
|
||||
initContent = "fastfetch";
|
||||
initContent = ''
|
||||
fastfetch
|
||||
ai() {
|
||||
llm -m groq/groq/compound "$@" | glow
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
programs.fish = {
|
||||
@@ -109,6 +117,12 @@
|
||||
fastfetch
|
||||
end
|
||||
'';
|
||||
|
||||
functions.ai = {
|
||||
body = ''
|
||||
llm -m groq/groq/compound $argv | glow
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
programs.starship = {
|
||||
|
||||
Reference in New Issue
Block a user