config
加载顺序
详细参考:
vim
:h runtimepath
:h startup
:h ftplugin-overrule设置vim.o.shell
处理启动参数
启动nvim server
等待UI连接
Setup |default-mappings| and |default-autocmds|. Create |popup-menu|
Enable filetype and indent plugins
这里是指设置一些autocmd,在打开文件时根据类型加载对应配置,即加载下面两个文件
vim:runtime! ftplugin.vim indent.vim加载用户配置
文件类型检测
设置一些检测文件类型的autocmd,即加载以下文件
vim:runtime! filetype.lua加载syntax文件
Set the |v:vim_did_init| variable to 1.
加载runtime里的plugin文件
- 先加载vim文件,再加载lua文件
- 接着加载pack path里start文件夹里的pack
- 最后加载所有runtime(加载完pack后runtime会改变)里的after/plugin文件
vim.pack.add里的pack在opt文件夹里,在加载配置文件时由vim.pack处理
plugin autoload这两个目录是vimscript插件使用的,其中plugin会在vim启动时加载,autoload里的函数会在调用时加载
nvim plugin 、ftplugin、queries是在内置runtime目录 中的对应目录加载前加载,after/plugin 是在runtime目录后加载,可以用来覆盖默认设置