From 64ff5eb6a3bef470a396289f604f42c192bd2fcc Mon Sep 17 00:00:00 2001 From: Geoff Cheshire Date: Sun, 10 May 2026 13:49:52 -0400 Subject: [PATCH] refactor: complete whipsmart.nvim rebrand and architecture cleanup - Rename lua/kickstart/ -> lua/whipsmart/ (health check, opt-in extras) - Replace doc/kickstart.txt with doc/whipsmart.txt; regenerate help tags - Rename all kickstart-* augroups to whipsmart-* in lsp.lua and telescope.lua - Fix missed kickstart-lsp-highlight reference in nvim_clear_autocmds - Wire up custom/plugins loading (was silently never called) - Replace implicit glob plugin loader with explicit ordered list in init.lua - Remove dead mason-lspconfig dependency (unused with 0.12 native LSP) - Simplify format.lua format_on_save to a clear user-editable ft table Co-Authored-By: Claude Sonnet 4.6 --- doc/kickstart.txt | 24 ----------------- doc/tags | 6 ++--- doc/whipsmart.txt | 26 +++++++++++++++++++ init.lua | 20 +++++++++----- lua/custom/plugins/init.lua | 2 +- lua/plugins/format.lua | 11 ++++---- lua/plugins/lsp.lua | 9 +++---- lua/plugins/telescope.lua | 2 +- lua/{kickstart => whipsmart}/health.lua | 3 ++- .../plugins/autopairs.lua | 0 .../plugins/debug.lua | 0 .../plugins/gitsigns.lua | 0 .../plugins/indent_line.lua | 0 lua/{kickstart => whipsmart}/plugins/lint.lua | 0 .../plugins/neo-tree.lua | 0 15 files changed, 57 insertions(+), 46 deletions(-) delete mode 100644 doc/kickstart.txt create mode 100644 doc/whipsmart.txt rename lua/{kickstart => whipsmart}/health.lua (95%) rename lua/{kickstart => whipsmart}/plugins/autopairs.lua (100%) rename lua/{kickstart => whipsmart}/plugins/debug.lua (100%) rename lua/{kickstart => whipsmart}/plugins/gitsigns.lua (100%) rename lua/{kickstart => whipsmart}/plugins/indent_line.lua (100%) rename lua/{kickstart => whipsmart}/plugins/lint.lua (100%) rename lua/{kickstart => whipsmart}/plugins/neo-tree.lua (100%) diff --git a/doc/kickstart.txt b/doc/kickstart.txt deleted file mode 100644 index cb87ac3f..00000000 --- a/doc/kickstart.txt +++ /dev/null @@ -1,24 +0,0 @@ -================================================================================ -INTRODUCTION *kickstart.nvim* - -Kickstart.nvim is a project to help you get started on your neovim journey. - - *kickstart-is-not* -It is not: -- Complete framework for every plugin under the sun -- Place to add every plugin that could ever be useful - - *kickstart-is* -It is: -- Somewhere that has a good start for the most common "IDE" type features: - - autocompletion - - goto-definition - - find references - - fuzzy finding - - and hinting at what more can be done :) -- A place to _kickstart_ your journey. - - You should fork this project and use/modify it so that it matches your - style and preferences. If you don't want to do that, there are probably - other projects that would fit much better for you (and that's great!)! - - vim:tw=78:ts=8:ft=help:norl: diff --git a/doc/tags b/doc/tags index 687ae772..f534a667 100644 --- a/doc/tags +++ b/doc/tags @@ -1,3 +1,3 @@ -kickstart-is kickstart.txt /*kickstart-is* -kickstart-is-not kickstart.txt /*kickstart-is-not* -kickstart.nvim kickstart.txt /*kickstart.nvim* +whipsmart-is whipsmart.txt /*whipsmart-is* +whipsmart-is-not whipsmart.txt /*whipsmart-is-not* +whipsmart.nvim whipsmart.txt /*whipsmart.nvim* diff --git a/doc/whipsmart.txt b/doc/whipsmart.txt new file mode 100644 index 00000000..9a0ce8d2 --- /dev/null +++ b/doc/whipsmart.txt @@ -0,0 +1,26 @@ +================================================================================ +INTRODUCTION *whipsmart.nvim* + +Whipsmart.nvim is a modular, native-first Neovim configuration built on the +Neovim 0.12+ `vim.pack` system. It evolved from kickstart.nvim into a +machine-aware, reproducible starting point. + + *whipsmart-is-not* +It is not: +- A complete framework bundling every plugin under the sun +- A distro you passively consume + + *whipsmart-is* +It is: +- A clean, well-documented foundation with the most common IDE features: + - autocompletion (blink.cmp + LuaSnip) + - LSP with Mason tooling + - goto-definition, references, fuzzy finding (Telescope) + - syntax highlighting (nvim-treesitter) + - git integration (gitsigns) +- A place to build your own config from, with a modular structure you can + extend in lua/custom/plugins/ without merge conflicts. + +Run `:checkhealth whipsmart` to verify your environment is set up correctly. + + vim:tw=78:ts=8:ft=help:norl: diff --git a/init.lua b/init.lua index 1f727039..6bfb41ad 100644 --- a/init.lua +++ b/init.lua @@ -148,13 +148,21 @@ do end, }) - -- Load all modules in lua/plugins/ - local plugin_dir = vim.fn.stdpath('config') .. '/lua/plugins' - local files = vim.fn.globpath(plugin_dir, '*.lua', false, true) - for _, file in ipairs(files) do - local module_name = 'plugins.' .. vim.fn.fnamemodify(file, ':t:r') - require(module_name) + -- Load plugin modules in explicit order + for _, mod in ipairs { + 'plugins.pack_manager', + 'plugins.core_ui', + 'plugins.telescope', + 'plugins.lsp', + 'plugins.cmp', + 'plugins.treesitter', + 'plugins.format', + } do + require(mod) end + + -- Load user custom plugins from lua/custom/plugins/ + require 'custom.plugins' end -- vim: ts=2 sts=2 sw=2 et diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index c05db465..4b3701b5 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -1,7 +1,7 @@ -- You can add your own plugins here or in other files in this directory! -- I promise not to create any merge conflicts in this directory :) -- --- See the kickstart.nvim README for more information +-- See the whipsmart.nvim README for more information -- Iterate over all Lua files in the plugins directory and load them local plugins_dir = vim.fs.joinpath(vim.fn.stdpath 'config', 'lua', 'custom', 'plugins') diff --git a/lua/plugins/format.lua b/lua/plugins/format.lua index 04738e1a..26b67d01 100644 --- a/lua/plugins/format.lua +++ b/lua/plugins/format.lua @@ -6,14 +6,15 @@ local function gh(repo) return 'https://github.com/' .. repo end -- ============================================================ vim.pack.add { gh 'stevearc/conform.nvim' } + +-- Add filetypes here to enable format-on-save for them, e.g. lua = true +local fmt_on_save_fts = {} + require('conform').setup { notify_on_error = false, format_on_save = function(bufnr) - local enabled_filetypes = {} - if enabled_filetypes[vim.bo[bufnr].filetype] then - return { timeout_ms = 500 } - else - return nil + if fmt_on_save_fts[vim.bo[bufnr].filetype] then + return { timeout_ms = 500, lsp_format = 'fallback' } end end, default_format_opts = { lsp_format = 'fallback' }, diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index e440f951..328b082d 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -9,7 +9,7 @@ vim.pack.add { gh 'j-hui/fidget.nvim' } require('fidget').setup {} vim.api.nvim_create_autocmd('LspAttach', { - group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }), + group = vim.api.nvim_create_augroup('whipsmart-lsp-attach', { clear = true }), callback = function(event) local map = function(keys, func, desc, mode) mode = mode or 'n' @@ -22,7 +22,7 @@ vim.api.nvim_create_autocmd('LspAttach', { local client = vim.lsp.get_client_by_id(event.data.client_id) if client and client:supports_method('textDocument/documentHighlight', event.buf) then - local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false }) + local highlight_augroup = vim.api.nvim_create_augroup('whipsmart-lsp-highlight', { clear = false }) vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, { buffer = event.buf, group = highlight_augroup, @@ -34,10 +34,10 @@ vim.api.nvim_create_autocmd('LspAttach', { callback = vim.lsp.buf.clear_references, }) vim.api.nvim_create_autocmd('LspDetach', { - group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }), + group = vim.api.nvim_create_augroup('whipsmart-lsp-detach', { clear = true }), callback = function(event2) vim.lsp.buf.clear_references() - vim.api.nvim_clear_autocmds { group = 'kickstart-lsp-highlight', buffer = event2.buf } + vim.api.nvim_clear_autocmds { group = 'whipsmart-lsp-highlight', buffer = event2.buf } end, }) end @@ -75,7 +75,6 @@ local servers = { vim.pack.add { gh 'neovim/nvim-lspconfig', gh 'mason-org/mason.nvim', - gh 'mason-org/mason-lspconfig.nvim', gh 'WhoIsSethDaniel/mason-tool-installer.nvim', } diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 75e2a326..f82ed971 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -37,7 +37,7 @@ vim.keymap.set('n', 'sc', builtin.commands, { desc = '[S]earch [C]ommand vim.keymap.set('n', '', builtin.buffers, { desc = '[ ] Find existing buffers' }) vim.api.nvim_create_autocmd('LspAttach', { - group = vim.api.nvim_create_augroup('telescope-lsp-attach', { clear = true }), + group = vim.api.nvim_create_augroup('whipsmart-telescope-lsp-attach', { clear = true }), callback = function(event) local buf = event.buf vim.keymap.set('n', 'grr', builtin.lsp_references, { buffer = buf, desc = '[G]oto [R]eferences' }) diff --git a/lua/kickstart/health.lua b/lua/whipsmart/health.lua similarity index 95% rename from lua/kickstart/health.lua rename to lua/whipsmart/health.lua index 99102381..56bb7bb1 100644 --- a/lua/kickstart/health.lua +++ b/lua/whipsmart/health.lua @@ -2,6 +2,7 @@ -- -- This file is not required for your own configuration, -- but helps people determine if their system is setup correctly. +-- Run :checkhealth whipsmart to use it. -- --]] @@ -35,7 +36,7 @@ end return { check = function() - vim.health.start 'kickstart.nvim' + vim.health.start 'whipsmart.nvim' vim.health.info [[NOTE: Not every warning is a 'must-fix' in `:checkhealth` diff --git a/lua/kickstart/plugins/autopairs.lua b/lua/whipsmart/plugins/autopairs.lua similarity index 100% rename from lua/kickstart/plugins/autopairs.lua rename to lua/whipsmart/plugins/autopairs.lua diff --git a/lua/kickstart/plugins/debug.lua b/lua/whipsmart/plugins/debug.lua similarity index 100% rename from lua/kickstart/plugins/debug.lua rename to lua/whipsmart/plugins/debug.lua diff --git a/lua/kickstart/plugins/gitsigns.lua b/lua/whipsmart/plugins/gitsigns.lua similarity index 100% rename from lua/kickstart/plugins/gitsigns.lua rename to lua/whipsmart/plugins/gitsigns.lua diff --git a/lua/kickstart/plugins/indent_line.lua b/lua/whipsmart/plugins/indent_line.lua similarity index 100% rename from lua/kickstart/plugins/indent_line.lua rename to lua/whipsmart/plugins/indent_line.lua diff --git a/lua/kickstart/plugins/lint.lua b/lua/whipsmart/plugins/lint.lua similarity index 100% rename from lua/kickstart/plugins/lint.lua rename to lua/whipsmart/plugins/lint.lua diff --git a/lua/kickstart/plugins/neo-tree.lua b/lua/whipsmart/plugins/neo-tree.lua similarity index 100% rename from lua/kickstart/plugins/neo-tree.lua rename to lua/whipsmart/plugins/neo-tree.lua