config
插件
- https://github.com/stevearc/aerial.nvim
- https://github.com/MagicDuck/grug-far.nvim
- https://github.com/mfussenegger/nvim-lint
- https://github.com/windwp/nvim-ts-autotag
加载顺序
详细参考:
: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,在打开文件时根据类型加载对应配置,即加载下面两个文件
:runtime! ftplugin.vim indent.vim -
加载用户配置
-
文件类型检测
设置一些检测文件类型的autocmd,即加载以下文件
: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目录后加载,可以用来覆盖默认设置