Loading...
Loading...
Comprehensive guide for this Neovim configuration - a modular, performance-optimized Lua-based IDE. Use when configuring plugins, adding keybindings, setting up LSP servers, debugging, or extending the configuration. Covers lazy.nvim, 82+ plugins across 9 categories, DAP debugging, AI integrations, and performance optimization.
npx skill4agent add julianobarbosa/claude-code-skills neovim| Metric | Value |
|---|---|
| Plugin Manager | lazy.nvim |
| Total Plugins | 82 |
| Target Startup | <50ms |
| Module Pattern | |
| Leader Key | |
~/.config/nvim/
├── init.lua # Entry point
├── lua/
│ ├── config/ # Core configuration (11 modules)
│ │ ├── lazy.lua # Plugin manager bootstrap
│ │ ├── options.lua # Vim options
│ │ ├── keymaps.lua # Key bindings
│ │ ├── autocmds.lua # Autocommands
│ │ └── performance.lua # Startup optimization
│ ├── plugins/specs/ # Plugin specs (9 categories)
│ │ ├── core.lua # Foundation (plenary, nui, devicons)
│ │ ├── ui.lua # UI (lualine, bufferline, noice)
│ │ ├── editor.lua # Editor (autopairs, flash, harpoon)
│ │ ├── lsp.lua # LSP (lspconfig, mason, conform)
│ │ ├── git.lua # Git (fugitive, gitsigns, diffview)
│ │ ├── ai.lua # AI (copilot, ChatGPT)
│ │ ├── debug.lua # DAP (nvim-dap, dap-ui)
│ │ ├── tools.lua # Tools (telescope, neo-tree)
│ │ └── treesitter.lua # Syntax (treesitter, textobjects)
│ ├── kickstart/ # Kickstart-derived modules
│ └── utils/ # Utility functions
└── lazy-lock.json # Plugin version lockM.setup()local M = {}
M.setup = function()
-- Configuration logic here
end
return Mlua/plugins/specs/-- lua/plugins/specs/tools.lua
return {
-- Existing plugins...
{
"author/plugin-name",
event = "VeryLazy", -- Loading strategy
dependencies = { "dep/name" }, -- Required plugins
opts = {
-- Plugin options
},
config = function(_, opts)
require("plugin-name").setup(opts)
end,
},
}| Strategy | When to Use | Example |
|---|---|---|
| Default, load on demand | Most plugins |
| After UI loads | UI enhancements |
| When opening files | Treesitter, gitsigns |
| When typing | Completion, autopairs |
| On command invocation | Heavy tools |
| For specific filetypes | Language plugins |
| On keypress | Motion plugins |
| Command | Description |
|---|---|
| Open lazy.nvim dashboard |
| Update and install plugins |
| Show startup time analysis |
| Remove unused plugins |
| Check plugin health |
mason.nvim (installer)
├── mason-lspconfig.nvim → nvim-lspconfig
├── mason-tool-installer.nvim (auto-install)
└── mason-nvim-dap.nvim → nvim-dap
nvim-lspconfig
├── blink.cmp (completion)
├── conform.nvim (formatting)
├── nvim-lint (linting)
└── trouble.nvim (diagnostics)-- In lua/plugins/specs/lsp.lua, add to mason-tool-installer list:
ensure_installed = {
"lua_ls",
"pyright",
"your_new_server", -- Add here
}
-- Configure in lspconfig setup:
servers = {
your_new_server = {
settings = {
-- Server-specific settings
},
},
}| Key | Action |
|---|---|
| Go to definition |
| Go to references |
| Go to implementation |
| Go to declaration |
| Hover documentation |
| Rename symbol |
| Code action |
| Type definition |
| Document symbols |
| Workspace symbols |
| Key | Action |
|---|---|
| Window navigation |
| Previous/next buffer |
| Search files |
| Search by grep |
| Search buffers |
| Toggle Neo-tree |
-- In lua/config/keymaps.lua M.setup():
vim.keymap.set('n', '<leader>xx', function()
-- Your action
end, { desc = 'Description for which-key' })
-- Or in a plugin spec:
keys = {
{ "<leader>xx", "<cmd>Command<CR>", desc = "Description" },
}| Key | Action |
|---|---|
| Continue/Start debugging |
| Step over |
| Step into |
| Step out |
| Toggle breakpoint |
| Conditional breakpoint |
-- In lua/plugins/specs/debug.lua
local dap = require("dap")
dap.adapters.your_adapter = {
type = "executable",
command = "path/to/adapter",
}
dap.configurations.your_filetype = {
{
type = "your_adapter",
request = "launch",
name = "Launch",
program = "${file}",
},
}| Layer | Technique | Savings |
|---|---|---|
| 1 | | ~50ms |
| 2 | Skip | ~180ms |
| 3 | Disable providers | ~10ms |
| 4 | Disable builtins | ~20ms |
| 5 | Deferred config | ~30ms |
| 6 | Event-based loading | Variable |
:Lazy profile-- In init.lua
vim.defer_fn(function()
require('config.options').setup()
require('config.keymaps').setup()
require('config.autocmds').setup()
end, 0)-- In lua/config/autocmds.lua M.setup():
vim.api.nvim_create_autocmd("FileType", {
pattern = { "markdown", "text" },
callback = function()
vim.opt_local.wrap = true
vim.opt_local.spell = true
end,
})-- In lua/config/options.lua M.setup():
vim.opt.your_option = value-- In lua/utils/init.lua
local M = {}
M.your_function = function(args)
-- Implementation
end
return M
-- Usage: require('utils').your_function(args)plenary.nvimnui.nvimnvim-web-deviconslazy.nvimtokyonightalpha-nvimlualinebufferlinenoicenvim-notifywhich-keyindent-blanklinemini.indentscopefidgetnvim-scrollbarnvim-autopairsflash.nvimclever-fnvim-spectregrug-farharpoonpersistencesmartyankvim-sleuthvim-illuminatetabulartodo-commentstoggletermnvim-lspconfigmasonmason-lspconfigmason-tool-installerlazydevluvit-metaSchemaStoreconformnvim-linttroubleblink.cmpnvim-cmpLuaSnipvim-fugitivevim-rhubarbgitsignsdiffviewvim-floggit-conflictoctocopilot.vimChatGPT.nvimmcphub.nvimnvim-dapnvim-dap-uinvim-dap-virtual-textnvim-dap-pythonnvim-dap-gomason-nvim-daptelescope-dapnvim-niotelescopetelescope-fzf-nativetelescope-ui-selectneo-treeoil.nvimnvim-bqfrest.nvimvim-dadbodvim-dadbod-uivim-dadbod-completioniron.nvimmarkdown-previewnvim-puppeteerobsidian.nvimnvim-treesitternvim-treesitter-contextnvim-treesitter-textobjects| Issue | Solution |
|---|---|
| Plugins not loading | |
| LSP not starting | |
| Icons missing | Install a Nerd Font |
| Slow startup | |
| Treesitter errors | |
| Keybinding conflicts | |
:checkhealth-- Temporarily add to plugin config:
log_level = vim.log.levels.DEBUG,