Repository files navigation

Traap's Blazing Fast Neovim configuration.

Credits

Linux Bash Installation

resetNeovim does the following:

  1. Uses bnvim to clone or pull Neovim sources and build them.
  2. Uses "switchNeovim traap" to switch to my Neovim configuration.

Notes

  1. Backups are not done.
  2. You have been warned.

Extra credit

Try nvims to safely experiment with multiple Neovim configurations.

Overview

nvim.traap is my production Neovim configuration. It is powered by lazy.nvim, uses Neovim's native LSP client, and borrows selected conventions from LazyVim without loading the LazyVim distribution or its default plugin set.

The configuration favors deliberate lazy loading and a small startup surface. It provides a complete coding environment when launched in Neovim and a reduced integration layer when embedded in VS Code.

Requirements

  • A recent Neovim release with the native vim.lsp.config() and vim.lsp.enable() APIs.
  • Git, which bootstraps lazy.nvim and installs plugins.
  • A Nerd Font for icons used throughout the interface.
  • ripgrep for Snacks grep and todo searches.
  • Node.js and Yarn to build markdown-preview.nvim.
  • mise with Ruby 4.0.0 and Solargraph for Ruby LSP support.
  • nixd on PATH for Nix LSP support.

Language servers managed by Mason may have additional runtime requirements. Use :checkhealth, :checkhealth vim.lsp, and :Mason when diagnosing a missing tool.

Startup and package management

init.lua owns the startup sequence:

  1. Set the global and local leader to <Space>.
  2. Bootstrap lazy.nvim into Neovim's data directory when it is absent.
  3. Load the curated plugin specifications from lua/traap/plugins.
  4. Apply options, autocommands, keymaps, clipboard integration, and platform detection.
  5. Apply TokyoNight when running in standalone Neovim.

Plugins are intentionally unversioned so updates follow their current upstream branches. The automatic update checker and configuration-change notifications are disabled. lazy-lock.json records the working revisions.

Useful package commands:

CommandPurpose
:LazyOpen the plugin manager.
:Lazy syncInstall missing plugins, update plugins, and remove unused plugins.
:Lazy updateUpdate installed plugins and the lockfile.
:Lazy cleanRemove plugins no longer present in the specification.
:Lazy profileInspect startup and plugin load times.
:MasonInspect language-server installations.

Configuration layout

PathResponsibility
init.luaEntrypoint and startup ordering.
lua/traap/config/bootstrap.luaInstalls and adds lazy.nvim to the runtime path.
lua/traap/config/lazy.luaPackage-manager policy and UI.
lua/traap/config/options.luaGlobal editor defaults.
lua/traap/config/autocmds.luaFiletype and buffer lifecycle behavior.
lua/traap/config/keymaps.luaCore, plugin, LSP, and platform mappings.
lua/traap/plugins/Curated plugin specifications and customizations.
lua/traap/lsp/servers.luaFiletype-to-server registry and server overrides.
lua/traap/lsp/config.luaLSP capabilities, installation, setup, and formatting.
lua/traap/lsp/init.luaNative LSP compatibility commands.
lua/traap/core/Clipboard, notifications, platform detection, wiki helpers, and utilities.

Editor behavior

The principal defaults are two-space indentation, an 80-column text width, relative line numbers, persistent sign columns, rounded floating windows, right/below splits, no swapfile, and no line wrapping. The system clipboard is used locally; remote SSH sessions retain Neovim's internal clipboard.

Autocommands add several workflow conveniences:

  • Create missing parent directories immediately before saving.
  • Restore the last cursor location when reopening ordinary files.
  • Close help, quickfix, Fugitive, health, and similar utility windows with q.
  • Apply prose- and comment-friendly format options to supported source files.
  • Mark csv, sh, and tex buffers with vim.b.autoformat = false.
  • Reapply custom purple borders and UI highlights after colorscheme changes.

Significant plugin customizations

Snacks.nvim

Snacks is the main interface layer. Its dashboard identifies this configuration as powered by lazy.nvim; explorer, file and grep pickers, Git browsing, notifications, buffer deletion, status column, word references, toggles, image support, and Zen mode are enabled. Animation, indentation guides, scrolling, terminal, and Lazygit integrations are deliberately disabled.

The explorer and picker cooperate with tmux: <C-h>, <C-j>, <C-k>, and <C-l> leave the picker and move in the requested direction when there is no adjacent Neovim window.

Frequently used mappings include:

MappingAction
<leader>eOpen the explorer.
<leader>ff / <leader>fgFind files / Git files.
<leader>fb / <leader>frFind buffers / recent files.
<leader>sg / <leader>swGrep text / grep the word or selection.
<leader>sd / <leader>sDShow workspace / buffer diagnostics.
<leader>gb / <leader>glBrowse Git branches / log.
<leader>gBOpen the current location with Git browse.

Completion and Lua development

blink.cmp combines buffer, LSP, path, and snippet sources. It enables command line completion, friendly snippets, ghost text, signature help, automatic documentation after 500 ms, and Rust-backed fuzzy matching when available. Completion capabilities are injected into every configured LSP server.

lazydev.nvim supplies Neovim Lua runtime metadata so completion and diagnostics understand vim, plugin APIs, and the active runtime path.

Treesitter

Treesitter loads for real file buffers. Bash and regular-expression parsers are always ensured; other parsers are installed on the first corresponding FileType event. Parser setup is skipped for transient interfaces such as completion menus, help, quickfix, Lazy, Mason, Noice, notifications, LSP info, and Snacks picker buffers.

Harpoon

Harpoon 2 saves changes to its list automatically while leaving branch-specific marks and automatic UI-close synchronization disabled. Slots one through eight are selected with ;1 through ;8. Harpoon is not enabled inside VS Code.

Markdown and wiki editing

markdown-preview.nvim loads for markdown and wiki buffers and builds its web application with yarn install. Wiki and journal commands are provided by wiki.vim plus the local vim-bundle-wiki.vim customizations. Bullets and checkboxes are active for Markdown, wiki, text, scratch, and Git commit buffers; ;x toggles a checkbox.

img-clip.nvim stores pasted images beneath images/<document-name>/, prompts for the filename, URL-encodes paths, and inserts filetype-specific markup for Markdown, wiki, AsciiDoc, HTML, Org, reStructuredText, TeX, and Typst. It is disabled on Windows.

todo-comments.nvim

In addition to the standard keywords, todo-comments recognizes:

  • YouTube, Youtube, and youtube with a red YouTube icon.
  • URL, Url, and url with a purple link icon.

Keyword sets are merged with the defaults and matches are highlighted even when they appear outside comments.

Git and search

Fugitive loads on :G; Gitsigns supplies buffer signs and hunk operations, and Snacks supplies repository pickers and browser integration. grug-far.nvim provides project-wide search and replacement. Better Quickfix adds a preview window whose borders follow the configuration's purple highlight palette.

UI

TokyoNight uses its transparent night style with italic comments and keywords, transparent sidebars and floats, a hidden inactive statusline, bold Lualine, and purple borders. Noice renders the command line in a popup, sends ordinary messages through notifications, exposes long messages in a split, and filters routine editor noise. Lualine includes Git state, diagnostics, macro recording, Noice command/search status, file metadata, and cursor position. Which-key uses its modern preset with spelling suggestions.

LSP configuration and installation

The LSP stack is composed of three plugins:

  • nvim-lspconfig supplies server definitions compatible with Neovim's native LSP configuration API.
  • mason.nvim installs language-server executables in Neovim's data directory.
  • mason-lspconfig.nvim translates LSP server names into Mason packages.

Servers are installed and configured by filetype rather than eagerly at startup. On the first matching FileType event, the configuration:

  1. Looks up the server in lua/traap/lsp/servers.lua.
  2. Skips setup when that server was already handled during the session.
  3. Asks Mason to ensure the package is installed unless mason = false.
  4. Merges Blink completion capabilities and the format-on-save attachment hook with the server-specific options.
  5. Configures and enables the server through vim.lsp.config() and vim.lsp.enable(); a legacy lspconfig.setup() fallback remains available.

The first visit to a filetype may initiate a Mason installation. Open another buffer of that type or run :LspStart after installation finishes if the executable was not available when Neovim first attempted to start it.

The registry currently supports:

LanguagesServers
Bash, C/C++, C#, CSSbashls, clangd, csharp_ls, cssls
Go, HTML, Java, JSONgopls, html, jdtls, jsonls
Julia, LaTeX prose, Lua, Markdownjulials, ltex, lua_ls, marksman
Nix, Python, QML, Rubynixd, pyright, qmlls, solargraph
Rust, SQL, Svelte, TeXrust_analyzer, sqls, svelte, texlab
TOML, JavaScript/TypeScript, Vim, XML, YAML, Zigtaplo, ts_ls, vimls, lemminx, yamlls, zls

Solargraph is explicitly excluded from Mason management and is deliberately launched with:

mise exec ruby@4.0.0 -- solargraph stdio

nixd is expected to exist on PATH. If it is unavailable through the active Mason registry, its server entry should also use mason = false. The Lua server knows the complete Neovim runtime library and accepts vim and Snacks as globals. Clangd enables background indexing and clang-tidy, requests detailed completion, and suppresses automatic header insertion.

When a client supports textDocument/formatting, a buffer-local BufWritePre hook formats synchronously. The current LSP hook does not consult the vim.b.autoformat flag used elsewhere in the configuration.

Native LSP mappings are installed when a client attaches:

MappingAction
gd / gDDefinition / declaration.
gi / grImplementation / references.
K / <leader>kHover / signature help.
<leader>rnRename symbol.
<leader>caCode action.
<leader>EOpen diagnostic float.
[d / ]dPrevious / next diagnostic.
<leader>qPopulate the location list with diagnostics.

LSP maintenance commands:

CommandPurpose
:LspInfoRun :checkhealth vim.lsp.
:LspLogOpen the Neovim LSP log in a tab.
:LspStart [server...]Enable named servers, or the server for the current filetype.
:LspRestart[!] [server...]Restart named or active servers; ! force-stops clients.
:LspStop[!] [server...]Disable named or active servers; ! force-stops clients.

To add or change a language server, edit lua/traap/lsp/servers.lua. Each registry entry requires a native LSP server name and one or more filetypes. Add opts for server-specific settings or a custom command. Set mason = false when the executable is installed outside Mason.

example= {
name="example_ls",
filetypes= { "example" },
opts= {
settings= { example= { enabled=true } },
},
}

Platform behavior

Standalone Neovim receives the complete UI, completion, LSP, Treesitter, Git, Harpoon, and content-authoring stack. VS Code receives a reduced plugin list and routes selected editor actions to VS Code commands. Platform helpers also adapt clipboard behavior for SSH and Windows and allow picker navigation to cross Neovim/tmux boundaries.

Validation and maintenance

After changing the configuration, useful checks are:

nvim --headless "+Lazy! sync""+qa"
nvim --headless "+checkhealth""+qa"
stylua --check init.lua lua

Within Neovim, use :Lazy profile to inspect startup behavior, :Mason to inspect installed language servers, and :LspInfo from a source buffer to confirm that its client attached.

About

neovim configuration done with Lua.

Resources

Stars

84 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Repository files navigation

Traap's Blazing Fast Neovim configuration.

Credits

Linux Bash Installation

resetNeovim does the following:

  1. Uses bnvim to clone or pull Neovim sources and build them.
  2. Uses "switchNeovim traap" to switch to my Neovim configuration.

Notes

  1. Backups are not done.
  2. You have been warned.

Extra credit

Try nvims to safely experiment with multiple Neovim configurations.

Overview

nvim.traap is my production Neovim configuration. It is powered by lazy.nvim, uses Neovim's native LSP client, and borrows selected conventions from LazyVim without loading the LazyVim distribution or its default plugin set.

The configuration favors deliberate lazy loading and a small startup surface. It provides a complete coding environment when launched in Neovim and a reduced integration layer when embedded in VS Code.

Requirements

  • A recent Neovim release with the native vim.lsp.config() and vim.lsp.enable() APIs.
  • Git, which bootstraps lazy.nvim and installs plugins.
  • A Nerd Font for icons used throughout the interface.
  • ripgrep for Snacks grep and todo searches.
  • Node.js and Yarn to build markdown-preview.nvim.
  • mise with Ruby 4.0.0 and Solargraph for Ruby LSP support.
  • nixd on PATH for Nix LSP support.

Language servers managed by Mason may have additional runtime requirements. Use :checkhealth, :checkhealth vim.lsp, and :Mason when diagnosing a missing tool.

Startup and package management

init.lua owns the startup sequence:

  1. Set the global and local leader to <Space>.
  2. Bootstrap lazy.nvim into Neovim's data directory when it is absent.
  3. Load the curated plugin specifications from lua/traap/plugins.
  4. Apply options, autocommands, keymaps, clipboard integration, and platform detection.
  5. Apply TokyoNight when running in standalone Neovim.

Plugins are intentionally unversioned so updates follow their current upstream branches. The automatic update checker and configuration-change notifications are disabled. lazy-lock.json records the working revisions.

Useful package commands:

CommandPurpose
:LazyOpen the plugin manager.
:Lazy syncInstall missing plugins, update plugins, and remove unused plugins.
:Lazy updateUpdate installed plugins and the lockfile.
:Lazy cleanRemove plugins no longer present in the specification.
:Lazy profileInspect startup and plugin load times.
:MasonInspect language-server installations.

Configuration layout

PathResponsibility
init.luaEntrypoint and startup ordering.
lua/traap/config/bootstrap.luaInstalls and adds lazy.nvim to the runtime path.
lua/traap/config/lazy.luaPackage-manager policy and UI.
lua/traap/config/options.luaGlobal editor defaults.
lua/traap/config/autocmds.luaFiletype and buffer lifecycle behavior.
lua/traap/config/keymaps.luaCore, plugin, LSP, and platform mappings.
lua/traap/plugins/Curated plugin specifications and customizations.
lua/traap/lsp/servers.luaFiletype-to-server registry and server overrides.
lua/traap/lsp/config.luaLSP capabilities, installation, setup, and formatting.
lua/traap/lsp/init.luaNative LSP compatibility commands.
lua/traap/core/Clipboard, notifications, platform detection, wiki helpers, and utilities.

Editor behavior

The principal defaults are two-space indentation, an 80-column text width, relative line numbers, persistent sign columns, rounded floating windows, right/below splits, no swapfile, and no line wrapping. The system clipboard is used locally; remote SSH sessions retain Neovim's internal clipboard.

Autocommands add several workflow conveniences:

  • Create missing parent directories immediately before saving.
  • Restore the last cursor location when reopening ordinary files.
  • Close help, quickfix, Fugitive, health, and similar utility windows with q.
  • Apply prose- and comment-friendly format options to supported source files.
  • Mark csv, sh, and tex buffers with vim.b.autoformat = false.
  • Reapply custom purple borders and UI highlights after colorscheme changes.

Significant plugin customizations

Snacks.nvim

Snacks is the main interface layer. Its dashboard identifies this configuration as powered by lazy.nvim; explorer, file and grep pickers, Git browsing, notifications, buffer deletion, status column, word references, toggles, image support, and Zen mode are enabled. Animation, indentation guides, scrolling, terminal, and Lazygit integrations are deliberately disabled.

The explorer and picker cooperate with tmux: <C-h>, <C-j>, <C-k>, and <C-l> leave the picker and move in the requested direction when there is no adjacent Neovim window.

Frequently used mappings include:

MappingAction
<leader>eOpen the explorer.
<leader>ff / <leader>fgFind files / Git files.
<leader>fb / <leader>frFind buffers / recent files.
<leader>sg / <leader>swGrep text / grep the word or selection.
<leader>sd / <leader>sDShow workspace / buffer diagnostics.
<leader>gb / <leader>glBrowse Git branches / log.
<leader>gBOpen the current location with Git browse.

Completion and Lua development

blink.cmp combines buffer, LSP, path, and snippet sources. It enables command line completion, friendly snippets, ghost text, signature help, automatic documentation after 500 ms, and Rust-backed fuzzy matching when available. Completion capabilities are injected into every configured LSP server.

lazydev.nvim supplies Neovim Lua runtime metadata so completion and diagnostics understand vim, plugin APIs, and the active runtime path.

Treesitter

Treesitter loads for real file buffers. Bash and regular-expression parsers are always ensured; other parsers are installed on the first corresponding FileType event. Parser setup is skipped for transient interfaces such as completion menus, help, quickfix, Lazy, Mason, Noice, notifications, LSP info, and Snacks picker buffers.

Harpoon

Harpoon 2 saves changes to its list automatically while leaving branch-specific marks and automatic UI-close synchronization disabled. Slots one through eight are selected with ;1 through ;8. Harpoon is not enabled inside VS Code.

Markdown and wiki editing

markdown-preview.nvim loads for markdown and wiki buffers and builds its web application with yarn install. Wiki and journal commands are provided by wiki.vim plus the local vim-bundle-wiki.vim customizations. Bullets and checkboxes are active for Markdown, wiki, text, scratch, and Git commit buffers; ;x toggles a checkbox.

img-clip.nvim stores pasted images beneath images/<document-name>/, prompts for the filename, URL-encodes paths, and inserts filetype-specific markup for Markdown, wiki, AsciiDoc, HTML, Org, reStructuredText, TeX, and Typst. It is disabled on Windows.

todo-comments.nvim

In addition to the standard keywords, todo-comments recognizes:

  • YouTube, Youtube, and youtube with a red YouTube icon.
  • URL, Url, and url with a purple link icon.

Keyword sets are merged with the defaults and matches are highlighted even when they appear outside comments.

Git and search

Fugitive loads on :G; Gitsigns supplies buffer signs and hunk operations, and Snacks supplies repository pickers and browser integration. grug-far.nvim provides project-wide search and replacement. Better Quickfix adds a preview window whose borders follow the configuration's purple highlight palette.

UI

TokyoNight uses its transparent night style with italic comments and keywords, transparent sidebars and floats, a hidden inactive statusline, bold Lualine, and purple borders. Noice renders the command line in a popup, sends ordinary messages through notifications, exposes long messages in a split, and filters routine editor noise. Lualine includes Git state, diagnostics, macro recording, Noice command/search status, file metadata, and cursor position. Which-key uses its modern preset with spelling suggestions.

LSP configuration and installation

The LSP stack is composed of three plugins:

  • nvim-lspconfig supplies server definitions compatible with Neovim's native LSP configuration API.
  • mason.nvim installs language-server executables in Neovim's data directory.
  • mason-lspconfig.nvim translates LSP server names into Mason packages.

Servers are installed and configured by filetype rather than eagerly at startup. On the first matching FileType event, the configuration:

  1. Looks up the server in lua/traap/lsp/servers.lua.
  2. Skips setup when that server was already handled during the session.
  3. Asks Mason to ensure the package is installed unless mason = false.
  4. Merges Blink completion capabilities and the format-on-save attachment hook with the server-specific options.
  5. Configures and enables the server through vim.lsp.config() and vim.lsp.enable(); a legacy lspconfig.setup() fallback remains available.

The first visit to a filetype may initiate a Mason installation. Open another buffer of that type or run :LspStart after installation finishes if the executable was not available when Neovim first attempted to start it.

The registry currently supports:

LanguagesServers
Bash, C/C++, C#, CSSbashls, clangd, csharp_ls, cssls
Go, HTML, Java, JSONgopls, html, jdtls, jsonls
Julia, LaTeX prose, Lua, Markdownjulials, ltex, lua_ls, marksman
Nix, Python, QML, Rubynixd, pyright, qmlls, solargraph
Rust, SQL, Svelte, TeXrust_analyzer, sqls, svelte, texlab
TOML, JavaScript/TypeScript, Vim, XML, YAML, Zigtaplo, ts_ls, vimls, lemminx, yamlls, zls

Solargraph is explicitly excluded from Mason management and is deliberately launched with:

mise exec ruby@4.0.0 -- solargraph stdio

nixd is expected to exist on PATH. If it is unavailable through the active Mason registry, its server entry should also use mason = false. The Lua server knows the complete Neovim runtime library and accepts vim and Snacks as globals. Clangd enables background indexing and clang-tidy, requests detailed completion, and suppresses automatic header insertion.

When a client supports textDocument/formatting, a buffer-local BufWritePre hook formats synchronously. The current LSP hook does not consult the vim.b.autoformat flag used elsewhere in the configuration.

Native LSP mappings are installed when a client attaches:

MappingAction
gd / gDDefinition / declaration.
gi / grImplementation / references.
K / <leader>kHover / signature help.
<leader>rnRename symbol.
<leader>caCode action.
<leader>EOpen diagnostic float.
[d / ]dPrevious / next diagnostic.
<leader>qPopulate the location list with diagnostics.

LSP maintenance commands:

CommandPurpose
:LspInfoRun :checkhealth vim.lsp.
:LspLogOpen the Neovim LSP log in a tab.
:LspStart [server...]Enable named servers, or the server for the current filetype.
:LspRestart[!] [server...]Restart named or active servers; ! force-stops clients.
:LspStop[!] [server...]Disable named or active servers; ! force-stops clients.

To add or change a language server, edit lua/traap/lsp/servers.lua. Each registry entry requires a native LSP server name and one or more filetypes. Add opts for server-specific settings or a custom command. Set mason = false when the executable is installed outside Mason.

example= {
name="example_ls",
filetypes= { "example" },
opts= {
settings= { example= { enabled=true } },
},
}

Platform behavior

Standalone Neovim receives the complete UI, completion, LSP, Treesitter, Git, Harpoon, and content-authoring stack. VS Code receives a reduced plugin list and routes selected editor actions to VS Code commands. Platform helpers also adapt clipboard behavior for SSH and Windows and allow picker navigation to cross Neovim/tmux boundaries.

Validation and maintenance

After changing the configuration, useful checks are:

nvim --headless "+Lazy! sync""+qa"
nvim --headless "+checkhealth""+qa"
stylua --check init.lua lua

Within Neovim, use :Lazy profile to inspect startup behavior, :Mason to inspect installed language servers, and :LspInfo from a source buffer to confirm that its client attached.

About

neovim configuration done with Lua.

Resources

Stars

84 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

Traap's Blazing Fast Neovim configuration.

Credits

Linux Bash Installation

resetNeovim does the following:

  1. Uses bnvim to clone or pull Neovim sources and build them.
  2. Uses "switchNeovim traap" to switch to my Neovim configuration.

Notes

  1. Backups are not done.
  2. You have been warned.

Extra credit

Try nvims to safely experiment with multiple Neovim configurations.

Overview

nvim.traap is my production Neovim configuration. It is powered by lazy.nvim, uses Neovim's native LSP client, and borrows selected conventions from LazyVim without loading the LazyVim distribution or its default plugin set.

The configuration favors deliberate lazy loading and a small startup surface. It provides a complete coding environment when launched in Neovim and a reduced integration layer when embedded in VS Code.

Requirements

  • A recent Neovim release with the native vim.lsp.config() and vim.lsp.enable() APIs.
  • Git, which bootstraps lazy.nvim and installs plugins.
  • A Nerd Font for icons used throughout the interface.
  • ripgrep for Snacks grep and todo searches.
  • Node.js and Yarn to build markdown-preview.nvim.
  • mise with Ruby 4.0.0 and Solargraph for Ruby LSP support.
  • nixd on PATH for Nix LSP support.

Language servers managed by Mason may have additional runtime requirements. Use :checkhealth, :checkhealth vim.lsp, and :Mason when diagnosing a missing tool.

Startup and package management

init.lua owns the startup sequence:

  1. Set the global and local leader to <Space>.
  2. Bootstrap lazy.nvim into Neovim's data directory when it is absent.
  3. Load the curated plugin specifications from lua/traap/plugins.
  4. Apply options, autocommands, keymaps, clipboard integration, and platform detection.
  5. Apply TokyoNight when running in standalone Neovim.

Plugins are intentionally unversioned so updates follow their current upstream branches. The automatic update checker and configuration-change notifications are disabled. lazy-lock.json records the working revisions.

Useful package commands:

CommandPurpose
:LazyOpen the plugin manager.
:Lazy syncInstall missing plugins, update plugins, and remove unused plugins.
:Lazy updateUpdate installed plugins and the lockfile.
:Lazy cleanRemove plugins no longer present in the specification.
:Lazy profileInspect startup and plugin load times.
:MasonInspect language-server installations.

Configuration layout

PathResponsibility
init.luaEntrypoint and startup ordering.
lua/traap/config/bootstrap.luaInstalls and adds lazy.nvim to the runtime path.
lua/traap/config/lazy.luaPackage-manager policy and UI.
lua/traap/config/options.luaGlobal editor defaults.
lua/traap/config/autocmds.luaFiletype and buffer lifecycle behavior.
lua/traap/config/keymaps.luaCore, plugin, LSP, and platform mappings.
lua/traap/plugins/Curated plugin specifications and customizations.
lua/traap/lsp/servers.luaFiletype-to-server registry and server overrides.
lua/traap/lsp/config.luaLSP capabilities, installation, setup, and formatting.
lua/traap/lsp/init.luaNative LSP compatibility commands.
lua/traap/core/Clipboard, notifications, platform detection, wiki helpers, and utilities.

Editor behavior

The principal defaults are two-space indentation, an 80-column text width, relative line numbers, persistent sign columns, rounded floating windows, right/below splits, no swapfile, and no line wrapping. The system clipboard is used locally; remote SSH sessions retain Neovim's internal clipboard.

Autocommands add several workflow conveniences:

  • Create missing parent directories immediately before saving.
  • Restore the last cursor location when reopening ordinary files.
  • Close help, quickfix, Fugitive, health, and similar utility windows with q.
  • Apply prose- and comment-friendly format options to supported source files.
  • Mark csv, sh, and tex buffers with vim.b.autoformat = false.
  • Reapply custom purple borders and UI highlights after colorscheme changes.

Significant plugin customizations

Snacks.nvim

Snacks is the main interface layer. Its dashboard identifies this configuration as powered by lazy.nvim; explorer, file and grep pickers, Git browsing, notifications, buffer deletion, status column, word references, toggles, image support, and Zen mode are enabled. Animation, indentation guides, scrolling, terminal, and Lazygit integrations are deliberately disabled.

The explorer and picker cooperate with tmux: <C-h>, <C-j>, <C-k>, and <C-l> leave the picker and move in the requested direction when there is no adjacent Neovim window.

Frequently used mappings include:

MappingAction
<leader>eOpen the explorer.
<leader>ff / <leader>fgFind files / Git files.
<leader>fb / <leader>frFind buffers / recent files.
<leader>sg / <leader>swGrep text / grep the word or selection.
<leader>sd / <leader>sDShow workspace / buffer diagnostics.
<leader>gb / <leader>glBrowse Git branches / log.
<leader>gBOpen the current location with Git browse.

Completion and Lua development

blink.cmp combines buffer, LSP, path, and snippet sources. It enables command line completion, friendly snippets, ghost text, signature help, automatic documentation after 500 ms, and Rust-backed fuzzy matching when available. Completion capabilities are injected into every configured LSP server.

lazydev.nvim supplies Neovim Lua runtime metadata so completion and diagnostics understand vim, plugin APIs, and the active runtime path.

Treesitter

Treesitter loads for real file buffers. Bash and regular-expression parsers are always ensured; other parsers are installed on the first corresponding FileType event. Parser setup is skipped for transient interfaces such as completion menus, help, quickfix, Lazy, Mason, Noice, notifications, LSP info, and Snacks picker buffers.

Harpoon

Harpoon 2 saves changes to its list automatically while leaving branch-specific marks and automatic UI-close synchronization disabled. Slots one through eight are selected with ;1 through ;8. Harpoon is not enabled inside VS Code.

Markdown and wiki editing

markdown-preview.nvim loads for markdown and wiki buffers and builds its web application with yarn install. Wiki and journal commands are provided by wiki.vim plus the local vim-bundle-wiki.vim customizations. Bullets and checkboxes are active for Markdown, wiki, text, scratch, and Git commit buffers; ;x toggles a checkbox.

img-clip.nvim stores pasted images beneath images/<document-name>/, prompts for the filename, URL-encodes paths, and inserts filetype-specific markup for Markdown, wiki, AsciiDoc, HTML, Org, reStructuredText, TeX, and Typst. It is disabled on Windows.

todo-comments.nvim

In addition to the standard keywords, todo-comments recognizes:

  • YouTube, Youtube, and youtube with a red YouTube icon.
  • URL, Url, and url with a purple link icon.

Keyword sets are merged with the defaults and matches are highlighted even when they appear outside comments.

Git and search

Fugitive loads on :G; Gitsigns supplies buffer signs and hunk operations, and Snacks supplies repository pickers and browser integration. grug-far.nvim provides project-wide search and replacement. Better Quickfix adds a preview window whose borders follow the configuration's purple highlight palette.

UI

TokyoNight uses its transparent night style with italic comments and keywords, transparent sidebars and floats, a hidden inactive statusline, bold Lualine, and purple borders. Noice renders the command line in a popup, sends ordinary messages through notifications, exposes long messages in a split, and filters routine editor noise. Lualine includes Git state, diagnostics, macro recording, Noice command/search status, file metadata, and cursor position. Which-key uses its modern preset with spelling suggestions.

LSP configuration and installation

The LSP stack is composed of three plugins:

  • nvim-lspconfig supplies server definitions compatible with Neovim's native LSP configuration API.
  • mason.nvim installs language-server executables in Neovim's data directory.
  • mason-lspconfig.nvim translates LSP server names into Mason packages.

Servers are installed and configured by filetype rather than eagerly at startup. On the first matching FileType event, the configuration:

  1. Looks up the server in lua/traap/lsp/servers.lua.
  2. Skips setup when that server was already handled during the session.
  3. Asks Mason to ensure the package is installed unless mason = false.
  4. Merges Blink completion capabilities and the format-on-save attachment hook with the server-specific options.
  5. Configures and enables the server through vim.lsp.config() and vim.lsp.enable(); a legacy lspconfig.setup() fallback remains available.

The first visit to a filetype may initiate a Mason installation. Open another buffer of that type or run :LspStart after installation finishes if the executable was not available when Neovim first attempted to start it.

The registry currently supports:

LanguagesServers
Bash, C/C++, C#, CSSbashls, clangd, csharp_ls, cssls
Go, HTML, Java, JSONgopls, html, jdtls, jsonls
Julia, LaTeX prose, Lua, Markdownjulials, ltex, lua_ls, marksman
Nix, Python, QML, Rubynixd, pyright, qmlls, solargraph
Rust, SQL, Svelte, TeXrust_analyzer, sqls, svelte, texlab
TOML, JavaScript/TypeScript, Vim, XML, YAML, Zigtaplo, ts_ls, vimls, lemminx, yamlls, zls

Solargraph is explicitly excluded from Mason management and is deliberately launched with:

mise exec ruby@4.0.0 -- solargraph stdio

nixd is expected to exist on PATH. If it is unavailable through the active Mason registry, its server entry should also use mason = false. The Lua server knows the complete Neovim runtime library and accepts vim and Snacks as globals. Clangd enables background indexing and clang-tidy, requests detailed completion, and suppresses automatic header insertion.

When a client supports textDocument/formatting, a buffer-local BufWritePre hook formats synchronously. The current LSP hook does not consult the vim.b.autoformat flag used elsewhere in the configuration.

Native LSP mappings are installed when a client attaches:

MappingAction
gd / gDDefinition / declaration.
gi / grImplementation / references.
K / <leader>kHover / signature help.
<leader>rnRename symbol.
<leader>caCode action.
<leader>EOpen diagnostic float.
[d / ]dPrevious / next diagnostic.
<leader>qPopulate the location list with diagnostics.

LSP maintenance commands:

CommandPurpose
:LspInfoRun :checkhealth vim.lsp.
:LspLogOpen the Neovim LSP log in a tab.
:LspStart [server...]Enable named servers, or the server for the current filetype.
:LspRestart[!] [server...]Restart named or active servers; ! force-stops clients.
:LspStop[!] [server...]Disable named or active servers; ! force-stops clients.

To add or change a language server, edit lua/traap/lsp/servers.lua. Each registry entry requires a native LSP server name and one or more filetypes. Add opts for server-specific settings or a custom command. Set mason = false when the executable is installed outside Mason.

example= {
name="example_ls",
filetypes= { "example" },
opts= {
settings= { example= { enabled=true } },
},
}

Platform behavior

Standalone Neovim receives the complete UI, completion, LSP, Treesitter, Git, Harpoon, and content-authoring stack. VS Code receives a reduced plugin list and routes selected editor actions to VS Code commands. Platform helpers also adapt clipboard behavior for SSH and Windows and allow picker navigation to cross Neovim/tmux boundaries.

Validation and maintenance

After changing the configuration, useful checks are:

nvim --headless "+Lazy! sync""+qa"
nvim --headless "+checkhealth""+qa"
stylua --check init.lua lua

Within Neovim, use :Lazy profile to inspect startup behavior, :Mason to inspect installed language servers, and :LspInfo from a source buffer to confirm that its client attached.

About

neovim configuration done with Lua.

Resources

Stars

84 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

Traap's Blazing Fast Neovim configuration.

Credits

Linux Bash Installation

resetNeovim does the following:

  1. Uses bnvim to clone or pull Neovim sources and build them.
  2. Uses "switchNeovim traap" to switch to my Neovim configuration.

Notes

  1. Backups are not done.
  2. You have been warned.

Extra credit

Try nvims to safely experiment with multiple Neovim configurations.

Overview

nvim.traap is my production Neovim configuration. It is powered by lazy.nvim, uses Neovim's native LSP client, and borrows selected conventions from LazyVim without loading the LazyVim distribution or its default plugin set.

The configuration favors deliberate lazy loading and a small startup surface. It provides a complete coding environment when launched in Neovim and a reduced integration layer when embedded in VS Code.

Requirements

  • A recent Neovim release with the native vim.lsp.config() and vim.lsp.enable() APIs.
  • Git, which bootstraps lazy.nvim and installs plugins.
  • A Nerd Font for icons used throughout the interface.
  • ripgrep for Snacks grep and todo searches.
  • Node.js and Yarn to build markdown-preview.nvim.
  • mise with Ruby 4.0.0 and Solargraph for Ruby LSP support.
  • nixd on PATH for Nix LSP support.

Language servers managed by Mason may have additional runtime requirements. Use :checkhealth, :checkhealth vim.lsp, and :Mason when diagnosing a missing tool.

Startup and package management

init.lua owns the startup sequence:

  1. Set the global and local leader to <Space>.
  2. Bootstrap lazy.nvim into Neovim's data directory when it is absent.
  3. Load the curated plugin specifications from lua/traap/plugins.
  4. Apply options, autocommands, keymaps, clipboard integration, and platform detection.
  5. Apply TokyoNight when running in standalone Neovim.

Plugins are intentionally unversioned so updates follow their current upstream branches. The automatic update checker and configuration-change notifications are disabled. lazy-lock.json records the working revisions.

Useful package commands:

CommandPurpose
:LazyOpen the plugin manager.
:Lazy syncInstall missing plugins, update plugins, and remove unused plugins.
:Lazy updateUpdate installed plugins and the lockfile.
:Lazy cleanRemove plugins no longer present in the specification.
:Lazy profileInspect startup and plugin load times.
:MasonInspect language-server installations.

Configuration layout

PathResponsibility
init.luaEntrypoint and startup ordering.
lua/traap/config/bootstrap.luaInstalls and adds lazy.nvim to the runtime path.
lua/traap/config/lazy.luaPackage-manager policy and UI.
lua/traap/config/options.luaGlobal editor defaults.
lua/traap/config/autocmds.luaFiletype and buffer lifecycle behavior.
lua/traap/config/keymaps.luaCore, plugin, LSP, and platform mappings.
lua/traap/plugins/Curated plugin specifications and customizations.
lua/traap/lsp/servers.luaFiletype-to-server registry and server overrides.
lua/traap/lsp/config.luaLSP capabilities, installation, setup, and formatting.
lua/traap/lsp/init.luaNative LSP compatibility commands.
lua/traap/core/Clipboard, notifications, platform detection, wiki helpers, and utilities.

Editor behavior

The principal defaults are two-space indentation, an 80-column text width, relative line numbers, persistent sign columns, rounded floating windows, right/below splits, no swapfile, and no line wrapping. The system clipboard is used locally; remote SSH sessions retain Neovim's internal clipboard.

Autocommands add several workflow conveniences:

  • Create missing parent directories immediately before saving.
  • Restore the last cursor location when reopening ordinary files.
  • Close help, quickfix, Fugitive, health, and similar utility windows with q.
  • Apply prose- and comment-friendly format options to supported source files.
  • Mark csv, sh, and tex buffers with vim.b.autoformat = false.
  • Reapply custom purple borders and UI highlights after colorscheme changes.

Significant plugin customizations

Snacks.nvim

Snacks is the main interface layer. Its dashboard identifies this configuration as powered by lazy.nvim; explorer, file and grep pickers, Git browsing, notifications, buffer deletion, status column, word references, toggles, image support, and Zen mode are enabled. Animation, indentation guides, scrolling, terminal, and Lazygit integrations are deliberately disabled.

The explorer and picker cooperate with tmux: <C-h>, <C-j>, <C-k>, and <C-l> leave the picker and move in the requested direction when there is no adjacent Neovim window.

Frequently used mappings include:

MappingAction
<leader>eOpen the explorer.
<leader>ff / <leader>fgFind files / Git files.
<leader>fb / <leader>frFind buffers / recent files.
<leader>sg / <leader>swGrep text / grep the word or selection.
<leader>sd / <leader>sDShow workspace / buffer diagnostics.
<leader>gb / <leader>glBrowse Git branches / log.
<leader>gBOpen the current location with Git browse.

Completion and Lua development

blink.cmp combines buffer, LSP, path, and snippet sources. It enables command line completion, friendly snippets, ghost text, signature help, automatic documentation after 500 ms, and Rust-backed fuzzy matching when available. Completion capabilities are injected into every configured LSP server.

lazydev.nvim supplies Neovim Lua runtime metadata so completion and diagnostics understand vim, plugin APIs, and the active runtime path.

Treesitter

Treesitter loads for real file buffers. Bash and regular-expression parsers are always ensured; other parsers are installed on the first corresponding FileType event. Parser setup is skipped for transient interfaces such as completion menus, help, quickfix, Lazy, Mason, Noice, notifications, LSP info, and Snacks picker buffers.

Harpoon

Harpoon 2 saves changes to its list automatically while leaving branch-specific marks and automatic UI-close synchronization disabled. Slots one through eight are selected with ;1 through ;8. Harpoon is not enabled inside VS Code.

Markdown and wiki editing

markdown-preview.nvim loads for markdown and wiki buffers and builds its web application with yarn install. Wiki and journal commands are provided by wiki.vim plus the local vim-bundle-wiki.vim customizations. Bullets and checkboxes are active for Markdown, wiki, text, scratch, and Git commit buffers; ;x toggles a checkbox.

img-clip.nvim stores pasted images beneath images/<document-name>/, prompts for the filename, URL-encodes paths, and inserts filetype-specific markup for Markdown, wiki, AsciiDoc, HTML, Org, reStructuredText, TeX, and Typst. It is disabled on Windows.

todo-comments.nvim

In addition to the standard keywords, todo-comments recognizes:

  • YouTube, Youtube, and youtube with a red YouTube icon.
  • URL, Url, and url with a purple link icon.

Keyword sets are merged with the defaults and matches are highlighted even when they appear outside comments.

Git and search

Fugitive loads on :G; Gitsigns supplies buffer signs and hunk operations, and Snacks supplies repository pickers and browser integration. grug-far.nvim provides project-wide search and replacement. Better Quickfix adds a preview window whose borders follow the configuration's purple highlight palette.

UI

TokyoNight uses its transparent night style with italic comments and keywords, transparent sidebars and floats, a hidden inactive statusline, bold Lualine, and purple borders. Noice renders the command line in a popup, sends ordinary messages through notifications, exposes long messages in a split, and filters routine editor noise. Lualine includes Git state, diagnostics, macro recording, Noice command/search status, file metadata, and cursor position. Which-key uses its modern preset with spelling suggestions.

LSP configuration and installation

The LSP stack is composed of three plugins:

  • nvim-lspconfig supplies server definitions compatible with Neovim's native LSP configuration API.
  • mason.nvim installs language-server executables in Neovim's data directory.
  • mason-lspconfig.nvim translates LSP server names into Mason packages.

Servers are installed and configured by filetype rather than eagerly at startup. On the first matching FileType event, the configuration:

  1. Looks up the server in lua/traap/lsp/servers.lua.
  2. Skips setup when that server was already handled during the session.
  3. Asks Mason to ensure the package is installed unless mason = false.
  4. Merges Blink completion capabilities and the format-on-save attachment hook with the server-specific options.
  5. Configures and enables the server through vim.lsp.config() and vim.lsp.enable(); a legacy lspconfig.setup() fallback remains available.

The first visit to a filetype may initiate a Mason installation. Open another buffer of that type or run :LspStart after installation finishes if the executable was not available when Neovim first attempted to start it.

The registry currently supports:

LanguagesServers
Bash, C/C++, C#, CSSbashls, clangd, csharp_ls, cssls
Go, HTML, Java, JSONgopls, html, jdtls, jsonls
Julia, LaTeX prose, Lua, Markdownjulials, ltex, lua_ls, marksman
Nix, Python, QML, Rubynixd, pyright, qmlls, solargraph
Rust, SQL, Svelte, TeXrust_analyzer, sqls, svelte, texlab
TOML, JavaScript/TypeScript, Vim, XML, YAML, Zigtaplo, ts_ls, vimls, lemminx, yamlls, zls

Solargraph is explicitly excluded from Mason management and is deliberately launched with:

mise exec ruby@4.0.0 -- solargraph stdio

nixd is expected to exist on PATH. If it is unavailable through the active Mason registry, its server entry should also use mason = false. The Lua server knows the complete Neovim runtime library and accepts vim and Snacks as globals. Clangd enables background indexing and clang-tidy, requests detailed completion, and suppresses automatic header insertion.

When a client supports textDocument/formatting, a buffer-local BufWritePre hook formats synchronously. The current LSP hook does not consult the vim.b.autoformat flag used elsewhere in the configuration.

Native LSP mappings are installed when a client attaches:

MappingAction
gd / gDDefinition / declaration.
gi / grImplementation / references.
K / <leader>kHover / signature help.
<leader>rnRename symbol.
<leader>caCode action.
<leader>EOpen diagnostic float.
[d / ]dPrevious / next diagnostic.
<leader>qPopulate the location list with diagnostics.

LSP maintenance commands:

CommandPurpose
:LspInfoRun :checkhealth vim.lsp.
:LspLogOpen the Neovim LSP log in a tab.
:LspStart [server...]Enable named servers, or the server for the current filetype.
:LspRestart[!] [server...]Restart named or active servers; ! force-stops clients.
:LspStop[!] [server...]Disable named or active servers; ! force-stops clients.

To add or change a language server, edit lua/traap/lsp/servers.lua. Each registry entry requires a native LSP server name and one or more filetypes. Add opts for server-specific settings or a custom command. Set mason = false when the executable is installed outside Mason.

example= {
name="example_ls",
filetypes= { "example" },
opts= {
settings= { example= { enabled=true } },
},
}

Platform behavior

Standalone Neovim receives the complete UI, completion, LSP, Treesitter, Git, Harpoon, and content-authoring stack. VS Code receives a reduced plugin list and routes selected editor actions to VS Code commands. Platform helpers also adapt clipboard behavior for SSH and Windows and allow picker navigation to cross Neovim/tmux boundaries.

Validation and maintenance

After changing the configuration, useful checks are:

nvim --headless "+Lazy! sync""+qa"
nvim --headless "+checkhealth""+qa"
stylua --check init.lua lua

Within Neovim, use :Lazy profile to inspect startup behavior, :Mason to inspect installed language servers, and :LspInfo from a source buffer to confirm that its client attached.

About

neovim configuration done with Lua.

Resources

Stars

84 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Repository files navigation

Traap's Blazing Fast Neovim configuration.

Credits

Linux Bash Installation

resetNeovim does the following:

  1. Uses bnvim to clone or pull Neovim sources and build them.
  2. Uses "switchNeovim traap" to switch to my Neovim configuration.

Notes

  1. Backups are not done.
  2. You have been warned.

Extra credit

Try nvims to safely experiment with multiple Neovim configurations.

Overview

nvim.traap is my production Neovim configuration. It is powered by lazy.nvim, uses Neovim's native LSP client, and borrows selected conventions from LazyVim without loading the LazyVim distribution or its default plugin set.

The configuration favors deliberate lazy loading and a small startup surface. It provides a complete coding environment when launched in Neovim and a reduced integration layer when embedded in VS Code.

Requirements

  • A recent Neovim release with the native vim.lsp.config() and vim.lsp.enable() APIs.
  • Git, which bootstraps lazy.nvim and installs plugins.
  • A Nerd Font for icons used throughout the interface.
  • ripgrep for Snacks grep and todo searches.
  • Node.js and Yarn to build markdown-preview.nvim.
  • mise with Ruby 4.0.0 and Solargraph for Ruby LSP support.
  • nixd on PATH for Nix LSP support.

Language servers managed by Mason may have additional runtime requirements. Use :checkhealth, :checkhealth vim.lsp, and :Mason when diagnosing a missing tool.

Startup and package management

init.lua owns the startup sequence:

  1. Set the global and local leader to <Space>.
  2. Bootstrap lazy.nvim into Neovim's data directory when it is absent.
  3. Load the curated plugin specifications from lua/traap/plugins.
  4. Apply options, autocommands, keymaps, clipboard integration, and platform detection.
  5. Apply TokyoNight when running in standalone Neovim.

Plugins are intentionally unversioned so updates follow their current upstream branches. The automatic update checker and configuration-change notifications are disabled. lazy-lock.json records the working revisions.

Useful package commands:

CommandPurpose
:LazyOpen the plugin manager.
:Lazy syncInstall missing plugins, update plugins, and remove unused plugins.
:Lazy updateUpdate installed plugins and the lockfile.
:Lazy cleanRemove plugins no longer present in the specification.
:Lazy profileInspect startup and plugin load times.
:MasonInspect language-server installations.

Configuration layout

PathResponsibility
init.luaEntrypoint and startup ordering.
lua/traap/config/bootstrap.luaInstalls and adds lazy.nvim to the runtime path.
lua/traap/config/lazy.luaPackage-manager policy and UI.
lua/traap/config/options.luaGlobal editor defaults.
lua/traap/config/autocmds.luaFiletype and buffer lifecycle behavior.
lua/traap/config/keymaps.luaCore, plugin, LSP, and platform mappings.
lua/traap/plugins/Curated plugin specifications and customizations.
lua/traap/lsp/servers.luaFiletype-to-server registry and server overrides.
lua/traap/lsp/config.luaLSP capabilities, installation, setup, and formatting.
lua/traap/lsp/init.luaNative LSP compatibility commands.
lua/traap/core/Clipboard, notifications, platform detection, wiki helpers, and utilities.

Editor behavior

The principal defaults are two-space indentation, an 80-column text width, relative line numbers, persistent sign columns, rounded floating windows, right/below splits, no swapfile, and no line wrapping. The system clipboard is used locally; remote SSH sessions retain Neovim's internal clipboard.

Autocommands add several workflow conveniences:

  • Create missing parent directories immediately before saving.
  • Restore the last cursor location when reopening ordinary files.
  • Close help, quickfix, Fugitive, health, and similar utility windows with q.
  • Apply prose- and comment-friendly format options to supported source files.
  • Mark csv, sh, and tex buffers with vim.b.autoformat = false.
  • Reapply custom purple borders and UI highlights after colorscheme changes.

Significant plugin customizations

Snacks.nvim

Snacks is the main interface layer. Its dashboard identifies this configuration as powered by lazy.nvim; explorer, file and grep pickers, Git browsing, notifications, buffer deletion, status column, word references, toggles, image support, and Zen mode are enabled. Animation, indentation guides, scrolling, terminal, and Lazygit integrations are deliberately disabled.

The explorer and picker cooperate with tmux: <C-h>, <C-j>, <C-k>, and <C-l> leave the picker and move in the requested direction when there is no adjacent Neovim window.

Frequently used mappings include:

MappingAction
<leader>eOpen the explorer.
<leader>ff / <leader>fgFind files / Git files.
<leader>fb / <leader>frFind buffers / recent files.
<leader>sg / <leader>swGrep text / grep the word or selection.
<leader>sd / <leader>sDShow workspace / buffer diagnostics.
<leader>gb / <leader>glBrowse Git branches / log.
<leader>gBOpen the current location with Git browse.

Completion and Lua development

blink.cmp combines buffer, LSP, path, and snippet sources. It enables command line completion, friendly snippets, ghost text, signature help, automatic documentation after 500 ms, and Rust-backed fuzzy matching when available. Completion capabilities are injected into every configured LSP server.

lazydev.nvim supplies Neovim Lua runtime metadata so completion and diagnostics understand vim, plugin APIs, and the active runtime path.

Treesitter

Treesitter loads for real file buffers. Bash and regular-expression parsers are always ensured; other parsers are installed on the first corresponding FileType event. Parser setup is skipped for transient interfaces such as completion menus, help, quickfix, Lazy, Mason, Noice, notifications, LSP info, and Snacks picker buffers.

Harpoon

Harpoon 2 saves changes to its list automatically while leaving branch-specific marks and automatic UI-close synchronization disabled. Slots one through eight are selected with ;1 through ;8. Harpoon is not enabled inside VS Code.

Markdown and wiki editing

markdown-preview.nvim loads for markdown and wiki buffers and builds its web application with yarn install. Wiki and journal commands are provided by wiki.vim plus the local vim-bundle-wiki.vim customizations. Bullets and checkboxes are active for Markdown, wiki, text, scratch, and Git commit buffers; ;x toggles a checkbox.

img-clip.nvim stores pasted images beneath images/<document-name>/, prompts for the filename, URL-encodes paths, and inserts filetype-specific markup for Markdown, wiki, AsciiDoc, HTML, Org, reStructuredText, TeX, and Typst. It is disabled on Windows.

todo-comments.nvim

In addition to the standard keywords, todo-comments recognizes:

  • YouTube, Youtube, and youtube with a red YouTube icon.
  • URL, Url, and url with a purple link icon.

Keyword sets are merged with the defaults and matches are highlighted even when they appear outside comments.

Git and search

Fugitive loads on :G; Gitsigns supplies buffer signs and hunk operations, and Snacks supplies repository pickers and browser integration. grug-far.nvim provides project-wide search and replacement. Better Quickfix adds a preview window whose borders follow the configuration's purple highlight palette.

UI

TokyoNight uses its transparent night style with italic comments and keywords, transparent sidebars and floats, a hidden inactive statusline, bold Lualine, and purple borders. Noice renders the command line in a popup, sends ordinary messages through notifications, exposes long messages in a split, and filters routine editor noise. Lualine includes Git state, diagnostics, macro recording, Noice command/search status, file metadata, and cursor position. Which-key uses its modern preset with spelling suggestions.

LSP configuration and installation

The LSP stack is composed of three plugins:

  • nvim-lspconfig supplies server definitions compatible with Neovim's native LSP configuration API.
  • mason.nvim installs language-server executables in Neovim's data directory.
  • mason-lspconfig.nvim translates LSP server names into Mason packages.

Servers are installed and configured by filetype rather than eagerly at startup. On the first matching FileType event, the configuration:

  1. Looks up the server in lua/traap/lsp/servers.lua.
  2. Skips setup when that server was already handled during the session.
  3. Asks Mason to ensure the package is installed unless mason = false.
  4. Merges Blink completion capabilities and the format-on-save attachment hook with the server-specific options.
  5. Configures and enables the server through vim.lsp.config() and vim.lsp.enable(); a legacy lspconfig.setup() fallback remains available.

The first visit to a filetype may initiate a Mason installation. Open another buffer of that type or run :LspStart after installation finishes if the executable was not available when Neovim first attempted to start it.

The registry currently supports:

LanguagesServers
Bash, C/C++, C#, CSSbashls, clangd, csharp_ls, cssls
Go, HTML, Java, JSONgopls, html, jdtls, jsonls
Julia, LaTeX prose, Lua, Markdownjulials, ltex, lua_ls, marksman
Nix, Python, QML, Rubynixd, pyright, qmlls, solargraph
Rust, SQL, Svelte, TeXrust_analyzer, sqls, svelte, texlab
TOML, JavaScript/TypeScript, Vim, XML, YAML, Zigtaplo, ts_ls, vimls, lemminx, yamlls, zls

Solargraph is explicitly excluded from Mason management and is deliberately launched with:

mise exec ruby@4.0.0 -- solargraph stdio

nixd is expected to exist on PATH. If it is unavailable through the active Mason registry, its server entry should also use mason = false. The Lua server knows the complete Neovim runtime library and accepts vim and Snacks as globals. Clangd enables background indexing and clang-tidy, requests detailed completion, and suppresses automatic header insertion.

When a client supports textDocument/formatting, a buffer-local BufWritePre hook formats synchronously. The current LSP hook does not consult the vim.b.autoformat flag used elsewhere in the configuration.

Native LSP mappings are installed when a client attaches:

MappingAction
gd / gDDefinition / declaration.
gi / grImplementation / references.
K / <leader>kHover / signature help.
<leader>rnRename symbol.
<leader>caCode action.
<leader>EOpen diagnostic float.
[d / ]dPrevious / next diagnostic.
<leader>qPopulate the location list with diagnostics.

LSP maintenance commands:

CommandPurpose
:LspInfoRun :checkhealth vim.lsp.
:LspLogOpen the Neovim LSP log in a tab.
:LspStart [server...]Enable named servers, or the server for the current filetype.
:LspRestart[!] [server...]Restart named or active servers; ! force-stops clients.
:LspStop[!] [server...]Disable named or active servers; ! force-stops clients.

To add or change a language server, edit lua/traap/lsp/servers.lua. Each registry entry requires a native LSP server name and one or more filetypes. Add opts for server-specific settings or a custom command. Set mason = false when the executable is installed outside Mason.

example= {
name="example_ls",
filetypes= { "example" },
opts= {
settings= { example= { enabled=true } },
},
}

Platform behavior

Standalone Neovim receives the complete UI, completion, LSP, Treesitter, Git, Harpoon, and content-authoring stack. VS Code receives a reduced plugin list and routes selected editor actions to VS Code commands. Platform helpers also adapt clipboard behavior for SSH and Windows and allow picker navigation to cross Neovim/tmux boundaries.

Validation and maintenance

After changing the configuration, useful checks are:

nvim --headless "+Lazy! sync""+qa"
nvim --headless "+checkhealth""+qa"
stylua --check init.lua lua

Within Neovim, use :Lazy profile to inspect startup behavior, :Mason to inspect installed language servers, and :LspInfo from a source buffer to confirm that its client attached.

About

neovim configuration done with Lua.

Resources

Stars

84 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

Traap's Blazing Fast Neovim configuration.

Credits

Linux Bash Installation

resetNeovim does the following:

  1. Uses bnvim to clone or pull Neovim sources and build them.
  2. Uses "switchNeovim traap" to switch to my Neovim configuration.

Notes

  1. Backups are not done.
  2. You have been warned.

Extra credit

Try nvims to safely experiment with multiple Neovim configurations.

Overview

nvim.traap is my production Neovim configuration. It is powered by lazy.nvim, uses Neovim's native LSP client, and borrows selected conventions from LazyVim without loading the LazyVim distribution or its default plugin set.

The configuration favors deliberate lazy loading and a small startup surface. It provides a complete coding environment when launched in Neovim and a reduced integration layer when embedded in VS Code.

Requirements

  • A recent Neovim release with the native vim.lsp.config() and vim.lsp.enable() APIs.
  • Git, which bootstraps lazy.nvim and installs plugins.
  • A Nerd Font for icons used throughout the interface.
  • ripgrep for Snacks grep and todo searches.
  • Node.js and Yarn to build markdown-preview.nvim.
  • mise with Ruby 4.0.0 and Solargraph for Ruby LSP support.
  • nixd on PATH for Nix LSP support.

Language servers managed by Mason may have additional runtime requirements. Use :checkhealth, :checkhealth vim.lsp, and :Mason when diagnosing a missing tool.

Startup and package management

init.lua owns the startup sequence:

  1. Set the global and local leader to <Space>.
  2. Bootstrap lazy.nvim into Neovim's data directory when it is absent.
  3. Load the curated plugin specifications from lua/traap/plugins.
  4. Apply options, autocommands, keymaps, clipboard integration, and platform detection.
  5. Apply TokyoNight when running in standalone Neovim.

Plugins are intentionally unversioned so updates follow their current upstream branches. The automatic update checker and configuration-change notifications are disabled. lazy-lock.json records the working revisions.

Useful package commands:

CommandPurpose
:LazyOpen the plugin manager.
:Lazy syncInstall missing plugins, update plugins, and remove unused plugins.
:Lazy updateUpdate installed plugins and the lockfile.
:Lazy cleanRemove plugins no longer present in the specification.
:Lazy profileInspect startup and plugin load times.
:MasonInspect language-server installations.

Configuration layout

PathResponsibility
init.luaEntrypoint and startup ordering.
lua/traap/config/bootstrap.luaInstalls and adds lazy.nvim to the runtime path.
lua/traap/config/lazy.luaPackage-manager policy and UI.
lua/traap/config/options.luaGlobal editor defaults.
lua/traap/config/autocmds.luaFiletype and buffer lifecycle behavior.
lua/traap/config/keymaps.luaCore, plugin, LSP, and platform mappings.
lua/traap/plugins/Curated plugin specifications and customizations.
lua/traap/lsp/servers.luaFiletype-to-server registry and server overrides.
lua/traap/lsp/config.luaLSP capabilities, installation, setup, and formatting.
lua/traap/lsp/init.luaNative LSP compatibility commands.
lua/traap/core/Clipboard, notifications, platform detection, wiki helpers, and utilities.

Editor behavior

The principal defaults are two-space indentation, an 80-column text width, relative line numbers, persistent sign columns, rounded floating windows, right/below splits, no swapfile, and no line wrapping. The system clipboard is used locally; remote SSH sessions retain Neovim's internal clipboard.

Autocommands add several workflow conveniences:

  • Create missing parent directories immediately before saving.
  • Restore the last cursor location when reopening ordinary files.
  • Close help, quickfix, Fugitive, health, and similar utility windows with q.
  • Apply prose- and comment-friendly format options to supported source files.
  • Mark csv, sh, and tex buffers with vim.b.autoformat = false.
  • Reapply custom purple borders and UI highlights after colorscheme changes.

Significant plugin customizations

Snacks.nvim

Snacks is the main interface layer. Its dashboard identifies this configuration as powered by lazy.nvim; explorer, file and grep pickers, Git browsing, notifications, buffer deletion, status column, word references, toggles, image support, and Zen mode are enabled. Animation, indentation guides, scrolling, terminal, and Lazygit integrations are deliberately disabled.

The explorer and picker cooperate with tmux: <C-h>, <C-j>, <C-k>, and <C-l> leave the picker and move in the requested direction when there is no adjacent Neovim window.

Frequently used mappings include:

MappingAction
<leader>eOpen the explorer.
<leader>ff / <leader>fgFind files / Git files.
<leader>fb / <leader>frFind buffers / recent files.
<leader>sg / <leader>swGrep text / grep the word or selection.
<leader>sd / <leader>sDShow workspace / buffer diagnostics.
<leader>gb / <leader>glBrowse Git branches / log.
<leader>gBOpen the current location with Git browse.

Completion and Lua development

blink.cmp combines buffer, LSP, path, and snippet sources. It enables command line completion, friendly snippets, ghost text, signature help, automatic documentation after 500 ms, and Rust-backed fuzzy matching when available. Completion capabilities are injected into every configured LSP server.

lazydev.nvim supplies Neovim Lua runtime metadata so completion and diagnostics understand vim, plugin APIs, and the active runtime path.

Treesitter

Treesitter loads for real file buffers. Bash and regular-expression parsers are always ensured; other parsers are installed on the first corresponding FileType event. Parser setup is skipped for transient interfaces such as completion menus, help, quickfix, Lazy, Mason, Noice, notifications, LSP info, and Snacks picker buffers.

Harpoon

Harpoon 2 saves changes to its list automatically while leaving branch-specific marks and automatic UI-close synchronization disabled. Slots one through eight are selected with ;1 through ;8. Harpoon is not enabled inside VS Code.

Markdown and wiki editing

markdown-preview.nvim loads for markdown and wiki buffers and builds its web application with yarn install. Wiki and journal commands are provided by wiki.vim plus the local vim-bundle-wiki.vim customizations. Bullets and checkboxes are active for Markdown, wiki, text, scratch, and Git commit buffers; ;x toggles a checkbox.

img-clip.nvim stores pasted images beneath images/<document-name>/, prompts for the filename, URL-encodes paths, and inserts filetype-specific markup for Markdown, wiki, AsciiDoc, HTML, Org, reStructuredText, TeX, and Typst. It is disabled on Windows.

todo-comments.nvim

In addition to the standard keywords, todo-comments recognizes:

  • YouTube, Youtube, and youtube with a red YouTube icon.
  • URL, Url, and url with a purple link icon.

Keyword sets are merged with the defaults and matches are highlighted even when they appear outside comments.

Git and search

Fugitive loads on :G; Gitsigns supplies buffer signs and hunk operations, and Snacks supplies repository pickers and browser integration. grug-far.nvim provides project-wide search and replacement. Better Quickfix adds a preview window whose borders follow the configuration's purple highlight palette.

UI

TokyoNight uses its transparent night style with italic comments and keywords, transparent sidebars and floats, a hidden inactive statusline, bold Lualine, and purple borders. Noice renders the command line in a popup, sends ordinary messages through notifications, exposes long messages in a split, and filters routine editor noise. Lualine includes Git state, diagnostics, macro recording, Noice command/search status, file metadata, and cursor position. Which-key uses its modern preset with spelling suggestions.

LSP configuration and installation

The LSP stack is composed of three plugins:

  • nvim-lspconfig supplies server definitions compatible with Neovim's native LSP configuration API.
  • mason.nvim installs language-server executables in Neovim's data directory.
  • mason-lspconfig.nvim translates LSP server names into Mason packages.

Servers are installed and configured by filetype rather than eagerly at startup. On the first matching FileType event, the configuration:

  1. Looks up the server in lua/traap/lsp/servers.lua.
  2. Skips setup when that server was already handled during the session.
  3. Asks Mason to ensure the package is installed unless mason = false.
  4. Merges Blink completion capabilities and the format-on-save attachment hook with the server-specific options.
  5. Configures and enables the server through vim.lsp.config() and vim.lsp.enable(); a legacy lspconfig.setup() fallback remains available.

The first visit to a filetype may initiate a Mason installation. Open another buffer of that type or run :LspStart after installation finishes if the executable was not available when Neovim first attempted to start it.

The registry currently supports:

LanguagesServers
Bash, C/C++, C#, CSSbashls, clangd, csharp_ls, cssls
Go, HTML, Java, JSONgopls, html, jdtls, jsonls
Julia, LaTeX prose, Lua, Markdownjulials, ltex, lua_ls, marksman
Nix, Python, QML, Rubynixd, pyright, qmlls, solargraph
Rust, SQL, Svelte, TeXrust_analyzer, sqls, svelte, texlab
TOML, JavaScript/TypeScript, Vim, XML, YAML, Zigtaplo, ts_ls, vimls, lemminx, yamlls, zls

Solargraph is explicitly excluded from Mason management and is deliberately launched with:

mise exec ruby@4.0.0 -- solargraph stdio

nixd is expected to exist on PATH. If it is unavailable through the active Mason registry, its server entry should also use mason = false. The Lua server knows the complete Neovim runtime library and accepts vim and Snacks as globals. Clangd enables background indexing and clang-tidy, requests detailed completion, and suppresses automatic header insertion.

When a client supports textDocument/formatting, a buffer-local BufWritePre hook formats synchronously. The current LSP hook does not consult the vim.b.autoformat flag used elsewhere in the configuration.

Native LSP mappings are installed when a client attaches:

MappingAction
gd / gDDefinition / declaration.
gi / grImplementation / references.
K / <leader>kHover / signature help.
<leader>rnRename symbol.
<leader>caCode action.
<leader>EOpen diagnostic float.
[d / ]dPrevious / next diagnostic.
<leader>qPopulate the location list with diagnostics.

LSP maintenance commands:

CommandPurpose
:LspInfoRun :checkhealth vim.lsp.
:LspLogOpen the Neovim LSP log in a tab.
:LspStart [server...]Enable named servers, or the server for the current filetype.
:LspRestart[!] [server...]Restart named or active servers; ! force-stops clients.
:LspStop[!] [server...]Disable named or active servers; ! force-stops clients.

To add or change a language server, edit lua/traap/lsp/servers.lua. Each registry entry requires a native LSP server name and one or more filetypes. Add opts for server-specific settings or a custom command. Set mason = false when the executable is installed outside Mason.

example= {
name="example_ls",
filetypes= { "example" },
opts= {
settings= { example= { enabled=true } },
},
}

Platform behavior

Standalone Neovim receives the complete UI, completion, LSP, Treesitter, Git, Harpoon, and content-authoring stack. VS Code receives a reduced plugin list and routes selected editor actions to VS Code commands. Platform helpers also adapt clipboard behavior for SSH and Windows and allow picker navigation to cross Neovim/tmux boundaries.

Validation and maintenance

After changing the configuration, useful checks are:

nvim --headless "+Lazy! sync""+qa"
nvim --headless "+checkhealth""+qa"
stylua --check init.lua lua

Within Neovim, use :Lazy profile to inspect startup behavior, :Mason to inspect installed language servers, and :LspInfo from a source buffer to confirm that its client attached.

About

neovim configuration done with Lua.

Resources

Stars

84 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

Traap's Blazing Fast Neovim configuration.

Credits

Linux Bash Installation

resetNeovim does the following:

  1. Uses bnvim to clone or pull Neovim sources and build them.
  2. Uses "switchNeovim traap" to switch to my Neovim configuration.

Notes

  1. Backups are not done.
  2. You have been warned.

Extra credit

Try nvims to safely experiment with multiple Neovim configurations.

Overview

nvim.traap is my production Neovim configuration. It is powered by lazy.nvim, uses Neovim's native LSP client, and borrows selected conventions from LazyVim without loading the LazyVim distribution or its default plugin set.

The configuration favors deliberate lazy loading and a small startup surface. It provides a complete coding environment when launched in Neovim and a reduced integration layer when embedded in VS Code.

Requirements

  • A recent Neovim release with the native vim.lsp.config() and vim.lsp.enable() APIs.
  • Git, which bootstraps lazy.nvim and installs plugins.
  • A Nerd Font for icons used throughout the interface.
  • ripgrep for Snacks grep and todo searches.
  • Node.js and Yarn to build markdown-preview.nvim.
  • mise with Ruby 4.0.0 and Solargraph for Ruby LSP support.
  • nixd on PATH for Nix LSP support.

Language servers managed by Mason may have additional runtime requirements. Use :checkhealth, :checkhealth vim.lsp, and :Mason when diagnosing a missing tool.

Startup and package management

init.lua owns the startup sequence:

  1. Set the global and local leader to <Space>.
  2. Bootstrap lazy.nvim into Neovim's data directory when it is absent.
  3. Load the curated plugin specifications from lua/traap/plugins.
  4. Apply options, autocommands, keymaps, clipboard integration, and platform detection.
  5. Apply TokyoNight when running in standalone Neovim.

Plugins are intentionally unversioned so updates follow their current upstream branches. The automatic update checker and configuration-change notifications are disabled. lazy-lock.json records the working revisions.

Useful package commands:

CommandPurpose
:LazyOpen the plugin manager.
:Lazy syncInstall missing plugins, update plugins, and remove unused plugins.
:Lazy updateUpdate installed plugins and the lockfile.
:Lazy cleanRemove plugins no longer present in the specification.
:Lazy profileInspect startup and plugin load times.
:MasonInspect language-server installations.

Configuration layout

PathResponsibility
init.luaEntrypoint and startup ordering.
lua/traap/config/bootstrap.luaInstalls and adds lazy.nvim to the runtime path.
lua/traap/config/lazy.luaPackage-manager policy and UI.
lua/traap/config/options.luaGlobal editor defaults.
lua/traap/config/autocmds.luaFiletype and buffer lifecycle behavior.
lua/traap/config/keymaps.luaCore, plugin, LSP, and platform mappings.
lua/traap/plugins/Curated plugin specifications and customizations.
lua/traap/lsp/servers.luaFiletype-to-server registry and server overrides.
lua/traap/lsp/config.luaLSP capabilities, installation, setup, and formatting.
lua/traap/lsp/init.luaNative LSP compatibility commands.
lua/traap/core/Clipboard, notifications, platform detection, wiki helpers, and utilities.

Editor behavior

The principal defaults are two-space indentation, an 80-column text width, relative line numbers, persistent sign columns, rounded floating windows, right/below splits, no swapfile, and no line wrapping. The system clipboard is used locally; remote SSH sessions retain Neovim's internal clipboard.

Autocommands add several workflow conveniences:

  • Create missing parent directories immediately before saving.
  • Restore the last cursor location when reopening ordinary files.
  • Close help, quickfix, Fugitive, health, and similar utility windows with q.
  • Apply prose- and comment-friendly format options to supported source files.
  • Mark csv, sh, and tex buffers with vim.b.autoformat = false.
  • Reapply custom purple borders and UI highlights after colorscheme changes.

Significant plugin customizations

Snacks.nvim

Snacks is the main interface layer. Its dashboard identifies this configuration as powered by lazy.nvim; explorer, file and grep pickers, Git browsing, notifications, buffer deletion, status column, word references, toggles, image support, and Zen mode are enabled. Animation, indentation guides, scrolling, terminal, and Lazygit integrations are deliberately disabled.

The explorer and picker cooperate with tmux: <C-h>, <C-j>, <C-k>, and <C-l> leave the picker and move in the requested direction when there is no adjacent Neovim window.

Frequently used mappings include:

MappingAction
<leader>eOpen the explorer.
<leader>ff / <leader>fgFind files / Git files.
<leader>fb / <leader>frFind buffers / recent files.
<leader>sg / <leader>swGrep text / grep the word or selection.
<leader>sd / <leader>sDShow workspace / buffer diagnostics.
<leader>gb / <leader>glBrowse Git branches / log.
<leader>gBOpen the current location with Git browse.

Completion and Lua development

blink.cmp combines buffer, LSP, path, and snippet sources. It enables command line completion, friendly snippets, ghost text, signature help, automatic documentation after 500 ms, and Rust-backed fuzzy matching when available. Completion capabilities are injected into every configured LSP server.

lazydev.nvim supplies Neovim Lua runtime metadata so completion and diagnostics understand vim, plugin APIs, and the active runtime path.

Treesitter

Treesitter loads for real file buffers. Bash and regular-expression parsers are always ensured; other parsers are installed on the first corresponding FileType event. Parser setup is skipped for transient interfaces such as completion menus, help, quickfix, Lazy, Mason, Noice, notifications, LSP info, and Snacks picker buffers.

Harpoon

Harpoon 2 saves changes to its list automatically while leaving branch-specific marks and automatic UI-close synchronization disabled. Slots one through eight are selected with ;1 through ;8. Harpoon is not enabled inside VS Code.

Markdown and wiki editing

markdown-preview.nvim loads for markdown and wiki buffers and builds its web application with yarn install. Wiki and journal commands are provided by wiki.vim plus the local vim-bundle-wiki.vim customizations. Bullets and checkboxes are active for Markdown, wiki, text, scratch, and Git commit buffers; ;x toggles a checkbox.

img-clip.nvim stores pasted images beneath images/<document-name>/, prompts for the filename, URL-encodes paths, and inserts filetype-specific markup for Markdown, wiki, AsciiDoc, HTML, Org, reStructuredText, TeX, and Typst. It is disabled on Windows.

todo-comments.nvim

In addition to the standard keywords, todo-comments recognizes:

  • YouTube, Youtube, and youtube with a red YouTube icon.
  • URL, Url, and url with a purple link icon.

Keyword sets are merged with the defaults and matches are highlighted even when they appear outside comments.

Git and search

Fugitive loads on :G; Gitsigns supplies buffer signs and hunk operations, and Snacks supplies repository pickers and browser integration. grug-far.nvim provides project-wide search and replacement. Better Quickfix adds a preview window whose borders follow the configuration's purple highlight palette.

UI

TokyoNight uses its transparent night style with italic comments and keywords, transparent sidebars and floats, a hidden inactive statusline, bold Lualine, and purple borders. Noice renders the command line in a popup, sends ordinary messages through notifications, exposes long messages in a split, and filters routine editor noise. Lualine includes Git state, diagnostics, macro recording, Noice command/search status, file metadata, and cursor position. Which-key uses its modern preset with spelling suggestions.

LSP configuration and installation

The LSP stack is composed of three plugins:

  • nvim-lspconfig supplies server definitions compatible with Neovim's native LSP configuration API.
  • mason.nvim installs language-server executables in Neovim's data directory.
  • mason-lspconfig.nvim translates LSP server names into Mason packages.

Servers are installed and configured by filetype rather than eagerly at startup. On the first matching FileType event, the configuration:

  1. Looks up the server in lua/traap/lsp/servers.lua.
  2. Skips setup when that server was already handled during the session.
  3. Asks Mason to ensure the package is installed unless mason = false.
  4. Merges Blink completion capabilities and the format-on-save attachment hook with the server-specific options.
  5. Configures and enables the server through vim.lsp.config() and vim.lsp.enable(); a legacy lspconfig.setup() fallback remains available.

The first visit to a filetype may initiate a Mason installation. Open another buffer of that type or run :LspStart after installation finishes if the executable was not available when Neovim first attempted to start it.

The registry currently supports:

LanguagesServers
Bash, C/C++, C#, CSSbashls, clangd, csharp_ls, cssls
Go, HTML, Java, JSONgopls, html, jdtls, jsonls
Julia, LaTeX prose, Lua, Markdownjulials, ltex, lua_ls, marksman
Nix, Python, QML, Rubynixd, pyright, qmlls, solargraph
Rust, SQL, Svelte, TeXrust_analyzer, sqls, svelte, texlab
TOML, JavaScript/TypeScript, Vim, XML, YAML, Zigtaplo, ts_ls, vimls, lemminx, yamlls, zls

Solargraph is explicitly excluded from Mason management and is deliberately launched with:

mise exec ruby@4.0.0 -- solargraph stdio

nixd is expected to exist on PATH. If it is unavailable through the active Mason registry, its server entry should also use mason = false. The Lua server knows the complete Neovim runtime library and accepts vim and Snacks as globals. Clangd enables background indexing and clang-tidy, requests detailed completion, and suppresses automatic header insertion.

When a client supports textDocument/formatting, a buffer-local BufWritePre hook formats synchronously. The current LSP hook does not consult the vim.b.autoformat flag used elsewhere in the configuration.

Native LSP mappings are installed when a client attaches:

MappingAction
gd / gDDefinition / declaration.
gi / grImplementation / references.
K / <leader>kHover / signature help.
<leader>rnRename symbol.
<leader>caCode action.
<leader>EOpen diagnostic float.
[d / ]dPrevious / next diagnostic.
<leader>qPopulate the location list with diagnostics.

LSP maintenance commands:

CommandPurpose
:LspInfoRun :checkhealth vim.lsp.
:LspLogOpen the Neovim LSP log in a tab.
:LspStart [server...]Enable named servers, or the server for the current filetype.
:LspRestart[!] [server...]Restart named or active servers; ! force-stops clients.
:LspStop[!] [server...]Disable named or active servers; ! force-stops clients.

To add or change a language server, edit lua/traap/lsp/servers.lua. Each registry entry requires a native LSP server name and one or more filetypes. Add opts for server-specific settings or a custom command. Set mason = false when the executable is installed outside Mason.

example= {
name="example_ls",
filetypes= { "example" },
opts= {
settings= { example= { enabled=true } },
},
}

Platform behavior

Standalone Neovim receives the complete UI, completion, LSP, Treesitter, Git, Harpoon, and content-authoring stack. VS Code receives a reduced plugin list and routes selected editor actions to VS Code commands. Platform helpers also adapt clipboard behavior for SSH and Windows and allow picker navigation to cross Neovim/tmux boundaries.

Validation and maintenance

After changing the configuration, useful checks are:

nvim --headless "+Lazy! sync""+qa"
nvim --headless "+checkhealth""+qa"
stylua --check init.lua lua

Within Neovim, use :Lazy profile to inspect startup behavior, :Mason to inspect installed language servers, and :LspInfo from a source buffer to confirm that its client attached.

About

neovim configuration done with Lua.

Resources

Stars

84 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Repository files navigation

Traap's Blazing Fast Neovim configuration.

Credits

Linux Bash Installation

resetNeovim does the following:

  1. Uses bnvim to clone or pull Neovim sources and build them.
  2. Uses "switchNeovim traap" to switch to my Neovim configuration.

Notes

  1. Backups are not done.
  2. You have been warned.

Extra credit

Try nvims to safely experiment with multiple Neovim configurations.

Overview

nvim.traap is my production Neovim configuration. It is powered by lazy.nvim, uses Neovim's native LSP client, and borrows selected conventions from LazyVim without loading the LazyVim distribution or its default plugin set.

The configuration favors deliberate lazy loading and a small startup surface. It provides a complete coding environment when launched in Neovim and a reduced integration layer when embedded in VS Code.

Requirements

  • A recent Neovim release with the native vim.lsp.config() and vim.lsp.enable() APIs.
  • Git, which bootstraps lazy.nvim and installs plugins.
  • A Nerd Font for icons used throughout the interface.
  • ripgrep for Snacks grep and todo searches.
  • Node.js and Yarn to build markdown-preview.nvim.
  • mise with Ruby 4.0.0 and Solargraph for Ruby LSP support.
  • nixd on PATH for Nix LSP support.

Language servers managed by Mason may have additional runtime requirements. Use :checkhealth, :checkhealth vim.lsp, and :Mason when diagnosing a missing tool.

Startup and package management

init.lua owns the startup sequence:

  1. Set the global and local leader to <Space>.
  2. Bootstrap lazy.nvim into Neovim's data directory when it is absent.
  3. Load the curated plugin specifications from lua/traap/plugins.
  4. Apply options, autocommands, keymaps, clipboard integration, and platform detection.
  5. Apply TokyoNight when running in standalone Neovim.

Plugins are intentionally unversioned so updates follow their current upstream branches. The automatic update checker and configuration-change notifications are disabled. lazy-lock.json records the working revisions.

Useful package commands:

CommandPurpose
:LazyOpen the plugin manager.
:Lazy syncInstall missing plugins, update plugins, and remove unused plugins.
:Lazy updateUpdate installed plugins and the lockfile.
:Lazy cleanRemove plugins no longer present in the specification.
:Lazy profileInspect startup and plugin load times.
:MasonInspect language-server installations.

Configuration layout

PathResponsibility
init.luaEntrypoint and startup ordering.
lua/traap/config/bootstrap.luaInstalls and adds lazy.nvim to the runtime path.
lua/traap/config/lazy.luaPackage-manager policy and UI.
lua/traap/config/options.luaGlobal editor defaults.
lua/traap/config/autocmds.luaFiletype and buffer lifecycle behavior.
lua/traap/config/keymaps.luaCore, plugin, LSP, and platform mappings.
lua/traap/plugins/Curated plugin specifications and customizations.
lua/traap/lsp/servers.luaFiletype-to-server registry and server overrides.
lua/traap/lsp/config.luaLSP capabilities, installation, setup, and formatting.
lua/traap/lsp/init.luaNative LSP compatibility commands.
lua/traap/core/Clipboard, notifications, platform detection, wiki helpers, and utilities.

Editor behavior

The principal defaults are two-space indentation, an 80-column text width, relative line numbers, persistent sign columns, rounded floating windows, right/below splits, no swapfile, and no line wrapping. The system clipboard is used locally; remote SSH sessions retain Neovim's internal clipboard.

Autocommands add several workflow conveniences:

  • Create missing parent directories immediately before saving.
  • Restore the last cursor location when reopening ordinary files.
  • Close help, quickfix, Fugitive, health, and similar utility windows with q.
  • Apply prose- and comment-friendly format options to supported source files.
  • Mark csv, sh, and tex buffers with vim.b.autoformat = false.
  • Reapply custom purple borders and UI highlights after colorscheme changes.

Significant plugin customizations

Snacks.nvim

Snacks is the main interface layer. Its dashboard identifies this configuration as powered by lazy.nvim; explorer, file and grep pickers, Git browsing, notifications, buffer deletion, status column, word references, toggles, image support, and Zen mode are enabled. Animation, indentation guides, scrolling, terminal, and Lazygit integrations are deliberately disabled.

The explorer and picker cooperate with tmux: <C-h>, <C-j>, <C-k>, and <C-l> leave the picker and move in the requested direction when there is no adjacent Neovim window.

Frequently used mappings include:

MappingAction
<leader>eOpen the explorer.
<leader>ff / <leader>fgFind files / Git files.
<leader>fb / <leader>frFind buffers / recent files.
<leader>sg / <leader>swGrep text / grep the word or selection.
<leader>sd / <leader>sDShow workspace / buffer diagnostics.
<leader>gb / <leader>glBrowse Git branches / log.
<leader>gBOpen the current location with Git browse.

Completion and Lua development

blink.cmp combines buffer, LSP, path, and snippet sources. It enables command line completion, friendly snippets, ghost text, signature help, automatic documentation after 500 ms, and Rust-backed fuzzy matching when available. Completion capabilities are injected into every configured LSP server.

lazydev.nvim supplies Neovim Lua runtime metadata so completion and diagnostics understand vim, plugin APIs, and the active runtime path.

Treesitter

Treesitter loads for real file buffers. Bash and regular-expression parsers are always ensured; other parsers are installed on the first corresponding FileType event. Parser setup is skipped for transient interfaces such as completion menus, help, quickfix, Lazy, Mason, Noice, notifications, LSP info, and Snacks picker buffers.

Harpoon

Harpoon 2 saves changes to its list automatically while leaving branch-specific marks and automatic UI-close synchronization disabled. Slots one through eight are selected with ;1 through ;8. Harpoon is not enabled inside VS Code.

Markdown and wiki editing

markdown-preview.nvim loads for markdown and wiki buffers and builds its web application with yarn install. Wiki and journal commands are provided by wiki.vim plus the local vim-bundle-wiki.vim customizations. Bullets and checkboxes are active for Markdown, wiki, text, scratch, and Git commit buffers; ;x toggles a checkbox.

img-clip.nvim stores pasted images beneath images/<document-name>/, prompts for the filename, URL-encodes paths, and inserts filetype-specific markup for Markdown, wiki, AsciiDoc, HTML, Org, reStructuredText, TeX, and Typst. It is disabled on Windows.

todo-comments.nvim

In addition to the standard keywords, todo-comments recognizes:

  • YouTube, Youtube, and youtube with a red YouTube icon.
  • URL, Url, and url with a purple link icon.

Keyword sets are merged with the defaults and matches are highlighted even when they appear outside comments.

Git and search

Fugitive loads on :G; Gitsigns supplies buffer signs and hunk operations, and Snacks supplies repository pickers and browser integration. grug-far.nvim provides project-wide search and replacement. Better Quickfix adds a preview window whose borders follow the configuration's purple highlight palette.

UI

TokyoNight uses its transparent night style with italic comments and keywords, transparent sidebars and floats, a hidden inactive statusline, bold Lualine, and purple borders. Noice renders the command line in a popup, sends ordinary messages through notifications, exposes long messages in a split, and filters routine editor noise. Lualine includes Git state, diagnostics, macro recording, Noice command/search status, file metadata, and cursor position. Which-key uses its modern preset with spelling suggestions.

LSP configuration and installation

The LSP stack is composed of three plugins:

  • nvim-lspconfig supplies server definitions compatible with Neovim's native LSP configuration API.
  • mason.nvim installs language-server executables in Neovim's data directory.
  • mason-lspconfig.nvim translates LSP server names into Mason packages.

Servers are installed and configured by filetype rather than eagerly at startup. On the first matching FileType event, the configuration:

  1. Looks up the server in lua/traap/lsp/servers.lua.
  2. Skips setup when that server was already handled during the session.
  3. Asks Mason to ensure the package is installed unless mason = false.
  4. Merges Blink completion capabilities and the format-on-save attachment hook with the server-specific options.
  5. Configures and enables the server through vim.lsp.config() and vim.lsp.enable(); a legacy lspconfig.setup() fallback remains available.

The first visit to a filetype may initiate a Mason installation. Open another buffer of that type or run :LspStart after installation finishes if the executable was not available when Neovim first attempted to start it.

The registry currently supports:

LanguagesServers
Bash, C/C++, C#, CSSbashls, clangd, csharp_ls, cssls
Go, HTML, Java, JSONgopls, html, jdtls, jsonls
Julia, LaTeX prose, Lua, Markdownjulials, ltex, lua_ls, marksman
Nix, Python, QML, Rubynixd, pyright, qmlls, solargraph
Rust, SQL, Svelte, TeXrust_analyzer, sqls, svelte, texlab
TOML, JavaScript/TypeScript, Vim, XML, YAML, Zigtaplo, ts_ls, vimls, lemminx, yamlls, zls

Solargraph is explicitly excluded from Mason management and is deliberately launched with:

mise exec ruby@4.0.0 -- solargraph stdio

nixd is expected to exist on PATH. If it is unavailable through the active Mason registry, its server entry should also use mason = false. The Lua server knows the complete Neovim runtime library and accepts vim and Snacks as globals. Clangd enables background indexing and clang-tidy, requests detailed completion, and suppresses automatic header insertion.

When a client supports textDocument/formatting, a buffer-local BufWritePre hook formats synchronously. The current LSP hook does not consult the vim.b.autoformat flag used elsewhere in the configuration.

Native LSP mappings are installed when a client attaches:

MappingAction
gd / gDDefinition / declaration.
gi / grImplementation / references.
K / <leader>kHover / signature help.
<leader>rnRename symbol.
<leader>caCode action.
<leader>EOpen diagnostic float.
[d / ]dPrevious / next diagnostic.
<leader>qPopulate the location list with diagnostics.

LSP maintenance commands:

CommandPurpose
:LspInfoRun :checkhealth vim.lsp.
:LspLogOpen the Neovim LSP log in a tab.
:LspStart [server...]Enable named servers, or the server for the current filetype.
:LspRestart[!] [server...]Restart named or active servers; ! force-stops clients.
:LspStop[!] [server...]Disable named or active servers; ! force-stops clients.

To add or change a language server, edit lua/traap/lsp/servers.lua. Each registry entry requires a native LSP server name and one or more filetypes. Add opts for server-specific settings or a custom command. Set mason = false when the executable is installed outside Mason.

example= {
name="example_ls",
filetypes= { "example" },
opts= {
settings= { example= { enabled=true } },
},
}

Platform behavior

Standalone Neovim receives the complete UI, completion, LSP, Treesitter, Git, Harpoon, and content-authoring stack. VS Code receives a reduced plugin list and routes selected editor actions to VS Code commands. Platform helpers also adapt clipboard behavior for SSH and Windows and allow picker navigation to cross Neovim/tmux boundaries.

Validation and maintenance

After changing the configuration, useful checks are:

nvim --headless "+Lazy! sync""+qa"
nvim --headless "+checkhealth""+qa"
stylua --check init.lua lua

Within Neovim, use :Lazy profile to inspect startup behavior, :Mason to inspect installed language servers, and :LspInfo from a source buffer to confirm that its client attached.

About

neovim configuration done with Lua.

Resources

Stars

84 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages