Something went wrong. Try again.
Personal Neovim configuration
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198---- Copyright (c) 2026 Jan Fooken---- 40_packages.lua---- Add custom packages or plugins to enhance and customize Neovim's behaviour.---- For an overview of the preloaded plugins, see |plugins| (type :help-- plugins). For information on how packages are loaded, see |packages| (type-- :help packages) and |initialization| (type :help initialization).---- For information on how to use external plugins via the built-in plugin-- manager refer to the Lua module |vim.pack| (type :help vim.pack).--local pack = vim.pack
pack.add { 'https://github.com/neovim/nvim-lspconfig', 'https://github.com/nvim-mini/mini.align', 'https://github.com/nvim-mini/mini.completion', 'https://github.com/nvim-mini/mini.hipatterns', 'https://github.com/nvim-mini/mini.hues', 'https://github.com/nvim-mini/mini.icons', 'https://github.com/nvim-mini/mini.misc', 'https://github.com/nvim-mini/mini.pick', 'https://github.com/nvim-mini/mini.statusline', 'https://github.com/nvim-mini/mini.tabline', 'https://github.com/nvim-mini/mini.trailspace',}
-- Color Scheme ================================================================
do -- Use minisummer as color scheme, because it has a big plugin integration. -- Try miniwinter, minispring. minisummer, miniautumn or the "default" scheme. -- If you're feeling lucky, try randomhue. vim.cmd.colorscheme 'minisummer'end
-- Editing =====================================================================
do -- In Normal or Visual mode type `ga` (or `gA` to show preview) to trigger the -- interactive alignment assistant. See |MiniAlign| for information on how to -- use this plugin. This mapping overrides the builtin |ga| key mapping. require('mini.align').setup()end
do -- Configure the builtin LSP |lsp-quickstart| and autocomplete via -- |mini.completion|. Predefined server settings come from the nvim-lspconfig -- plugin, but can be overridden and merged via an |after-directory|. See -- |lsp-config-merge|. For information on default mappings, refer to -- |lsp-defaults| and |mini.completion|. require('mini.completion').setup({})
-- Enable Go language support vim.lsp.enable 'gopls'
-- Enable Python language support vim.lsp.enable 'pyright'end
-- Search ======================================================================
do -- Minimal fuzzy finder for a lot of things. There are a dozen more fuzzy -- finders: fzf, telescope and grug-far are the most popular. For more -- information on this one, look at |mini.pick|. require('mini.pick').setup()
-- Search the word under the cursor, analog to |*|. vim.keymap.set( 'n', '<Leader>*', '<Cmd>Pick grep pattern="<cword>"<CR>', { desc = 'Find word' } )
-- Search for a grep pattern, analog to |/|, but doesn't have the same -- semantics. vim.keymap.set( 'n', '<Leader>/', '<Cmd>Pick grep_live<CR>', { desc = 'Find pattern' } )
-- Search for files. The mapping `<Leader>ff` is quick to type and easy to -- remember. Just think [F]ind [F]iles. vim.keymap.set( 'n', '<Leader>ff', '<Cmd>Pick files<CR>', { desc = 'Find files' } )end
-- UI ==========================================================================
do -- Highlight special words. See |mini.hipatterns|. local hipatterns = require 'mini.hipatterns' hipatterns.setup { highlighters = { -- Highlight standalone FIXME, HACK, NOTE and TODO fixme = { pattern = { '%f[%w]()FIXME()%f[%W]', '%f[%w]()Fixme()%f[%W]', '%f[%w]()fixme()%f[%W]', }, group = 'MiniHipatternsFixme', }, hack = { pattern = { '%f[%w]()HACK()%f[%W]', '%f[%w]()Hack()%f[%W]', '%f[%w]()hack()%f[%W]', }, group = 'MiniHipatternsHack', }, note = { pattern = { '%f[%w]()NOTE()%f[%W]', '%f[%w]()Note()%f[%W]', '%f[%w]()note()%f[%W]', }, group = 'MiniHipatternsNote', }, todo = { pattern = { '%f[%w]()TODO()%f[%W]', '%f[%w]()Todo()%f[%W]', '%f[%w]()todo()%f[%W]', }, group = 'MiniHipatternsTodo', },
-- Highlight hex color strings like #rrggbb using that corresponding color hex_color = hipatterns.gen_highlighter.hex_color(), }, }end
do -- An icon provider for LSP, statusline, tabline and co. Also accessible via -- the global variable MiniIcons. See |mini.icons|. local mini_icons = require 'mini.icons' mini_icons.setup()
-- Add support for plugins that don't support |mini.icons|. mini_icons.mock_nvim_web_devicons()
-- Add icons to LSP completion items. Adds significantly to startup time. mini_icons.tweak_lsp_kind()end
do -- A fancy statusline with optional Git and diff related information. -- Optional features require mini.git or gitsigns.nvim, or mini.diff. See -- |mini.statusline| and the following URLs for more information: -- - https://nvim-mini.org/mini.nvim/readmes/mini-git -- - https://github.com/lewis6991/gitsigns.nvim -- - https://nvim-mini.org/mini.nvim/readmes/mini-diff require('mini.statusline').setup()end
do -- Display a tabline for easier management of open buffers and showing their -- modification state. See |mini.tabline|, |]b|, |[b|, |]B| and |[B|. require('mini.tabline').setup()end
do -- Highlight trailing whitespace in Normal buffers. See |mini.trailspace|. require('mini.trailspace').setup()end
-- Miscellaneous ===============================================================
do local misc = require 'mini.misc' misc.setup()
local opts = {} if vim.env.TERM_PROGRAM == 'Apple_Terminal' then -- On Terminal.app, an explicit reset is required, because the terminal -- doesn't seem to support the OSC 111 control sequence, so it doesn't reset -- the background to its default value. opts['explicit_reset'] = true end
-- Synchronize the background of the terminal emulator to remove the -- discoloration around Neovim. misc.setup_termbg_sync(opts)end