mirror of
https://github.com/neovim/neovim.git
synced 2025-11-14 22:39:08 +00:00
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
294bce21ee
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>
This commit is contained in:
6
runtime/lua/vim/_meta/vvars.lua
generated
6
runtime/lua/vim/_meta/vvars.lua
generated
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user