-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
23 lines (22 loc) · 968 Bytes
/
init.lua
File metadata and controls
23 lines (22 loc) · 968 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
-- Startup level, you can use `env -a vi nvim` to startup neovim and change the
-- `vim.v.argv[1]` to 'vi'.
-- There are three level:
-- 0: Neovim don't load any plugins, use this level when `argv[1]` is 'vi'
-- 1: Don't load development plugins, use this level when `argv[1]` is 'vim'
-- 2(default): Load all plugins defined in this configuration
LEVEL = {
level = ({ vi = 0, vim = 1 })[vim.fs.basename(vim.v.argv[1])] or 2,
include_minimal = function(_) return true end,
include_basic = function(t) return t.level >= 1 end,
include_full = function(t) return t.level >= 2 end,
}
-- Define your commonly used filetypes. This maybe control some plugin's load logic
-- Program language
CODE_FT = { "python", "lua", "c", "rust", "bash", "fish" }
-- Config and markup language
CONF_FT = { "yaml", "toml", "json", "markdown" }
CODE_CONF_FT = vim.list_extend(vim.deepcopy(CODE_FT), CONF_FT)
require("core")
if LEVEL:include_basic() then
require("plugins")
end