This my neovim config, by a zola theme named neovim. Totally make sense.
And here is my config repo on github. This site is maintained in docs branch.
The root / means ~/.config/nvim/ in this docs. Roughly, nvim load configs in following order.
- usually /init.lua is the entrance of nvim config. In this,
require('file)loads/lua/file.lua.require('dir')loads/lua/dir/init.lua, andrequire('dir.file)loads/lua/dir/file.lua - /plugin is automatically loaded.
- /ftplugin is automatically loaded for corresponding file type. For example /ftplugin/lua.lua is loaded for all
luafiles - /after is loaded after others.
The following are loaded only by certain methods.
- /lsp is for lsp. For example,
vim.lsp.enable(lua)loads /lsp/lua.lua - /LuaSnip and /snipmate are for plugin LuaSnip. See /lua/lazy-plugins/cmp.lua.
There are two other files under nvim/, for formatting the config.
For lua-language-server, need /.luarc.json
{
"workspace.checkThirdParty": false,
"diagnostics.disable": ["undefined-global", "unused-local", "deprecated"]
}
and for style checking, need /.stylua.toml
syntax = "All"
column_width = 120
line_endings = "Unix"
indent_type = "Spaces"
indent_width = 2
quote_style = "AutoPreferDouble"
call_parentheses = "Always"
collapse_simple_statement = "Never"
space_after_function_names = "Never"
[sort_requires]
enabled = false