Goals:
- Works with or without nix
- LSP integration with the current project's settings if available
- Lean and fast startup with lazy loading
- Project-driven tooling via direnv and devShells
nix run git+https://git.joshuabell.xyz/ringofstorms/nvimin NixOS
-- in flake.nix#inputs
ringofstorms-nvim = {
url = "git+https://git.joshuabell.xyz/nvim";
};
-- in nix module
environment.systemPackages = with pkgs; [
ringofstorms-nvim.packages.${settings.system.system}.neovim
];- Must have all required programs installed and available on path
- neovim >= 0.11 (required for native LSP config)
- Everything listed in flake.nix
runtimeDependenciesCorevariable- These must be available on the path
- Treesitter/Lazy/Mason will install all other requirements needed on other systems
git clone https://github.com/RingOfStorms/nvim ~/.config/nvim
nvim --headless "+Lazy! sync" +qaBackup existing config:
DATE=$(date +"%Y%m%d")
mv ~/.config/nvim ~/.config/nvim_$DATE.bak
mv ~/.local/share/nvim ~/.local/share/nvim_$DATE.bak
mv ~/.local/state/nvim ~/.local/state/nvim_$DATE.bakor remove existing config:
rm -rf ~/.config/nvim
rm -rf ~/.local/share/nvim
rm -rf ~/.local/state/nvim This config uses a "lean core" approach where most LSPs come from your project's devShell via direnv.
- Core tools (ripgrep, fd, lua-language-server, nil, etc.) are always available
- direnv.vim automatically loads your project's
.envrc/devShellenvironment - Smart detection warns you if an expected LSP is missing for a filetype
{
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
outputs = { nixpkgs, ... }:
let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
in {
devShells.x86_64-linux.default = pkgs.mkShell {
packages = with pkgs; [
# Your project's LSPs
typescript-language-server
nodePackages.prettier
eslint_d
# Your project's tools
nodejs_22
pnpm
];
};
};
}Then create .envrc:
use flakeAnd run direnv allow in your project directory.
This config supports local AI-powered code completion via llama.vim.
-
Install llama.cpp:
# macOS brew install llama.cpp # Or build from source git clone https://github.com/ggml-org/llama.cpp cd llama.cpp && make
-
Download a FIM-capable model (e.g., sweep-next-edit-1.5B):
# From HuggingFace wget https://huggingface.co/sweepai/sweep-next-edit-1.5B-GGUF/resolve/main/sweep-next-edit-Q8_0.gguf -
Start llama-server:
llama-server -m sweep-next-edit-Q8_0.gguf --port 8012 --fim-qwen-7b-default
-
Neovim will auto-detect the server and enable completions
- Tab - Accept completion
- Shift-Tab - Accept first line only
- Ctrl-F - Toggle FIM manually
<leader>,a- Toggle AI autocomplete on/off
| VRAM | Recommended Model |
|---|---|
| >64GB | qwen2.5-coder-32b |
| >16GB | qwen2.5-coder-7b |
| <16GB | qwen2.5-coder-3b |
| <8GB | sweep-next-edit-1.5b |
| Category | Plugin | Description |
|---|---|---|
| Completion | blink.cmp | Fast async completion with LSP, snippets, buffer |
| LSP | nvim-lspconfig | Native LSP configurations |
| Diagnostics | trouble.nvim | Pretty diagnostics and quickfix lists |
| Formatting | conform.nvim | Fast formatter integration |
| Linting | nvim-lint | Async linter integration |
| AI | llama.vim | Local LLM code completion |
| Utilities | mini.nvim | Surround, comment, pairs, text objects |
| Files | nvim-tree, telescope | File browsing and fuzzy finding |
gd- Go to definitiongr- Go to referencesgI- Go to implementationK- Hover documentation<leader>la- Code action<leader>lr- Rename
<leader>xx- Toggle diagnostics<leader>xX- Buffer diagnostics only<leader>xs- Document symbols<leader>xq- Quickfix list
gc{motion}- Toggle commentgcc- Toggle line comment<leader>/- Toggle comment (preserved binding)
gsa{motion}{char}- Add surroundinggsd{char}- Delete surroundinggsr{old}{new}- Replace surrounding
- CSPELL/spelling linter
- Consider mini-align for alignment
FUTURE
- Make a new HTTP plugin for running curl commands from .http files
- similar to rest-nvim/rest.nvim but support streaming etc and show command output
- generate command, like scratch open a popup of things that can be generated. UUID/other stuff?
- Checkout cargo-bloat, cargo-cache, cargo-outdated - memcache sccache
- For scratches, just make an input box for custom extension rather than predefined list
- check out