MiniMax configs
Generated from the main branch of ‘MiniMax’
MiniMax reference configs
The most appropriate one based on Neovim version is chosen during initial config generation.
Available:
nvim-0.10- for Neovim>=0.10nvim-0.11- for Neovim>=0.11nvim-0.12- for Neovim>=0.12 (currently under development)
Differences between selected configs:
Structure
init.lua
Initial file executed first during startup.
nvim-pack-lock.json (for Neovim>=0.12)
Lockfile for vim.pack (built-in plugin manager) that contains information about all installed plugins. Provided to install necessary plugins during initial setting up at revisions that were tested to work in MiniMax.
It is updated automatically whenever installed plugins change: their state on disk is updated, their tracked version is changed, they are deleted, etc. Do not delete and do not edit by hand.
See :h vim.pack-lockfile for more information about the lockfile and :h vim.pack about the plugin manager in general.
plugin/
Files automatically executed in alphabetical order during startup:
10_options.lua- built-in Neovim behavior.20_keymaps.lua- custom mappings, mostly for the:h <Leader>key.30_mini.lua- MINI configuration.40_plugins.lua- plugins outside of MINI.
Many configurations prefer to use the ‘lua/’ directory with explicit require() calls to modularize their config. It is okay to use, but has a drawback that it occupies ‘lua’ namespace. As it is shared across all plugins, it might lead to conflicts during require(). Usually solved by having config files inside a dedicated “user” directory like ‘lua/username’.
The ‘plugin/’ approach doesn’t have this issue. It also doesn’t need explicit require() calls inside ‘init.lua’ for files to be executed.
For more details about this approach, see :h load-plugins. In particular: - Subdirectories are allowed. Their files are also sourced in alphabetical order. - ‘plugin/’ files still get executed if Neovim is started with nvim -u path/to/file. Make sure to also pass --noplugin or use :h $NVIM_APPNAME approach.
snippets/
User defined snippets. Contains a single ‘global.json’ file as a demo (used in the ‘mini.snippets’ setup).
after/
Files for overriding behavior added by plugins. Usually located inside special subdirectories like ‘ftplugin/’ (see :h 'runtimepath'). Files from this directory take effect after similar files provided by plugins.
For demonstration purposes, it contains examples of common ways to use ‘after/’.
after/ftplugin/
Filetype plugins. Contains files that are sourced when :h 'filetype' option is set.
For example, ‘*.txt’ files have text filetype, so ‘ftplugin/text.lua’ is sourced when ‘*.txt’ file is opened. It defines behavior that should exist only in text files.
after/lsp/ (for Neovim>=0.11)
Files that configure LSP servers. These are used by Neovim’s built-in :h vim.lsp.config() and :h vim.lsp.enable(). See also :h lsp-quickstart for more details.
For example, the ‘lsp/lua_ls.lua’ file defines part of configuration that will be used during vim.lsp.enable({ 'lua_ls' }) (i.e. with the same name).
after/snippets/
Files containing snippet definition per language. Used by ‘mini.snippets’. As they are located in ‘after/’, they override any snippets provided by plugins (like ‘rafamadriz/friendly-snippets’).
For example, based on ‘snippets/lua.json’, typing l + <C-j> in Insert mode inside Lua files will always insert local $1 = $0 snippet. No matter if any other snippet provider contains this or conflicting snippet.