DEV Community

NACAMURA Mitsuhiro
NACAMURA Mitsuhiro

Posted on • Originally published at m15a.dev

Housekeeping My Neovim Configuration

The End of Stagnation

I used to be a passionate tinkerer when it came to Vim/Neovim configuration. Lately, however, that passion has cooled. The last time I significantly touched my config was back in January of this year. Since then, I've been using Neovim daily without making any fixes or updates.

After nearly a year of stagnation, I happened to update the lock file of my configuration, which is managed using Nix. This triggered a realization: it was time to clear out the accumulating deprecation warnings and modernize my setup to keep up with the evolving Neovim scene. Here is a log of my "Spring Cleaning" in December.


Updates & Migrations

Addressing :checkhealth Warnings

For a while (before updating the lock file), I had been ignoring a persistent warning in my :messages regarding the usage of the obsolete vim.fn.sign_define function:

- ⚠️ WARNING Defining diagnostic signs with :sign-define or sign_define() is deprecated. Feature will be removed in Nvim 0.12
  - ADVICE:
    - use vim.diagnostic.config() instead.
Enter fullscreen mode Exit fullscreen mode

I finally decided to stop ignoring it. After reading :h diagnostic-signs, I refactored the code to use the modern vim.diagnostic.config API:

diff --git a/lua/m15a/plugins/lspconfig/init.lua b/lua/m15a/plugins/lspconfig/init.lua
index 3cfbd2124d..8644fedc68 100644
--- a/lua/m15a/plugins/lspconfig/init.lua
+++ b/lua/m15a/plugins/lspconfig/init.lua
@@ -97,12 +97,19 @@
 end

 local function setup_diagnostic_signs()
-   -- Change diagnostic signs in the gutter:
-   -- https://github.com/neovim/nvim-lspconfig/wiki/UI-Customization#change-diagnostic-symbols-in-the-sign-column-gutter
+   local signs = {
+      text = {},
+      texthl = {},
+      numhl = {},
+   }
    for type, text in pairs(assets.fonts.diagnostic) do
+      local severity = vim.diagnostic.severity[type:gsub('^%l+', string.upper)]
       local hl = 'DiagnosticSign' .. type:gsub('^%l', string.upper)
-      vim.fn.sign_define(hl, { text = text, texthl = hl, numhl = hl })
+      signs.text[severity] = text
+      signs.texthl[severity] = hl
+      signs.numhl[severity] = hl
    end
+   vim.diagnostic.config { signs = signs }
 end

 function M.setup()
Enter fullscreen mode Exit fullscreen mode

Modernizing nvim-lspconfig

The "framework" API of nvim-lspconfig was deprecated (Sep 18, 2025), now that Neovim supports vim.lsp.config (as of Dec 11, 2024). To align with this shift, I updated the legacy API calls in my config:

  1. Replaced require("lspconfig") with vim.lsp.config.
  2. Updated the server setup logic.
  3. Ensured servers are explicitly enabled.
diff --git a/lua/m15a/plugins/lspconfig/init.lua b/lua/m15a/plugins/lspconfig/init.lua
index a6f8dbbfce..d99c110643 100644
--- a/lua/m15a/plugins/lspconfig/init.lua
+++ b/lua/m15a/plugins/lspconfig/init.lua
@@ -1,6 +1,5 @@
 local namespace = ...

-local lspconfig = require 'lspconfig'
 local tbuiltin = require 'telescope.builtin'
 local assets = require 'm15a.assets'
 local keymap = require 'm15a.keymap'
@@ -27,7 +26,8 @@
 local function setup_servers()
    for server, cmd in pairs(servers) do
       if vim.fn.executable(cmd) > 0 then
-         lspconfig[server].setup(require_server_config(server))
+         vim.lsp.config(server, require_server_config(server))
+         vim.lsp.enable(server)
       end
    end
 end
Enter fullscreen mode Exit fullscreen mode

Optimizing telescope.nvim Keybindings

I reconsidered my historical Telescope key mappings to improve ergonomics. Previously, opening a picker required three keystrokes (e.g., <Leader>ef, <Leader>eg, etc.), as configured below:

vim.api.nvim_set_keymap("", "[telescope]", "<Nop>", { noremap = true })
vim.api.nvim_set_keymap("", "<Leader>e", "[telescope]", {})
vim.keymap.set("n", "[telescope]f", require("telescope.builtin").find_files)
Enter fullscreen mode Exit fullscreen mode

I have now reduced this to just two keystrokes: <Leader>f, <Leader>g, etc. It feels much faster and more direct.

Pruning nvim-treesitter-textobjects

This plugin offers a massive number of syntax textobjects. In the past, I blindly mapped almost all of them. However, in practice, I only use a handful. I decided to keep only the essentials:

         keymaps = {
            ["ik"] = "@class.inner",
            ["ak"] = "@class.outer",
            ["ic"] = "@comment.inner",
            ["ac"] = "@comment.outer",
            ["im"] = "@function.inner",
            ["am"] = "@function.outer",
            ["ia"] = "@parameter.inner",
            ["aa"] = "@parameter.outer",
         },
Enter fullscreen mode Exit fullscreen mode

Replacing feline.nvim

The repository freddiehaddad/feline.nvim—a previously maintained fork of the original feline.nvim—was deleted. I was a fan of this
minimalist statusline framework, but with the repo gone, migration was necessary. I decided to switch to lualine.nvim, which is another minimal (and widely-adopted) statusline plugin.

Sticking with dressing.nvim

The dressing.nvim repository has been archived. I read the issue where the author explains the decision:

[F]olke came out with snacks.nvim and it contains both a fuzzy
vim.ui.select implementation and a good vim.ui.input. Now, at long
last, I can say that this plugin has outlived its usefulness and
retire it.

I looked at the suggested successor, snacks.nvim. However, it comes with far more features than I need. I prefer a simpler plugin for this functionality. For now, I have decided to keep using the archived dressing.nvim until a more focused alternative appears.

Migrating to lastplace.nvim

I migrated from nvim-lastplace to lastplace.nvim. Although I knew the nvim-lastplace repository had been archived for a while, I kept using it simply because it worked. This update brings me back to a maintained version.

Removals

markview.nvim

I decided to remove markview.nvim. I realized that I dislike heavily concealed text. The dynamic width changes that occur when switching between normal and insert modes were becoming visually distracting.

gitsigns.nvim

I removed gitsigns.nvim in favor of Jujutsu, which I have recently started using as my Git frontend.

Additions

nvim-ts-autotag

I had overlooked it previously, but it is incredibly helpful when editing HTML.

nvim-origami

I have seldom used folding and its plugins. My preference has been that code should be split into small enough files so that folding becomes unnecessary.

However, I realized that for certain tasks—specifically scripts for deploying to pipeline orchestrators that prohibit external packaging—I am often forced to put many modules into a single script file. In these cases, folding helps me. I decided to introduce nvim-origami to handle this.


Next Time?

It took about a week of spare time to finish this configuration overhaul. My next major update will likely happen after nvim-treesitter releases its main branch, as that is expected to bring several breaking changes.

Top comments (0)