Skip to content

brianp/wellington

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

108 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neovim Configuration

A modern, batteries-included Neovim setup built on LazyVim. Designed as an IntelliJ replacement with full LSP support, AI assistance, debugging, testing, and Git integration.

Directory Structure

Location Purpose
~/.config/nvim/ Main configuration - Lua files, settings
~/.local/share/nvim/lazy/ Installed plugins (~93 plugins)
~/.local/share/nvim/mason/ LSP servers, formatters, linters
~/.local/state/nvim/ State files (shada, sessions)
~/.cache/nvim/ Cache files

Config Layout

~/.config/nvim/
├── init.lua                 # Entry point
├── lazy-lock.json           # Plugin version lock file
├── lazyvim.json             # LazyVim extras configuration
├── lua/
│   ├── config/
│   │   ├── lazy.lua         # Plugin manager + LazyVim extras
│   │   ├── keymaps.lua      # Custom key bindings
│   │   ├── options.lua      # Editor options
│   │   └── autocmds.lua     # Auto commands
│   └── plugins/
│       ├── ai.lua           # AI assistants (Avante, CodeCompanion)
│       ├── git.lua          # Git integration (gitsigns, diffview, neogit)
│       ├── lsp.lua          # LSP servers and formatters
│       └── editor.lua       # Editor enhancements

Requirements

  • Neovim >= 0.10.0
  • Git
  • Node.js >= 18 (for LSP servers)
  • ripgrep - for Telescope grep
  • fd - for Telescope file finding
  • lazygit - for Git UI

Installation

1. Install Dependencies (macOS)

brew install neovim ripgrep fd lazygit node

2. Backup Existing Config

mv ~/.config/nvim ~/.config/nvim.backup
mv ~/.local/share/nvim ~/.local/share/nvim.backup
mv ~/.local/state/nvim ~/.local/state/nvim.backup

3. Clone This Config

git clone <your-repo-url> ~/.config/nvim

4. Launch Neovim

nvim

On first launch:

  • lazy.nvim will auto-install all plugins
  • Mason will install language servers and tools
  • Treesitter will compile parsers

5. Environment Variables

Add to ~/.zshrc or ~/.bashrc:

export ANTHROPIC_API_KEY="sk-ant-..."  # For Claude AI
export OPENAI_API_KEY="sk-..."          # For GPT (optional)

Supported Languages

Language LSP Formatter Linter Debugger Test Runner
Rust rust-analyzer rustfmt clippy codelldb neotest
Go gopls gofumpt golangci-lint delve neotest-golang
TypeScript/JavaScript ts_ls prettier eslint js-debug-adapter neotest
Python pyright black, isort ruff debugpy neotest-python
Ruby ruby-lsp rubocop rubocop rdbg neotest-rspec
Elixir elixirls mix format credo - neotest-elixir
Clojure clojure-lsp cljfmt clj-kondo - conjure
Kotlin kotlin-language-server ktlint ktlint - -
Dart/Flutter flutter-tools dart format dart analyze flutter neotest-dart
Swift sourcekit-lsp swiftformat swiftlint - -
Vue volar prettier eslint - -
Lua lua_ls stylua - nlua -
SQL sqlls - - - -
Terraform terraformls terraform fmt tflint - -
Ansible ansiblels - ansible-lint - -
Docker dockerfile-ls - hadolint - -
YAML yaml-language-server prettier yamllint - -
JSON/JSONC jsonls prettier - - -
TOML taplo taplo - - -
Markdown - prettier markdownlint - -
HTML/CSS html-lsp, css-lsp prettier - - -
Tailwind tailwindcss prettier - - -

Plugins

Core (LazyVim)

Plugin Description
lazy.nvim Plugin manager with lazy loading
LazyVim Neovim distro with sensible defaults
nvim-lspconfig LSP configuration
mason.nvim LSP/DAP/linter/formatter installer
nvim-treesitter Syntax highlighting and code understanding
telescope.nvim Fuzzy finder
blink.cmp Completion engine
snacks.nvim Collection of small QoL plugins

AI Assistants

Plugin Description Key Bindings
claudecode.nvim Claude Code CLI integration Works with claude CLI
avante.nvim Cursor-like AI (Claude/GPT/Ollama) <leader>aa ask, <leader>ae edit, <leader>at toggle
codecompanion.nvim Multi-LLM chat interface <leader>cc chat, <leader>ca actions, ga (visual) add to chat
copilot.lua GitHub Copilot Auto-suggestions in insert mode

Git Integration

Plugin Description Key Bindings
gitsigns.nvim Git decorations, hunk actions ]h/[h next/prev hunk, <leader>ghs stage, <leader>ghr reset, <leader>ghp preview, <leader>gtb toggle blame
diffview.nvim Git diff viewer <leader>gd open diffview, <leader>gfh file history
neogit Magit-like Git interface <leader>gn neogit, <leader>gc commit, <leader>gp push
git-conflict.nvim Conflict marker resolution Auto-highlights conflicts
lazygit Terminal Git UI <leader>gg open lazygit

Debugging (DAP)

Plugin Description Key Bindings
nvim-dap Debug Adapter Protocol <leader>db breakpoint, <leader>dB conditional breakpoint
nvim-dap-ui Debugger UI <leader>du toggle UI
nvim-dap-go Go debugger <leader>dc continue, <leader>di step into, <leader>do step over
nvim-dap-python Python debugger <leader>dt terminate, <leader>dr run to cursor
nvim-dap-ruby Ruby debugger
one-small-step-for-vimkind Lua/Neovim debugger

Testing (neotest)

Plugin Description Key Bindings
neotest Test runner framework <leader>tt run nearest, <leader>tf run file, <leader>ts summary, <leader>to output
neotest-golang Go test adapter
neotest-python Python (pytest) adapter
neotest-rspec Ruby RSpec adapter
neotest-elixir Elixir ExUnit adapter
neotest-dart Dart/Flutter adapter

Editor Enhancements

Plugin Description Key Bindings
oil.nvim File manager as buffer - open parent dir, <leader>o open oil
vim-tmux-navigator Seamless tmux/vim navigation <C-h/j/k/l> navigate splits/panes
hardtime.nvim Break bad vim habits <leader>uH toggle
flash.nvim Navigation/search s flash jump, S flash treesitter
which-key.nvim Keybinding hints Press <leader> and wait
trouble.nvim Diagnostics list <leader>xx toggle trouble
todo-comments.nvim Highlight TODO/FIXME ]t/[t next/prev todo, <leader>st search
nvim-surround Surround text objects ys{motion}{char} add, ds{char} delete, cs{old}{new} change
grug-far.nvim Search and replace <leader>sr open
persistence.nvim Session management <leader>qs restore, <leader>ql restore last
nvim-ufo Better folding zR open all, zM close all, zK peek
neoscroll.nvim Smooth scrolling <C-u/d/b/f> smooth scroll
auto-save.nvim Auto-save files Automatic (2s debounce)
marks.nvim Better marks m{a-z} set, '{a-z} jump
dashboard-nvim Start screen Shows on empty nvim

Coding Enhancements

Plugin Description Key Bindings
yanky.nvim Better yank/paste with history p/P paste, <C-p>/<C-n> cycle history
dial.nvim Increment/decrement values <C-a> increment, <C-x> decrement
refactoring.nvim Refactoring operations <leader>re extract function, <leader>rv extract variable
mini.pairs Auto-pairs Auto-close brackets, quotes
mini.ai Extended text objects vaf select function, vic select class
mini.hipatterns Highlight patterns Highlights hex colors, TODO, etc.
nvim-ts-autotag Auto-close HTML tags Automatic

Language-Specific

Plugin Description Key Bindings
rustaceanvim Enhanced Rust <leader>cR code action, <leader>dr debuggables
flutter-tools.nvim Flutter/Dart <leader>Fs run, <leader>Fr reload, <leader>FR restart
crates.nvim Cargo.toml helper Shows crate versions, <leader>cu update
conjure Interactive REPL (Clojure, etc.) <leader>ee eval, <leader>eb eval buffer
nvim-paredit Paredit for Lisp >) slurp, <) barf
venv-selector.nvim Python venv picker <leader>cv select venv
nvim-ansible Ansible support Syntax, snippets
telescope-terraform Terraform docs/state <leader>ft terraform
vim-dadbod Database client :DB queries
vim-dadbod-ui Database UI <leader>D toggle DBUI

UI

Plugin Description
tokyonight.nvim Default colorscheme
catppuccin Alternative colorscheme
bufferline.nvim Tab/buffer line
lualine.nvim Status line
noice.nvim UI for messages, cmdline, popupmenu
indent-blankline.nvim Indent guides
nvim-bqf Better quickfix
baleia.nvim ANSI colors in buffers

Key Bindings

Leader key: <Space>

General

Key Mode Description
jj or jk Insert Escape to normal mode
<leader>w Normal Save file
<leader>q Normal Quit
<C-h/j/k/l> Normal Navigate splits (tmux-aware)
<S-h> / <S-l> Normal Previous/next buffer
<leader>bd Normal Delete buffer

LSP

Key Mode Description
gd Normal Go to definition
gr Normal Find references
gI Normal Go to implementation
gy Normal Go to type definition
K Normal Hover documentation
gK Normal Signature help
<leader>ca Normal/Visual Code actions
<leader>cr Normal Rename symbol
<leader>cf Normal Format file
<leader>cd Normal Line diagnostics
]d / [d Normal Next/previous diagnostic
<leader>uh Normal Toggle inlay hints

Search (Telescope)

Key Mode Description
<leader>ff Normal Find files
<leader>fg Normal Live grep
<leader>fb Normal Find buffers
<leader>fr Normal Recent files
<leader>fs Normal Find symbols
<leader>sw Normal Search word under cursor
<leader>/ Normal Grep in current buffer

File Explorer

Key Mode Description
<leader>e Normal Toggle neo-tree
- Normal Open oil (parent directory)
<leader>o Normal Open oil

Editing

Key Mode Description
<leader>y Normal/Visual Yank to system clipboard
<leader>d Normal/Visual Delete to void register
gc Normal/Visual Toggle comment
J / K Visual Move lines down/up
<C-a> / <C-x> Normal Increment/decrement (dial.nvim)
p then <C-p>/<C-n> Normal Paste and cycle yank history

Adding LazyVim Extras

Use :LazyExtras to browse and enable additional language support and features. Current extras enabled:

  • ai.claudecode - Claude Code integration
  • coding.yanky - Better yank/paste
  • editor.dial - Increment/decrement
  • editor.refactoring - Refactoring tools
  • lang.ansible - Ansible
  • lang.clojure - Clojure (Conjure)
  • lang.dart - Dart/Flutter
  • lang.elixir - Elixir
  • lang.terraform - Terraform
  • lang.toml - TOML
  • lang.vue - Vue.js
  • ui.dashboard-nvim - Start screen
  • util.mini-hipatterns - Pattern highlighting
  • util.dot - Dotfile support

Switching AI Providers

Edit ~/.config/nvim/lua/plugins/ai.lua and change the provider:

opts = {
  provider = "claude",  -- Options: "claude", "openai", "copilot", "ollama"
}

For local LLMs via Ollama:

brew install ollama
ollama pull codellama:13b

Then set provider = "ollama".

Updating

# Update plugins from command line
nvim --headless "+Lazy! sync" +qa

# Or inside Neovim
:Lazy sync

# Update Mason tools
:Mason  # then press U

Useful Commands

Command Description
:Lazy Plugin manager UI
:LazyExtras Enable/disable LazyVim extras
:Mason LSP/tool installer UI
:LspInfo LSP status for current buffer
:TSInstall {lang} Install treesitter parser
:checkhealth Check Neovim health
:Telescope keymaps Search all keybindings
:ConformInfo Show active formatters

Health Check

:checkhealth

Credits

About

A VIM Environment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages