fix: dev vm enhacement, switch podman

This commit is contained in:
Rasyidan Akbar F. 2025-10-29 15:30:41 +07:00
commit 831f307f83
70 changed files with 2977 additions and 962 deletions

View file

@ -1,111 +1,69 @@
{ pkgs, lib, ... }: {
home.stateVersion = "24.05";
imports = [
./programs/fastfetch.nix
./programs/helix.nix
./programs/neovim.nix
./shell/tmux.nix
./shell/starship
./devtools/ai-tools.nix
./devtools/languages.nix
./devtools/default.nix
./secrets.nix
];
programs.git.enable = true;
config = {
home.stateVersion = "24.05";
home.packages = with pkgs; [ docker docker-compose ];
# XDG Base Directory specification
# Ensures ~/.config, ~/.local/share, ~/.cache are properly set up
# Note: User directories (Desktop, Downloads, etc.) are configured in desktop modules
xdg.enable = true;
rsydn.aiTools = {
enable = lib.mkDefault true;
claude.zai.enable = lib.mkDefault true;
};
programs.git.enable = true;
rsydn.devTools = {
enable = lib.mkDefault true;
packages = with pkgs; [
ast-grep
cloudflared
ffmpeg
fzf
htop
jetbrains-mono
jq
jujutsu
lazydocker
lazygit
lorri
nil
nixd
pandoc
ripgrep
tmux
tree
curl
vim
wget
yq
];
};
home.packages = with pkgs; [ docker docker-compose ];
rsydn.languages = {
enable = lib.mkDefault true;
# Disable global language tools - use nix develop shells instead
cargo.enable = false;
go.enable = false;
bun.enable = false;
# Keep uv for MCP server and node for npx/tooling
uv.enable = true;
node.enable = true;
};
rsydn.aiTools = {
enable = lib.mkDefault true;
claude.zai.enable = lib.mkDefault true;
};
rsydn.secrets = lib.mkIf pkgs.stdenv.hostPlatform.isDarwin {
enable = lib.mkDefault true;
defaultSopsFile = ../../../secrets/local-ai-tokens.sops.yaml;
secrets = {
"openai-api-key" = {
format = "yaml";
key = "OPENAI_API_KEY";
};
rsydn.devTools = {
enable = lib.mkDefault true;
packages = with pkgs; [
ast-grep
cloudflared
ffmpeg
fzf
htop
jetbrains-mono
jq
jujutsu
lazydocker
lazygit
lorri
nil
nixd
pandoc
ripgrep
tmux
tree
curl
vim
wget
yq
];
};
"openrouter-api-key" = {
format = "yaml";
key = "OPENROUTER_API_KEY";
};
"zai-api-key" = {
format = "yaml";
key = "ZAI_API_KEY";
};
"moonshot-api-key" = {
format = "yaml";
key = "MOONSHOT_API_KEY";
};
"anthropic-api-key" = {
format = "yaml";
key = "ANTHROPIC_API_KEY";
};
"exa-api-key" = {
format = "yaml";
key = "EXA_API_KEY";
};
"fal-api-key" = {
format = "yaml";
key = "FAL_API_KEY";
};
"groq-api-key" = {
format = "yaml";
key = "GROQ_API_KEY";
};
"firecrawl-api-key" = {
format = "yaml";
key = "FIRECRAWL_API_KEY";
};
rsydn.languages = {
enable = lib.mkDefault true;
# Disable global language tools - use nix develop shells instead
cargo.enable = false;
go.enable = false;
bun.enable = false;
# Keep uv for MCP server and node for npx/tooling
uv.enable = true;
node.enable = true;
};
};
}

View file

@ -0,0 +1,156 @@
{ config, lib, pkgs, ... }:
{
home.packages = [ pkgs.fastfetch ];
# Copy the custom logo file
xdg.configFile."fastfetch/oguri-logo.txt".source = ./fastfetch/oguri-logo.txt;
xdg.configFile."fastfetch/config.jsonc".text =
let esc = builtins.fromJSON ''"\u001b"'';
in builtins.toJSON {
"$schema" =
"https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json";
logo = {
type = "file";
source = "~/.config/fastfetch/oguri-logo.txt";
color."1" = "green";
padding = {
top = 2;
right = 6;
left = 2;
};
};
display = {
separator = " ";
key = { width = 16; };
};
modules = [
"break"
# Hardware Section
{
type = "custom";
format =
"${esc}[32m Hardware${esc}[0m";
}
{
type = "host";
key = " PC";
keyColor = "green";
}
{
type = "cpu";
key = " CPU";
showPeCoreCount = true;
keyColor = "green";
}
{
type = "gpu";
key = " GPU";
detectionMethod = "pci";
keyColor = "green";
}
{
type = "display";
key = "󱄄 Display";
keyColor = "green";
}
{
type = "disk";
key = "󰋊 Disk";
keyColor = "green";
}
{
type = "memory";
key = " Memory";
keyColor = "green";
}
{
type = "swap";
key = "󰓡 Swap";
keyColor = "green";
}
"break"
# Software Section
{
type = "custom";
format =
"${esc}[34m Software${esc}[0m";
}
{
type = "command";
key = "ue900 OS";
keyColor = "blue";
text = ''version=$(omarchy-version); echo "Omarchy $version"'';
}
{
type = "command";
key = "󰘬 Branch";
keyColor = "blue";
text = ''branch=$(omarchy-version-branch); echo "$branch"'';
}
{
type = "kernel";
key = " Kernel";
keyColor = "blue";
}
{
type = "wm";
key = " WM";
keyColor = "blue";
}
{
type = "de";
key = " DE";
keyColor = "blue";
}
{
type = "terminal";
key = " Terminal";
keyColor = "blue";
}
{
type = "packages";
key = "󰏖 Packages";
keyColor = "blue";
}
{
type = "wmtheme";
key = "󰉼 WM Theme";
keyColor = "blue";
}
{
type = "terminalfont";
key = " Terminal Font";
keyColor = "blue";
}
"break"
# Uptime / Age Section
{
type = "custom";
format =
"${esc}[35m Uptime / Age${esc}[0m";
}
{
type = "command";
key = "󱦟 OS Age";
keyColor = "magenta";
# macOS compatible stat command
text = ''
if [ $(uname) = 'Darwin' ]; then birth=$(stat -f %B /); else birth=$(stat -c %W /); fi; current=$(date +%s); days=$(( (current - birth) / 86400 )); echo "$days days"'';
}
{
type = "uptime";
key = "󱫐 Uptime";
keyColor = "magenta";
}
"break"
];
};
}

View file

@ -0,0 +1,18 @@
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣾⣽⣶⣿⣏⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣼⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣽⣫
⣿⣿⣿⣿⣿⣿⣿⣿⣿⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⡿⣹⣿⡇⢸⣿⢿⣿⣿⡇⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⡿⣁⣇⣿⠈⡟⠘⣿⣿⡇⠸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣟⢀⠿⡏⣽⣴⣦⣿⣹⣿⡇⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣷⣶⣿⣿⣿⣿⣧⣿⣿⣷⣀⡀⣿⡟⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⣸⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣿⣿⣿⣿⣿⣷⣞⣿⣿⣿⣿⣿⡿⣹⠏⣿⠃⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⣿⣿⣿⣯⢀⣇⣀⡸⠁⢸⠏⢿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣿⣿⣏⡉⠻⣿⣿⡇⢠⣿⣄⢸⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠏⣸⣿⣿⣿⣿⣿⣦⣭⣑⢛⠋⠁⢸⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢸⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢯⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⢿⣿⣿⣿⣿
⣿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠋⢠⣿⣿⣿⣿⣿
⣿⣷⣿⣿⡿⠿⠿⠟⠛⣻⣿⣿⣿⣿⣿⣿⣿⡿⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⣠⣿⣿⣿⣟⣿⣿
⣿⣏⠁⢀⣶⣶⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣆⠈⠁⠉⠛⢿⣿⣿⣿⣴⣿⣿⠿⢋⡾⢡⣿

View file

@ -9,20 +9,48 @@
withPython3 = true;
withRuby = true;
plugins = with pkgs.vimPlugins; [
# Native extensions that need building
telescope-fzf-native-nvim
blink-cmp # Pre-built with Rust backend for fast fuzzy matching
];
extraPackages = with pkgs; [
# LSP servers
# LSP Servers
lua-language-server
nil
nil # Nix LSP
pyright
nodePackages.typescript-language-server
rust-analyzer
gopls
clang-tools # provides clangd
# Formatters
stylua
nixfmt
stylua # Lua
nixfmt-classic # Nix (matches your fmt command)
ruff # Python (formatter + linter)
prettierd # JS/TS/JSON/YAML/Markdown
rustfmt # Rust
gofumpt # Go (stricter than gofmt)
shfmt # Shell scripts
# Linters
nodePackages.eslint # JavaScript/TypeScript
shellcheck # Shell scripts
# Tools
ripgrep
fd
git
ast-grep
# Additional tools for LazyVim features
tree-sitter # Required for treesitter parser compilation
imagemagick # Image conversion for snacks.nvim
ghostscript # PDF rendering support
tectonic # LaTeX math rendering
luarocks # Lua package manager for plugins
nodePackages.mermaid-cli # Mermaid diagram rendering
];
};

View file

@ -1,8 +0,0 @@
tt.*
.tests
doc/tags
debug
.repro
foo.*
*.log
data

View file

@ -0,0 +1,27 @@
{
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
"runtime": {
"version": "LuaJIT",
"path": [
"lua/?.lua",
"lua/?/init.lua"
]
},
"diagnostics": {
"globals": ["vim"]
},
"workspace": {
"library": [
"${3rd}/luv/library",
"${3rd}/busted/library",
"${3rd}/luassert/library"
],
"checkThirdParty": false
},
"completion": {
"callSnippet": "Replace"
},
"telemetry": {
"enable": false
}
}

View file

@ -1,15 +0,0 @@
{
"neodev": {
"library": {
"enabled": true,
"plugins": true
}
},
"neoconf": {
"plugins": {
"lua_ls": {
"enabled": true
}
}
}
}

View file

@ -1,201 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View file

@ -1,4 +0,0 @@
# 💤 LazyVim
A starter template for [LazyVim](https://github.com/LazyVim/LazyVim).
Refer to the [documentation](https://lazyvim.github.io/installation) to get started.

View file

@ -1,2 +1,9 @@
-- bootstrap lazy.nvim, LazyVim and your plugins
-- Load configuration
require("config.options")
require("config.keymaps")
require("config.autocmds")
-- Load LazyVim utilities before lazy plugin manager
require("config.lazyvim")
require("config.lazy")

View file

@ -1,8 +1,9 @@
-- Autocmds are automatically loaded on the VeryLazy event
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
--
-- Add any additional autocmds here
-- with `vim.api.nvim_create_autocmd`
--
-- Or remove existing autocmds by their group name (which is prefixed with `lazyvim_` for the defaults)
-- e.g. vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell")
-- Essential autocommands (minimal)
local autocmd = vim.api.nvim_create_autocmd
-- Highlight on yank
autocmd("TextYankPost", {
callback = function()
vim.highlight.on_yank()
end,
})

View file

@ -1,3 +1,9 @@
-- Keymaps are automatically loaded on the VeryLazy event
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
-- Add any additional keymaps here
-- Essential keymaps (minimal improvements over default Vim)
local keymap = vim.keymap
-- Clear search highlight with <esc>
keymap.set("n", "<esc>", "<cmd>noh<cr>", { desc = "Clear search highlight" })
-- Better indenting (stay in visual mode)
keymap.set("v", "<", "<gv")
keymap.set("v", ">", ">gv")

View file

@ -13,36 +13,35 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
end
end
vim.opt.rtp:prepend(lazypath)
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
require("lazy").setup({
spec = {
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- import/override with your plugins
{
"LazyVim/LazyVim",
import = "lazyvim.plugins",
},
{ import = "plugins" },
},
defaults = {
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
lazy = false,
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
-- have outdated releases, which may break your Neovim install.
version = false, -- always use the latest git commit
-- version = "*", -- try installing the latest stable version for plugins that support semver
version = false,
},
install = { colorscheme = { "tokyonight", "habamax" } },
checker = {
enabled = true, -- check for plugin updates periodically
notify = false, -- notify on update
}, -- automatically check for plugin updates
install = { colorscheme = { "gruvbox", "habamax" } },
checker = { enabled = false },
change_detection = { notify = false },
performance = {
rtp = {
-- disable some rtp plugins
disabled_plugins = {
"gzip",
-- "matchit",
-- "matchparen",
-- "netrwPlugin",
"matchit",
"matchparen",
"netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",

View file

@ -0,0 +1,53 @@
-- LazyVim utilities module
-- Provides helper functions for plugin configuration
local M = {}
-- Mini module utilities
M.mini = {}
-- Setup mini.pairs with given options
function M.mini.pairs(opts)
require("mini.pairs").setup(opts)
end
-- Text object for entire buffer
M.mini.ai_buffer = function(ai)
local n_lines = vim.fn.line("$")
local start_line, end_line = 1, n_lines
if n_lines == 0 then
return { from = { line = 0, col = 0 } }
end
local start_col, end_col = 1, math.max(vim.fn.getline(end_line):len(), 1)
return {
from = { line = start_line, col = start_col },
to = { line = end_line, col = end_col },
}
end
-- Text object hints are now handled by mini.clue
-- Run callback when plugin is loaded
function M.on_load(name, fn)
local Config = require("lazy.core.config")
if Config.plugins[name] and Config.plugins[name]._.loaded then
vim.schedule(function()
fn(name)
end)
else
vim.api.nvim_create_autocmd("User", {
pattern = "LazyLoad",
callback = function(event)
if event.data == name then
fn(name)
return true
end
end,
})
end
end
-- Make LazyVim global
_G.LazyVim = M
return M

View file

@ -1,3 +1,38 @@
-- Options are automatically loaded before lazy.nvim startup
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here
-- Minimal essential options
local opt = vim.opt
-- Leader keys
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
-- Line numbers
opt.number = true
opt.relativenumber = true
-- Indentation
opt.tabstop = 2
opt.shiftwidth = 2
opt.expandtab = true
opt.smartindent = true
-- Search
opt.ignorecase = true
opt.smartcase = true
-- UI
opt.termguicolors = true
opt.signcolumn = "yes"
opt.cursorline = true
-- Splits
opt.splitbelow = true
opt.splitright = true
-- Clipboard
opt.clipboard = "unnamedplus"
-- Undo
opt.undofile = true
-- Mouse
opt.mouse = "a"

View file

@ -0,0 +1,80 @@
return {
-- Auto pairs
-- Automatically inserts a matching closing character
-- when you type an opening character like `"`, `[`, or `(`.
{
"nvim-mini/mini.pairs",
event = "VeryLazy",
opts = {
modes = { insert = true, command = true, terminal = false },
-- skip autopair when next character is one of these
skip_next = [=[[%w%%%'%[%"%%.%`%$]]=],
-- skip autopair when the cursor is inside these treesitter nodes
skip_ts = { "string" },
-- skip autopair when next character is closing pair
-- and there are more closing pairs than opening pairs
skip_unbalanced = true,
-- better deal with markdown code blocks
markdown = true,
},
config = function(_, opts)
LazyVim.mini.pairs(opts)
end,
},
-- Improves comment syntax, lets Neovim handle multiple
-- types of comments for a single language, and relaxes rules
-- for uncommenting.
{
"folke/ts-comments.nvim",
event = "VeryLazy",
opts = {},
},
-- Extends the a & i text objects, this adds the ability to select
-- arguments, function calls, text within quotes and brackets
{
"nvim-mini/mini.ai",
event = "VeryLazy",
opts = function()
local ai = require("mini.ai")
return {
n_lines = 500,
custom_textobjects = {
o = ai.gen_spec.treesitter({
a = { "@block.outer", "@conditional.outer", "@loop.outer" },
i = { "@block.inner", "@conditional.inner", "@loop.inner" },
}),
f = ai.gen_spec.treesitter({ a = "@function.outer", i = "@function.inner" }),
c = ai.gen_spec.treesitter({ a = "@class.outer", i = "@class.inner" }),
t = { "<(%p%w-)%f[^<%w][^<>]->.*()</[^/]->$" },
d = { "%f[%d]%d+" },
e = { { "%u[%l%d]+%f[^%l%d]", "%f[%S][%l%d]+%f[^%l%d]" }, "^().*()$" },
g = LazyVim.mini.ai_buffer,
u = ai.gen_spec.function_call(),
U = ai.gen_spec.function_call({ name_pattern = "[%w_]" }),
},
}
end,
config = function(_, opts)
require("mini.ai").setup(opts)
-- mini.clue handles text object hints automatically
end,
},
-- Configures LuaLS to support auto-completion and type checking
-- while editing your Neovim configuration.
{
"folke/lazydev.nvim",
ft = "lua",
cmd = "LazyDev",
opts = {
library = {
{ path = "${3rd}/luv/library", words = { "vim.uv" } },
{ path = "LazyVim", words = { "LazyVim" } },
{ path = "snacks.nvim", words = { "Snacks" } },
{ path = "lazy.nvim", words = { "LazyVim" } },
},
},
},
}

View file

@ -0,0 +1,75 @@
return {
-- gruvbox
{
"ellisonleao/gruvbox.nvim",
lazy = false,
priority = 1000,
opts = {},
config = function()
require("gruvbox").setup({})
vim.cmd.colorscheme("gruvbox")
end,
},
-- tokyonight
{
"folke/tokyonight.nvim",
lazy = true,
opts = { style = "moon" },
},
-- catppuccin
{
"catppuccin/nvim",
lazy = true,
priority = 1000,
name = "catppuccin",
opts = {
lsp_styles = {
underlines = {
errors = { "undercurl" },
hints = { "undercurl" },
warnings = { "undercurl" },
information = { "undercurl" },
},
},
-- integrations = {
-- aerial = true,
-- alpha = true,
-- cmp = true,
-- dashboard = true,
-- flash = true,
-- fzf = true,
-- grug_far = true,
-- gitsigns = true,
-- headlines = true,
-- illuminate = true,
-- indent_blankline = { enabled = true },
-- leap = true,
-- lsp_trouble = true,
-- mason = true,
-- mini = true,
-- navic = { enabled = true, custom_bg = "lualine" },
-- neotest = true,
-- neotree = true,
-- noice = true,
-- notify = true,
-- snacks = true,
-- telescope = true,
-- treesitter_context = true,
-- which_key = true,
-- },
},
-- specs = {
-- {
-- "akinsho/bufferline.nvim",
-- optional = true,
-- opts = function(_, opts)
-- if (vim.g.colors_name or ""):find("catppuccin") then
-- opts.highlights = require("catppuccin.special.bufferline").get_theme()
-- end
-- end,
-- },
-- },
},
}

View file

@ -0,0 +1,48 @@
return {
-- Modern completion engine with built-in fuzzy matching
-- Note: Installed via Nix with pre-built Rust backend (see neovim.nix)
{
"saghen/blink.cmp",
dependencies = {
"rafamadriz/friendly-snippets",
},
version = "1.*",
event = "InsertEnter",
build = nil, -- Disable build since Nix provides pre-compiled version
opts = {
-- Keymap preset options: 'default' | 'super-tab' | 'enter'
keymap = { preset = "default" },
appearance = {
-- Use mono nerd font variant
nerd_font_variant = "mono",
},
-- Default completion sources
sources = {
default = { "lsp", "path", "snippets", "buffer" },
},
completion = {
documentation = {
auto_show = true,
auto_show_delay_ms = 500,
},
menu = {
draw = {
columns = { { "label", "label_description", gap = 1 }, { "kind_icon", "kind" } },
},
},
},
-- Fuzzy matching implementation
-- Using "rust" since Nix provides pre-built native module
fuzzy = {
use_typo_resistance = true,
use_frecency = true,
use_proximity = true,
},
},
opts_extend = { "sources.default" },
},
}

View file

@ -0,0 +1,33 @@
return {
{
"folke/snacks.nvim",
opts = {
dashboard = {
preset = {
header = [[
]],
},
},
},
},
}

View file

@ -1,197 +0,0 @@
-- since this is just an example spec, don't actually load anything here and return an empty spec
-- stylua: ignore
if true then return {} end
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
--
-- In your plugin files, you can:
-- * add extra plugins
-- * disable/enabled LazyVim plugins
-- * override the configuration of LazyVim plugins
return {
-- add gruvbox
{ "ellisonleao/gruvbox.nvim" },
-- Configure LazyVim to load gruvbox
{
"LazyVim/LazyVim",
opts = {
colorscheme = "gruvbox",
},
},
-- change trouble config
{
"folke/trouble.nvim",
-- opts will be merged with the parent spec
opts = { use_diagnostic_signs = true },
},
-- disable trouble
{ "folke/trouble.nvim", enabled = false },
-- override nvim-cmp and add cmp-emoji
{
"hrsh7th/nvim-cmp",
dependencies = { "hrsh7th/cmp-emoji" },
---@param opts cmp.ConfigSchema
opts = function(_, opts)
table.insert(opts.sources, { name = "emoji" })
end,
},
-- change some telescope options and a keymap to browse plugin files
{
"nvim-telescope/telescope.nvim",
keys = {
-- add a keymap to browse plugin files
-- stylua: ignore
{
"<leader>fp",
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
desc = "Find Plugin File",
},
},
-- change some options
opts = {
defaults = {
layout_strategy = "horizontal",
layout_config = { prompt_position = "top" },
sorting_strategy = "ascending",
winblend = 0,
},
},
},
-- add pyright to lspconfig
{
"neovim/nvim-lspconfig",
---@class PluginLspOpts
opts = {
---@type lspconfig.options
servers = {
-- pyright will be automatically installed with mason and loaded with lspconfig
pyright = {},
},
},
},
-- add tsserver and setup with typescript.nvim instead of lspconfig
{
"neovim/nvim-lspconfig",
dependencies = {
"jose-elias-alvarez/typescript.nvim",
init = function()
require("lazyvim.util").lsp.on_attach(function(_, buffer)
-- stylua: ignore
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
end)
end,
},
---@class PluginLspOpts
opts = {
---@type lspconfig.options
servers = {
-- tsserver will be automatically installed with mason and loaded with lspconfig
tsserver = {},
},
-- you can do any additional lsp server setup here
-- return true if you don't want this server to be setup with lspconfig
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
setup = {
-- example to setup with typescript.nvim
tsserver = function(_, opts)
require("typescript").setup({ server = opts })
return true
end,
-- Specify * to use this function as a fallback for any server
-- ["*"] = function(server, opts) end,
},
},
},
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
{ import = "lazyvim.plugins.extras.lang.typescript" },
-- add more treesitter parsers
{
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"bash",
"html",
"javascript",
"json",
"lua",
"markdown",
"markdown_inline",
"python",
"query",
"regex",
"tsx",
"typescript",
"vim",
"yaml",
},
},
},
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
-- would overwrite `ensure_installed` with the new value.
-- If you'd rather extend the default config, use the code below instead:
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
-- add tsx and treesitter
vim.list_extend(opts.ensure_installed, {
"tsx",
"typescript",
})
end,
},
-- the opts function can also be used to change the default opts:
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
opts = function(_, opts)
table.insert(opts.sections.lualine_x, {
function()
return "😄"
end,
})
end,
},
-- or you can return new options to override all the defaults
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
opts = function()
return {
--[[add your custom lualine config here]]
}
end,
},
-- use mini.starter instead of alpha
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
-- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc
{ import = "lazyvim.plugins.extras.lang.json" },
-- add any tools you want to have installed below
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
"stylua",
"shellcheck",
"shfmt",
"flake8",
},
},
},
}

View file

@ -0,0 +1,56 @@
return {
-- Telescope - Fuzzy finder over lists
{
"nvim-telescope/telescope.nvim",
tag = "0.1.8",
dependencies = {
"nvim-lua/plenary.nvim",
},
cmd = "Telescope",
keys = {
{ "<leader>ff", "<cmd>Telescope find_files<cr>", desc = "Find Files" },
{ "<leader>fg", "<cmd>Telescope live_grep<cr>", desc = "Live Grep" },
{ "<leader>fb", "<cmd>Telescope buffers<cr>", desc = "Buffers" },
{ "<leader>fh", "<cmd>Telescope help_tags<cr>", desc = "Help Tags" },
},
opts = {
defaults = {
-- Removed which_key mapping - mini.clue handles keybind hints globally
},
},
},
-- Telescope FZF native - Better sorting performance
-- Note: Installed via Nix (see neovim.nix) to avoid build issues
{
"nvim-telescope/telescope-fzf-native.nvim",
dependencies = { "nvim-telescope/telescope.nvim" },
config = function()
require("telescope").load_extension("fzf")
end,
},
-- Neo-tree - File explorer tree
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
"nvim-tree/nvim-web-devicons",
},
cmd = "Neotree",
keys = {
{ "<leader>e", "<cmd>Neotree toggle<cr>", desc = "Toggle Neo-tree" },
{ "<leader>o", "<cmd>Neotree focus<cr>", desc = "Focus Neo-tree" },
},
opts = {
filesystem = {
follow_current_file = {
enabled = true,
},
use_libuv_file_watcher = true,
},
},
},
}

View file

@ -0,0 +1,59 @@
return {
{
"stevearc/conform.nvim",
event = { "BufWritePre" },
cmd = { "ConformInfo" },
keys = {
{
"<leader>cf",
function()
require("conform").format({ async = true, lsp_fallback = true })
end,
mode = { "n", "v" },
desc = "Format buffer",
},
},
opts = {
formatters_by_ft = {
lua = { "stylua" },
nix = { "nixfmt" },
python = { "ruff_format", "ruff_organize_imports" },
javascript = { "prettierd", "prettier", stop_after_first = true },
typescript = { "prettierd", "prettier", stop_after_first = true },
javascriptreact = { "prettierd", "prettier", stop_after_first = true },
typescriptreact = { "prettierd", "prettier", stop_after_first = true },
json = { "prettierd", "prettier", stop_after_first = true },
jsonc = { "prettierd", "prettier", stop_after_first = true },
yaml = { "prettierd", "prettier", stop_after_first = true },
markdown = { "prettierd", "prettier", stop_after_first = true },
html = { "prettierd", "prettier", stop_after_first = true },
css = { "prettierd", "prettier", stop_after_first = true },
scss = { "prettierd", "prettier", stop_after_first = true },
rust = { "rustfmt" },
go = { "gofumpt" },
sh = { "shfmt" },
bash = { "shfmt" },
zsh = { "shfmt" },
},
-- Format on save
format_on_save = {
timeout_ms = 500,
lsp_fallback = true,
},
-- Customize formatters
formatters = {
shfmt = {
prepend_args = { "-i", "2" }, -- 2 space indent
},
ruff_format = {
command = "ruff",
args = { "format", "--stdin-filename", "$FILENAME" },
},
ruff_organize_imports = {
command = "ruff",
args = { "check", "--select", "I", "--fix", "--stdin-filename", "$FILENAME" },
},
},
},
},
}

View file

@ -0,0 +1,58 @@
return {
{
"mfussenegger/nvim-lint",
event = { "BufReadPost", "BufNewFile", "BufWritePost" },
opts = {
events = { "BufWritePost", "BufReadPost", "InsertLeave" },
linters_by_ft = {
javascript = { "eslint" },
typescript = { "eslint" },
javascriptreact = { "eslint" },
typescriptreact = { "eslint" },
python = { "ruff" },
sh = { "shellcheck" },
bash = { "shellcheck" },
},
linters = {},
},
config = function(_, opts)
local lint = require("lint")
-- Merge custom linter configs
for name, linter in pairs(opts.linters) do
if type(linter) == "table" and type(lint.linters[name]) == "table" then
lint.linters[name] = vim.tbl_deep_extend("force", lint.linters[name], linter)
else
lint.linters[name] = linter
end
end
lint.linters_by_ft = opts.linters_by_ft
-- Debounced lint function with proper timer management
local timer = vim.uv.new_timer()
local function debounce_lint()
-- Stop existing timer before starting new one to prevent EALREADY error
timer:stop()
timer:start(100, 0, vim.schedule_wrap(lint.try_lint))
end
-- Create autocommand for linting
vim.api.nvim_create_autocmd(opts.events, {
group = vim.api.nvim_create_augroup("nvim-lint", { clear = true }),
callback = debounce_lint,
})
-- Clean up timer on exit
vim.api.nvim_create_autocmd("VimLeavePre", {
group = vim.api.nvim_create_augroup("nvim-lint-cleanup", { clear = true }),
callback = function()
if timer and not timer:is_closing() then
timer:stop()
timer:close()
end
end,
})
end,
},
}

View file

@ -0,0 +1,106 @@
-- LSP configuration using Nix-managed servers
return {
-- Disable Mason plugins (we use Nix-managed servers instead)
{ "mason-org/mason.nvim", enabled = false },
{ "mason-org/mason-lspconfig.nvim", enabled = false },
{ "jay-babu/mason-null-ls.nvim", enabled = false },
{ "jay-babu/mason-nvim-dap.nvim", enabled = false },
{
"neovim/nvim-lspconfig",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
"saghen/blink.cmp", -- For LSP capabilities
},
config = function()
-- Get blink.cmp capabilities
local capabilities = require("blink.cmp").get_lsp_capabilities()
-- Common LSP attach keybindings
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
callback = function(ev)
local opts = { buffer = ev.buf }
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts)
vim.keymap.set("n", "gr", vim.lsp.buf.references, opts)
vim.keymap.set("n", "gi", vim.lsp.buf.implementation, opts)
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, opts)
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts)
vim.keymap.set("n", "<leader>d", vim.diagnostic.open_float, opts)
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts)
vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts)
end,
})
-- Configure each LSP server
local lspconfig = require("lspconfig")
-- Lua
lspconfig.lua_ls.setup({
capabilities = capabilities,
settings = {
Lua = {
runtime = { version = "LuaJIT" },
diagnostics = { globals = { "vim" } },
workspace = {
library = vim.api.nvim_get_runtime_file("", true),
checkThirdParty = false,
},
telemetry = { enable = false },
},
},
})
-- Nix
lspconfig.nil_ls.setup({
capabilities = capabilities,
settings = {
["nil"] = {
formatting = { command = { "nixfmt" } },
},
},
})
-- Python
lspconfig.pyright.setup({
capabilities = capabilities,
settings = {
python = {
analysis = {
typeCheckingMode = "basic",
autoSearchPaths = true,
useLibraryCodeForTypes = true,
},
},
},
})
-- TypeScript/JavaScript
lspconfig.ts_ls.setup({
capabilities = capabilities,
})
-- Rust
lspconfig.rust_analyzer.setup({
capabilities = capabilities,
settings = {
["rust-analyzer"] = {
checkOnSave = { command = "clippy" },
},
},
})
-- Go
lspconfig.gopls.setup({
capabilities = capabilities,
})
-- C/C++
lspconfig.clangd.setup({
capabilities = capabilities,
})
end,
},
}

View file

@ -0,0 +1,4 @@
return {
"sphamba/smear-cursor.nvim",
opts = {},
}

View file

@ -0,0 +1,51 @@
return {
{
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"bash",
"c",
"cpp",
"css",
"diff",
"dockerfile",
"git_config",
"git_rebase",
"gitcommit",
"gitignore",
"go",
"gomod",
"gosum",
"html",
"javascript",
"jsdoc",
"json",
"jsonc",
"latex",
"lua",
"luadoc",
"luap",
"markdown",
"markdown_inline",
"nix",
"norg",
"printf",
"python",
"query",
"regex",
"rust",
"scss",
"svelte",
"toml",
"tsx",
"typescript",
"typst",
"vim",
"vimdoc",
"vue",
"xml",
"yaml",
},
},
},
}

View file

@ -0,0 +1,174 @@
return {
-- Better UI for messages, cmdline and the popupmenu
{
"folke/noice.nvim",
event = "VeryLazy",
opts = {
lsp = {
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true,
},
},
routes = {
{
filter = {
event = "msg_show",
any = {
{ find = "%d+L, %d+B" },
{ find = "; after #%d+" },
{ find = "; before #%d+" },
},
},
view = "mini",
},
},
presets = {
bottom_search = true,
command_palette = true,
long_message_to_split = true,
},
},
keys = {
{ "<leader>sn", "", desc = "+noice" },
{ "<leader>snl", function() require("noice").cmd("last") end, desc = "Noice Last Message" },
{ "<leader>snh", function() require("noice").cmd("history") end, desc = "Noice History" },
{ "<leader>sna", function() require("noice").cmd("all") end, desc = "Noice All" },
{ "<leader>snd", function() require("noice").cmd("dismiss") end, desc = "Dismiss All" },
},
dependencies = {
"MunifTanjim/nui.nvim",
},
},
-- Statusline
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
opts = function()
return {
options = {
theme = "auto",
globalstatus = true,
disabled_filetypes = { statusline = { "dashboard", "alpha", "starter" } },
},
sections = {
lualine_a = { "mode" },
lualine_b = { "branch" },
lualine_c = {
{
"diagnostics",
symbols = {
error = " ",
warn = " ",
info = " ",
hint = " ",
},
},
{ "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } },
{ "filename", path = 1, symbols = { modified = " ", readonly = "", unnamed = "" } },
},
lualine_x = {
{
"diff",
symbols = {
added = " ",
modified = " ",
removed = " ",
},
},
},
lualine_y = {
{ "progress", separator = " ", padding = { left = 1, right = 0 } },
{ "location", padding = { left = 0, right = 1 } },
},
lualine_z = {
function()
return " " .. os.date("%R")
end,
},
},
extensions = { "lazy" },
}
end,
},
-- Bufferline
{
"akinsho/bufferline.nvim",
event = "VeryLazy",
keys = {
{ "<leader>bp", "<Cmd>BufferLineTogglePin<CR>", desc = "Toggle Pin" },
{ "<leader>bP", "<Cmd>BufferLineGroupClose ungrouped<CR>", desc = "Delete Non-Pinned Buffers" },
{ "<leader>bo", "<Cmd>BufferLineCloseOthers<CR>", desc = "Delete Other Buffers" },
{ "<leader>br", "<Cmd>BufferLineCloseRight<CR>", desc = "Delete Buffers to the Right" },
{ "<leader>bl", "<Cmd>BufferLineCloseLeft<CR>", desc = "Delete Buffers to the Left" },
{ "<S-h>", "<cmd>BufferLineCyclePrev<cr>", desc = "Prev Buffer" },
{ "<S-l>", "<cmd>BufferLineCycleNext<cr>", desc = "Next Buffer" },
{ "[b", "<cmd>BufferLineCyclePrev<cr>", desc = "Prev Buffer" },
{ "]b", "<cmd>BufferLineCycleNext<cr>", desc = "Next Buffer" },
},
opts = {
options = {
close_command = function(n) require("mini.bufremove").delete(n, false) end,
right_mouse_command = function(n) require("mini.bufremove").delete(n, false) end,
diagnostics = "nvim_lsp",
always_show_bufferline = false,
offsets = {
{
filetype = "neo-tree",
text = "Neo-tree",
highlight = "Directory",
text_align = "left",
},
},
},
},
dependencies = {
{
"nvim-mini/mini.bufremove",
keys = {
{ "<leader>bd", function() require("mini.bufremove").delete(0, false) end, desc = "Delete Buffer" },
{ "<leader>bD", function() require("mini.bufremove").delete(0, true) end, desc = "Delete Buffer (Force)" },
},
opts = {},
},
},
},
-- Indent guides
{
"lukas-reineke/indent-blankline.nvim",
event = { "BufReadPost", "BufNewFile" },
opts = {
indent = {
char = "",
tab_char = "",
},
scope = { show_start = false, show_end = false },
exclude = {
filetypes = {
"help",
"alpha",
"dashboard",
"neo-tree",
"Trouble",
"trouble",
"lazy",
"mason",
"notify",
"toggleterm",
"lazyterm",
},
},
},
main = "ibl",
},
-- Icons
{
"nvim-tree/nvim-web-devicons",
lazy = true,
},
}

View file

@ -0,0 +1,78 @@
return {
-- Disable which-key (we use mini.clue instead)
{ "folke/which-key.nvim", enabled = false },
-- mini.clue - Lightweight keybind hints
{
"nvim-mini/mini.clue",
event = "VeryLazy",
config = function()
local miniclue = require("mini.clue")
miniclue.setup({
triggers = {
-- Leader triggers
{ mode = "n", keys = "<Leader>" },
{ mode = "x", keys = "<Leader>" },
-- Built-in completion
{ mode = "i", keys = "<C-x>" },
-- `g` key
{ mode = "n", keys = "g" },
{ mode = "x", keys = "g" },
-- Marks
{ mode = "n", keys = "'" },
{ mode = "n", keys = "`" },
{ mode = "x", keys = "'" },
{ mode = "x", keys = "`" },
-- Registers
{ mode = "n", keys = '"' },
{ mode = "x", keys = '"' },
{ mode = "i", keys = "<C-r>" },
{ mode = "c", keys = "<C-r>" },
-- Window commands
{ mode = "n", keys = "<C-w>" },
-- `z` key
{ mode = "n", keys = "z" },
{ mode = "x", keys = "z" },
-- Bracketed commands
{ mode = "n", keys = "[" },
{ mode = "n", keys = "]" },
},
clues = {
-- Enhance this by adding descriptions for <Leader> mapping groups
miniclue.gen_clues.builtin_completion(),
miniclue.gen_clues.g(),
miniclue.gen_clues.marks(),
miniclue.gen_clues.registers(),
miniclue.gen_clues.windows(),
miniclue.gen_clues.z(),
-- Custom leader key descriptions
{ mode = "n", keys = "<Leader>b", desc = "+buffer" },
{ mode = "n", keys = "<Leader>c", desc = "+code" },
{ mode = "n", keys = "<Leader>d", desc = "+diagnostics" },
{ mode = "n", keys = "<Leader>e", desc = "+explorer" },
{ mode = "n", keys = "<Leader>f", desc = "+find" },
{ mode = "n", keys = "<Leader>o", desc = "+open" },
{ mode = "n", keys = "<Leader>r", desc = "+rename" },
{ mode = "n", keys = "<Leader>s", desc = "+search" },
},
window = {
delay = 300, -- Show hints after 300ms
config = {
width = "auto",
border = "rounded",
},
},
})
end,
},
}

View file

@ -1,3 +0,0 @@
indent_type = "Spaces"
indent_width = 2
column_width = 120

View file

@ -1,6 +1,4 @@
{ config, pkgs, lib, ... }: {
imports = [ ./oh-my-posh ];
programs.fish = {
enable = true;
interactiveShellInit = ''
@ -10,8 +8,6 @@
'';
};
programs.oh-my-posh.enableFishIntegration = lib.mkDefault true;
# Ensure fish is available for login shells on Linux hosts.
home.packages = lib.mkAfter [ pkgs.fish ];
}

View file

@ -1,6 +1,7 @@
{ config, pkgs, lib, ... }:
let
profileBin = "${config.home.profileDirectory}/bin";
# System binaries path - same on both NixOS and Darwin
systemBin = "/run/current-system/sw/bin";
defaultBin = "/nix/var/nix/profiles/default/bin";
darwinHomebrewDir = if pkgs.stdenv.hostPlatform.isAarch64 then
@ -25,50 +26,55 @@ let
formatPathList = paths:
lib.concatMapStrings (path: " \"${path}\"\n") paths;
in {
imports = [ ./oh-my-posh ];
imports = [ ./starship ];
programs.nushell.enable = lib.mkDefault true;
programs.nushell.extraConfig = ''
# Dotfiles QA validation command
def dotfiles-qa [] {
let dotfiles_dir = "${config.home.homeDirectory}/Development/dotfiles"
def dotfiles-qa [] {
let dotfiles_dir = "${config.home.homeDirectory}/Development/dotfiles"
print $"(ansi green_bold)Running dotfiles QA validation...(ansi reset)\n"
print $"(ansi green_bold)Running dotfiles QA validation...(ansi reset)\n"
# Step 1: Format check
print $"(ansi blue)1. Formatting nix files...(ansi reset)"
cd $dotfiles_dir
nix fmt .
if $env.LAST_EXIT_CODE != 0 {
print $"(ansi red_bold) Formatting failed(ansi reset)"
return
# Step 1: Format check
print $"(ansi blue)1. Formatting nix files...(ansi reset)"
cd $dotfiles_dir
nix fmt .
if $env.LAST_EXIT_CODE != 0 {
print $"(ansi red_bold) Formatting failed(ansi reset)"
return
}
print $"(ansi green) Formatting complete(ansi reset)\n"
# Step 2: Flake check
print $"(ansi blue)2. Running flake check...(ansi reset)"
nix flake check
if $env.LAST_EXIT_CODE != 0 {
print $"(ansi red_bold) Flake check failed(ansi reset)"
return
}
print $"(ansi green) Flake check passed(ansi reset)\n"
# Step 3: Build (without activation)
print $"(ansi blue)3. Building darwin configuration (no activation)...(ansi reset)"
darwin-rebuild build --flake $"($dotfiles_dir)#macbook-pro"
if $env.LAST_EXIT_CODE != 0 {
print $"(ansi yellow) Build had warnings, but may still work(ansi reset)\n"
} else {
print $"(ansi green) Build successful(ansi reset)\n"
}
print $"(ansi green_bold) Core QA checks passed!(ansi reset)"
}
print $"(ansi green) Formatting complete(ansi reset)\n"
# Step 2: Flake check
print $"(ansi blue)2. Running flake check...(ansi reset)"
nix flake check
if $env.LAST_EXIT_CODE != 0 {
print $"(ansi red_bold) Flake check failed(ansi reset)"
return
}
print $"(ansi green) Flake check passed(ansi reset)\n"
# Step 3: Build (without activation)
print $"(ansi blue)3. Building darwin configuration (no activation)...(ansi reset)"
darwin-rebuild build --flake $"($dotfiles_dir)#macbook-pro"
if $env.LAST_EXIT_CODE != 0 {
print $"(ansi yellow) Build had warnings, but may still work(ansi reset)\n"
} else {
print $"(ansi green) Build successful(ansi reset)\n"
}
print $"(ansi green_bold) Core QA checks passed!(ansi reset)"
}
'';
programs.nushell.envFile.text = ''
# Set XDG Base Directory environment variables
$env.XDG_CONFIG_HOME = "${config.xdg.configHome}"
$env.XDG_DATA_HOME = "${config.xdg.dataHome}"
$env.XDG_CACHE_HOME = "${config.xdg.cacheHome}"
let nix_paths = [
${formatPathList [ profileBin systemBin defaultBin ]} ]
@ -113,6 +119,4 @@ in {
load-secret "groq-api-key" "GROQ_API_KEY"
load-secret "firecrawl-api-key" "FIRECRAWL_API_KEY"
'';
programs.oh-my-posh.enableNushellIntegration = lib.mkDefault true;
}

View file

@ -1,86 +0,0 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "right",
"segments": [
{
"background": "#003543",
"foreground": "#ffffff",
"style": "plain",
"template": " \ue641 {{ .CurrentDate | date .Format }} ",
"type": "time"
},
{
"background": "#83769c",
"foreground": "#ffffff",
"properties": {
"always_enabled": true
},
"style": "plain",
"template": " \ueba2 {{ .FormattedMs }} ",
"type": "executiontime"
}
],
"type": "rprompt"
},
{
"alignment": "left",
"segments": [
{
"background": "#61AFEF",
"foreground": "#ffffff",
"properties": {
"display_host": false
},
"style": "diamond",
"template": "{{if .Root}} \uf0e7 {{.UserName}} {{else}} {{.UserName}} {{end}}",
"trailing_diamond": "\ue0b0",
"type": "session"
},
{
"background": "#C678DD",
"foreground": "#ffffff",
"powerline_symbol": "\ue0b0",
"properties": {
"folder_icon": "\uf115",
"folder_separator_icon": " \ue0b1 ",
"max_depth": 2,
"style": "agnoster_short"
},
"style": "powerline",
"template": " {{ .Path }} ",
"type": "path"
},
{
"background": "#95ffa4",
"foreground": "#193549",
"powerline_symbol": "\ue0b0",
"properties": {
"fetch_status": true
},
"style": "powerline",
"template": " {{ .HEAD }}{{ if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{- $staged := add .Staging.Added (add .Staging.Modified (add .Staging.Deleted .Staging.Unmerged)) -}}{{ if gt $staged 0 }} ^{{$staged}}{{ end }}{{ if gt .Working.Modified 0 }} ~{{ .Working.Modified }}{{ end }}{{ if gt .Working.Deleted 0 }} -{{ .Working.Deleted }}{{ end }}{{ if gt .Working.Untracked 0 }} +{{ .Working.Untracked }}{{ end }} ",
"type": "git"
}
],
"type": "prompt"
},
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "#61AFEF",
"style": "plain",
"template": " ",
"type": "text"
}
],
"type": "prompt"
}
],
"console_title_template": "{{if .Root}} \u26a1 {{end}}{{.UserName}} \u2794 📁{{.Folder}}",
"final_space": true,
"version": 3
}

View file

@ -1,13 +0,0 @@
{ config, lib, ... }:
let
themeName = "capr4n.omp.json";
themeSource = ./capr4n.omp.json;
themeConfigPath = "${config.xdg.configHome}/oh-my-posh/${themeName}";
in {
programs.oh-my-posh = {
enable = lib.mkDefault true;
configFile = themeConfigPath;
};
xdg.configFile."oh-my-posh/${themeName}".source = themeSource;
}

View file

@ -0,0 +1,8 @@
{ lib, ... }: {
programs.starship = {
enable = lib.mkDefault true;
enableFishIntegration = true;
enableNushellIntegration = true;
settings = lib.importTOML ./starship.toml;
};
}

View file

@ -0,0 +1,180 @@
"$schema" = "https://starship.rs/config-schema.json"
format = """
[](color_orange)\
$os\
$username\
[](bg:color_yellow fg:color_orange)\
$directory\
[](fg:color_yellow bg:color_aqua)\
$git_branch\
$git_status\
[](fg:color_aqua bg:color_blue)\
$c\
$cpp\
$rust\
$golang\
$nodejs\
$php\
$java\
$kotlin\
$haskell\
$python\
[](fg:color_blue bg:color_bg3)\
$docker_context\
$conda\
$pixi\
[](fg:color_bg3 bg:color_bg1)\
$time\
[ ](fg:color_bg1)\
$line_break$character"""
palette = "gruvbox_dark"
[palettes.gruvbox_dark]
color_fg0 = "#fbf1c7"
color_bg1 = "#3c3836"
color_bg3 = "#665c54"
color_blue = "#458588"
color_aqua = "#689d6a"
color_green = "#98971a"
color_orange = "#d65d0e"
color_purple = "#b16286"
color_red = "#cc241d"
color_yellow = "#d79921"
[os]
disabled = false
style = "bg:color_orange fg:color_fg0"
[os.symbols]
Windows = "󰍲"
Ubuntu = "󰕈"
SUSE = ""
Raspbian = "󰐿"
Mint = "󰣭"
Macos = "󰀵"
Manjaro = ""
Linux = "󰌽"
Gentoo = "󰣨"
Fedora = "󰣛"
Alpine = ""
Amazon = ""
Android = ""
Arch = "󰣇"
Artix = "󰣇"
EndeavourOS = ""
CentOS = ""
Debian = "󰣚"
Redhat = "󱄛"
RedHatEnterprise = "󱄛"
Pop = ""
[username]
show_always = true
style_user = "bg:color_orange fg:color_fg0"
style_root = "bg:color_orange fg:color_fg0"
format = "[ $user ]($style)"
[directory]
style = "fg:color_fg0 bg:color_yellow"
format = "[ $path ]($style)"
truncation_length = 3
truncation_symbol = "…/"
[directory.substitutions]
Documents = "󰈙 "
Downloads = " "
Music = "󰝚 "
Pictures = " "
Developer = "󰲋 "
[git_branch]
symbol = ""
style = "bg:color_aqua"
format = "[[ $symbol $branch ](fg:color_fg0 bg:color_aqua)]($style)"
[git_status]
style = "bg:color_aqua"
format = "[[($all_status$ahead_behind )](fg:color_fg0 bg:color_aqua)]($style)"
[nodejs]
symbol = ""
style = "bg:color_blue"
format = "[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)"
[c]
symbol = " "
style = "bg:color_blue"
format = "[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)"
[cpp]
symbol = " "
style = "bg:color_blue"
format = "[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)"
[rust]
symbol = ""
style = "bg:color_blue"
format = "[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)"
[golang]
symbol = ""
style = "bg:color_blue"
format = "[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)"
[php]
symbol = ""
style = "bg:color_blue"
format = "[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)"
[java]
symbol = ""
style = "bg:color_blue"
format = "[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)"
[kotlin]
symbol = ""
style = "bg:color_blue"
format = "[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)"
[haskell]
symbol = ""
style = "bg:color_blue"
format = "[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)"
[python]
symbol = ""
style = "bg:color_blue"
format = "[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)"
[docker_context]
symbol = ""
style = "bg:color_bg3"
format = "[[ $symbol( $context) ](fg:#83a598 bg:color_bg3)]($style)"
[conda]
style = "bg:color_bg3"
format = "[[ $symbol( $environment) ](fg:#83a598 bg:color_bg3)]($style)"
[pixi]
style = "bg:color_bg3"
format = "[[ $symbol( $version)( $environment) ](fg:color_fg0 bg:color_bg3)]($style)"
[time]
disabled = false
time_format = "%R"
style = "bg:color_bg1"
format = "[[  $time ](fg:color_fg0 bg:color_bg1)]($style)"
[line_break]
disabled = false
[character]
disabled = false
success_symbol = "[](bold fg:color_green)"
error_symbol = "[](bold fg:color_red)"
vimcmd_symbol = "[](bold fg:color_green)"
vimcmd_replace_one_symbol = "[](bold fg:color_purple)"
vimcmd_replace_symbol = "[](bold fg:color_purple)"
vimcmd_visual_symbol = "[](bold fg:color_yellow)"

View file

@ -0,0 +1,181 @@
"$schema" = "https://starship.rs/config-schema.json"
format = """
[](color_orange)\
$os\
$username\
[](bg:color_yellow fg:color_orange)\
$directory\
[](fg:color_yellow bg:color_aqua)\
$git_branch\
$git_status\
[](fg:color_aqua bg:color_blue)\
$c\
$cpp\
$rust\
$golang\
$nodejs\
$php\
$java\
$kotlin\
$haskell\
$python\
[](fg:color_blue bg:color_bg3)\
$docker_context\
$conda\
$pixi\
[](fg:color_bg3 bg:color_bg1)\
$time\
[ ](fg:color_bg1)\
$line_break$character"""
palette = "gruvbox_dark"
[palettes.gruvbox_dark]
color_fg0 = "#fbf1c7"
color_bg1 = "#3c3836"
color_bg3 = "#665c54"
color_blue = "#458588"
color_aqua = "#689d6a"
color_green = "#98971a"
color_orange = "#d65d0e"
color_purple = "#b16286"
color_red = "#cc241d"
color_yellow = "#d79921"
[os]
disabled = false
style = "bg:color_orange fg:color_fg0"
[os.symbols]
Windows = "󰍲"
Ubuntu = "󰕈"
SUSE = ""
Raspbian = "󰐿"
Mint = "󰣭"
Macos = "󰀵"
Manjaro = ""
Linux = "󰌽"
Gentoo = "󰣨"
Fedora = "󰣛"
Alpine = ""
Amazon = ""
Android = ""
AOSC = ""
Arch = "󰣇"
Artix = "󰣇"
EndeavourOS = ""
CentOS = ""
Debian = "󰣚"
Redhat = "󱄛"
RedHatEnterprise = "󱄛"
Pop = ""
[username]
show_always = true
style_user = "bg:color_orange fg:color_fg0"
style_root = "bg:color_orange fg:color_fg0"
format = "[ $user ]($style)"
[directory]
style = "fg:color_fg0 bg:color_yellow"
format = "[ $path ]($style)"
truncation_length = 3
truncation_symbol = "…/"
[directory.substitutions]
Documents = "󰈙 "
Downloads = " "
Music = "󰝚 "
Pictures = " "
Developer = "󰲋 "
[git_branch]
symbol = ""
style = "bg:color_aqua"
format = "[[ $symbol $branch ](fg:color_fg0 bg:color_aqua)]($style)"
[git_status]
style = "bg:color_aqua"
format = "[[($all_status$ahead_behind )](fg:color_fg0 bg:color_aqua)]($style)"
[nodejs]
symbol = ""
style = "bg:color_blue"
format = "[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)"
[c]
symbol = " "
style = "bg:color_blue"
format = "[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)"
[cpp]
symbol = " "
style = "bg:color_blue"
format = "[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)"
[rust]
symbol = ""
style = "bg:color_blue"
format = "[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)"
[golang]
symbol = ""
style = "bg:color_blue"
format = "[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)"
[php]
symbol = ""
style = "bg:color_blue"
format = "[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)"
[java]
symbol = ""
style = "bg:color_blue"
format = "[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)"
[kotlin]
symbol = ""
style = "bg:color_blue"
format = "[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)"
[haskell]
symbol = ""
style = "bg:color_blue"
format = "[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)"
[python]
symbol = ""
style = "bg:color_blue"
format = "[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)"
[docker_context]
symbol = ""
style = "bg:color_bg3"
format = "[[ $symbol( $context) ](fg:#83a598 bg:color_bg3)]($style)"
[conda]
style = "bg:color_bg3"
format = "[[ $symbol( $environment) ](fg:#83a598 bg:color_bg3)]($style)"
[pixi]
style = "bg:color_bg3"
format = "[[ $symbol( $version)( $environment) ](fg:color_fg0 bg:color_bg3)]($style)"
[time]
disabled = false
time_format = "%R"
style = "bg:color_bg1"
format = "[[  $time ](fg:color_fg0 bg:color_bg1)]($style)"
[line_break]
disabled = false
[character]
disabled = false
success_symbol = "[](bold fg:color_green)"
error_symbol = "[](bold fg:color_red)"
vimcmd_symbol = "[](bold fg:color_green)"
vimcmd_replace_one_symbol = "[](bold fg:color_purple)"
vimcmd_replace_symbol = "[](bold fg:color_purple)"
vimcmd_visual_symbol = "[](bold fg:color_yellow)"

View file

@ -1,4 +1,4 @@
{ lib, pkgs, ... }: {
{ config, lib, pkgs, ... }: {
programs.tmux = {
enable = lib.mkDefault true;
clock24 = true;
@ -18,19 +18,26 @@
'';
}];
extraConfig = ''
# Terminal configuration for proper colors and features
set-option -g default-terminal "screen-256color"
set-option -ga terminal-overrides ",*256col*:Tc"
set-option -g focus-events on
set -s extended-keys on
set -as terminal-features 'xterm-ghostty:extkeys'
set-option -g status-style "bg=#282a36 fg=#f8f8f2"
set -g status-interval 5
setw -g automatic-rename on
set -g renumber-windows on
bind r source-file ~/.tmux.conf \; display-message "tmux reloaded"
bind | split-window -h
set -g status-interval 5
setw -g automatic-rename on
set -g renumber-windows on
bind r source-file ~/.tmux.conf \; display-message "tmux reloaded"
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
set -g display-panes-time 1500
bind k send-keys -R \; send-keys C-l \; clear-history
# Ensure tmux panes spawn login nu so Starship integration runs
set -g default-shell "${config.home.profileDirectory}/bin/nu"
set -g default-command "${config.home.profileDirectory}/bin/nu --login"
'';
};
}