Skip to content

goodvibs/nvim-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

122 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neovim Configuration

This is what I've found to work well for me. This README.md was mostly generated by cursor-agent.

Screenshot

Structure

nvim/
├── init.lua                      # Entry point
├── nvim-pack-lock.json           # vim.pack lockfile (created/updated by Nvim 0.12+)
├── lua/
│   ├── config/
│   │   ├── init.lua              # Core config, keymaps, custom commands
│   │   ├── pack.lua              # vim.pack plugin list
│   │   ├── options.lua           # Neovim options
│   │   ├── lsp.lua               # Diagnostics + LSP completion on attach
│   │   ├── builtin.lua           # :Undotree / :DiffTool + diagnostic lists
│   │   ├── ui2.lua               # Experimental core UI
│   │   └── plugins/
│   │       ├── init.lua          # Load order for plugin setup
│   │       ├── mini/             # mini.nvim modules (icons, clue, …)
│   │       └── *.lua             # Other plugin setup files
└── queries/
    └── all/
        └── textobjects.scm       # (legacy) custom TS queries; optional

Plugins (vim.pack)

Managed with Neovim 0.12+ built-in vim.pack (:help vim.pack). After changing lua/config/pack.lua, restart Nvim; use :lua vim.pack.update() to pull updates (confirm with :write in the review buffer). Commit nvim-pack-lock.json for reproducible installs.

  • tokyonight.nvim — Colorscheme
  • plenary.nvim — Lua utilities (Telescope dependency)
  • telescope.nvim + telescope-fzf-native.nvim — Fuzzy finding (<leader>f…), full-screen horizontal layout, fzf-native sorter
  • mini.nvimmini.icons, mini.statusline, mini.hipatterns (hex colors), mini.clue, mini.splitjoin, mini.ai, mini.indentscope, mini.surround
  • oil.nvim — Buffer-style directory browser (<leader>-), icon + size columns; uses mini.icons for glyphs
  • mason.nvim + mason-lspconfig.nvim — LSP server install + attach via nvim-lspconfig
  • lazydev.nvimlua_ls ergonomics for config/plugins
  • tree-sitter-manager.nvim — Install/update Tree-sitter parsers and queries (needs tree-sitter CLI, git, and a C compiler on your PATH)
  • snacks.nvimImage preview only (image enabled; other snacks disabled)
  • conform.nvim — Formatting

Built-in (via :packadd, not vim.pack): nvim.undotree, nvim.difftool — see lua/config/builtin.lua.

Built-in / core features

  • Experimental ui2require('vim._core.ui2').enable() for messages/cmdline (:help ui2)
  • Insert completion'autocomplete' + vim.lsp.completion.enable() on LspAttach (:help lsp-completion)
  • Diagnostics — Signs via vim.diagnostic.config (signs.text), quickfix/location list on <leader>xw / <leader>xb

Important configuration

Auto-formatting

Format on save via Conform, with :FormatDisable / :FormatEnable / :FormatToggle / :FormatStatus (global or ! for buffer). Formatters: Prettier, stylua, rustfmt, ruff/black/isort as before.

Tree-sitter

tree-sitter-manager.nvim installs parsers on startup (ensure_installed) and adds parser/query dirs to 'runtimepath'. Highlighting uses vim.treesitter.start() in a FileType autocommand (TSM’s own highlighter is off so Neovim can map filetypes like typescriptreact to parsers correctly). Indent is filetype-based, not nvim-treesitter’s indentexpr. Use :TSManager to install/remove parsers. mini.ai provides extra textobjects with default mappings.

LSP

Mason ensures lua_ls, rust_analyzer, and zls; mason-lspconfig uses automatic enable (vim.lsp.enable) with default configs.

Finding / navigation

Telescope on <leader>f… (full-width layout, fzf-native sorting). mini.clue shows key hints; <leader>? opens buffer-local normal-mode keymaps. oil.nvim on <leader>- (current buffer’s directory, or cwd); inside Oil, <CR> opens entries, - goes to the parent directory (:help oil-actions for the rest). Motion/search uses mini.ai defaults and built-in /.

Options

4-space indent, relative numbers, persistent undo, inlay hints enabled globally, rounded floating borders, etc.

Installation

  1. Neovim 0.12+ required (vim.pack, ui2, built-in undotree/difftool).
  2. git required for vim.pack and Tree-sitter parser installs.
  3. tree-sitter CLI plus a C compiler (clang/gcc) required for tree-sitter-manager.nvim to build parsers.
  4. ripgrep recommended for Telescope live_grep.
  5. Clone to ~/.config/nvim, start Neovim — plugins install under stdpath('data')/site/pack/core/opt. Commit the generated nvim-pack-lock.json once satisfied.

If you previously used nvim-treesitter with parsers under stdpath('data')/site/parser and …/site/queries, remove those two directories once before the first run with tree-sitter-manager (old layouts could be symlinks into the removed plugin and will break query copies).

Tips

  • Use :h and <leader>f? (Telescope help tags).
  • :Undotree, :DiffTool — see :help package-undotree / :help difftool.

About

My neovim config

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors