Skip to content

Commit f806f51

Browse files
committed
feat(minimax): sync to 3f677bb
1 parent 686e2d2 commit f806f51

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

MiniMax/CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
_Generated from the `main` branch of 'MiniMax'_
22

3+
## 2026-02-10 {#2026-02-10}
4+
5+
- Update using global variable for config as just `Config` and not `_G.Config`. This is more concise and makes it more consistent with how `MiniXxx` variables are used.
6+
37
## 2026-01-29 {#2026-01-29}
48

59
- Update 'mini.completion' setup to use `now_if_args` instead of `later`. Otherwise it doesn't set proper omnifunc for files opened during startup (because necessary `LspAttach` events are already triggered).
@@ -39,7 +43,7 @@ _Generated from the `main` branch of 'MiniMax'_
3943

4044
## 2025-10-16 {#2025-10-16}
4145

42-
- Move `now_if_args` startup helper to 'init.lua' as `_G.Config.now_if_args` to be directly usable from other config files.
46+
- Move `now_if_args` startup helper to 'init.lua' as `Config.now_if_args` to be directly usable from other config files.
4347

4448
- Enable 'mini.misc' behind `now_if_args` instead of `now`. Otherwise `setup_auto_root()` and `setup_restore_cursor()` don't work on initial file(s) if Neovim is started as `nvim -- path/to/file`.
4549

MiniMax/configs/nvim-0.11/index.qmd

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ end
7979
require('mini.deps').setup()
8080

8181
-- Define config table to be able to pass data between scripts
82+
-- It is a global variable which can be use both as `_G.Config` and `Config`
8283
_G.Config = {}
8384

8485
-- Define custom autocommand group and helper to create an autocommand.
@@ -90,14 +91,14 @@ _G.Config = {}
9091
-- - `:h nvim_create_augroup()`
9192
-- - `:h nvim_create_autocmd()`
9293
local gr = vim.api.nvim_create_augroup('custom-config', {})
93-
_G.Config.new_autocmd = function(event, pattern, callback, desc)
94+
Config.new_autocmd = function(event, pattern, callback, desc)
9495
local opts = { group = gr, pattern = pattern, callback = callback, desc = desc }
9596
vim.api.nvim_create_autocmd(event, opts)
9697
end
9798

9899
-- Some plugins and 'mini.nvim' modules only need setup during startup if Neovim
99100
-- is started like `nvim -- path/to/file`, otherwise delaying setup is fine
100-
_G.Config.now_if_args = vim.fn.argc(-1) > 0 and MiniDeps.now or MiniDeps.later
101+
Config.now_if_args = vim.fn.argc(-1) > 0 and MiniDeps.now or MiniDeps.later
101102
```
102103

103104
</details>
@@ -199,7 +200,7 @@ vim.o.completeopt = 'menuone,noselect,fuzzy,nosort' -- Use custom behavior
199200
-- Don't auto-wrap comments and don't insert comment leader after hitting 'o'.
200201
-- Do on `FileType` to always override these changes from filetype plugins.
201202
local f = function() vim.cmd('setlocal formatoptions-=c formatoptions-=o') end
202-
_G.Config.new_autocmd('FileType', nil, f, "Proper 'formatoptions'")
203+
Config.new_autocmd('FileType', nil, f, "Proper 'formatoptions'")
203204

204205
-- There are other autocommands created by 'mini.basics'. See 'plugin/30_mini.lua'.
205206

@@ -289,7 +290,7 @@ nmap(']p', '<Cmd>exe "put " . v:register<CR>', 'Paste Below')
289290
-- Create a global table with information about Leader groups in certain modes.
290291
-- This is used to provide 'mini.clue' with extra clues.
291292
-- Add an entry if you create a new group.
292-
_G.Config.leader_group_clues = {
293+
Config.leader_group_clues = {
293294
{ mode = 'n', keys = '<Leader>b', desc = '+Buffer' },
294295
{ mode = 'n', keys = '<Leader>e', desc = '+Explore/Edit' },
295296
{ mode = 'n', keys = '<Leader>f', desc = '+Find' },
@@ -521,7 +522,7 @@ nmap_leader('vL', '<Cmd>lua MiniVisits.remove_label()<CR>', 'Remove label'
521522
-- Sometimes is needed only if Neovim is started as `nvim -- path/to/file`.
522523
-- - Everything else is delayed until the first draw with `later()`.
523524
local now, later = MiniDeps.now, MiniDeps.later
524-
local now_if_args = _G.Config.now_if_args
525+
local now_if_args = Config.now_if_args
525526

526527
-- Step one ===================================================================
527528
-- Enable 'miniwinter' color scheme. It comes with 'mini.nvim' and uses 'mini.hues'.
@@ -680,7 +681,7 @@ now_if_args(function()
680681
local on_attach = function(ev)
681682
vim.bo[ev.buf].omnifunc = 'v:lua.MiniCompletion.completefunc_lsp'
682683
end
683-
_G.Config.new_autocmd('LspAttach', nil, on_attach, "Set 'omnifunc'")
684+
Config.new_autocmd('LspAttach', nil, on_attach, "Set 'omnifunc'")
684685

685686
-- Advertise to servers that Neovim now supports certain set of completion and
686687
-- signature features through 'mini.completion'.
@@ -956,7 +957,7 @@ later(function()
956957
MiniFiles.set_bookmark('p', minideps_plugins, { desc = 'Plugins' })
957958
MiniFiles.set_bookmark('w', vim.fn.getcwd, { desc = 'Working directory' })
958959
end
959-
_G.Config.new_autocmd('User', 'MiniFilesExplorerOpen', add_marks, 'Add bookmarks')
960+
Config.new_autocmd('User', 'MiniFilesExplorerOpen', add_marks, 'Add bookmarks')
960961
end)
961962

962963
-- Git integration for more straightforward Git actions based on Neovim's state.
@@ -1318,7 +1319,7 @@ later(function() require('mini.visits').setup() end)
13181319

13191320
-- Make concise helpers for installing/adding plugins in two stages
13201321
local add, later = MiniDeps.add, MiniDeps.later
1321-
local now_if_args = _G.Config.now_if_args
1322+
local now_if_args = Config.now_if_args
13221323

13231324
-- Tree-sitter ================================================================
13241325

@@ -1386,7 +1387,7 @@ now_if_args(function()
13861387
end
13871388
end
13881389
local ts_start = function(ev) vim.treesitter.start(ev.buf) end
1389-
_G.Config.new_autocmd('FileType', filetypes, ts_start, 'Start tree-sitter')
1390+
Config.new_autocmd('FileType', filetypes, ts_start, 'Start tree-sitter')
13901391
end)
13911392

13921393
-- Language servers ===========================================================

0 commit comments

Comments
 (0)