aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2025-11-02 18:07:33 +0800
committerGitHub <noreply@github.com>2025-11-02 18:07:33 +0800
commit003b429a8671dbb00d9c7e7e9f40d7aedfa87b8d (patch)
tree77b927dae029353916ed4a3dabc3a02091080ea8 /runtime/lua/vim
parent02cd564896502462e01d08a2a0901213f96456e7 (diff)
downloadrneovim-003b429a8671dbb00d9c7e7e9f40d7aedfa87b8d.tar.gz
rneovim-003b429a8671dbb00d9c7e7e9f40d7aedfa87b8d.tar.bz2
rneovim-003b429a8671dbb00d9c7e7e9f40d7aedfa87b8d.zip
vim-patch:9.1.1892: Not possible to know once Vim is done with sourcing vimrc (#36429)
Problem: A plugin does not know when startup scripts were already triggered. This is useful to determine if a function is called inside vimrc or after (like when sourcing 'plugin/' files). Solution: Add the v:vim_did_init variable (Evgeni Chasnovski) closes: vim/vim#18668 https://github.com/vim/vim/commit/294bce21ee837aab209a1008d0efc3e305cf188f Nvim has two more steps between sourcing startup scripts and loading plugins. Set this variable after these two steps. Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Diffstat (limited to 'runtime/lua/vim')
-rw-r--r--runtime/lua/vim/_meta/vvars.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/lua/vim/_meta/vvars.lua b/runtime/lua/vim/_meta/vvars.lua
index fc629edc30..2b18d21f78 100644
--- a/runtime/lua/vim/_meta/vvars.lua
+++ b/runtime/lua/vim/_meta/vvars.lua
@@ -793,6 +793,12 @@ vim.v.versionlong = ...
--- @type integer
vim.v.vim_did_enter = ...
+--- 0 during initialization, 1 after sourcing `vimrc` and just
+--- before `load-plugins`.
+--- Read-only.
+--- @type integer
+vim.v.vim_did_init = ...
+
--- Virtual line number for the 'statuscolumn' expression.
--- Negative when drawing the status column for virtual lines, zero
--- when drawing an actual buffer line, and positive when drawing