-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
55 lines (53 loc) · 1.61 KB
/
Copy pathinit.lua
File metadata and controls
55 lines (53 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
-- 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("vim._core.ui2").enable({
enable = true,
msg = {
targets = {
[""] = "msg",
empty = "cmd",
emsg = "pager",
echo = "msg",
echomsg = "msg",
echoerr = "pager",
completion = "cmd",
list_cmd = "pager",
lua_error = "pager",
lua_print = "pager",
progress = "msg",
rpc_error = "pager",
quickfix = "msg",
search_cmd = "cmd",
search_count = "cmd",
shell_cmd = "pager",
shell_err = "pager",
shell_out = "pager",
shell_ret = "cmd",
undo = "cmd",
verbose = "pager",
wildlist = "cmd",
wmsg = "msg",
typed_cmd = "cmd",
},
},
})
require("core")
if LEVEL:include_basic() then
require("plugins")
end