-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua.in
More file actions
44 lines (38 loc) · 1.29 KB
/
init.lua.in
File metadata and controls
44 lines (38 loc) · 1.29 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
-- vim:ft=lua
vim.g.loaded_node_provider = 0
vim.g.loaded_perl_provider = 0
vim.g.loaded_python_provider = 0
vim.g.loaded_python3_provider = 0
vim.g.loaded_ruby_provider = 0
vim.loader.enable()
local argv0 = vim.v.argv[1]
if string.match(argv0, "snv%-profile$") then vim.g.snv_profile = true end
if vim.g.snv_profile or string.match(argv0, "snv%-dev$") then vim.g.snv_dev = true end
-- Save this for use with ts_query_ls
vim.g.treesitter_runtime_dir = "@plugins@/pack/plugins/opt/nvim-treesitter-runtime"
local site = vim.fn.stdpath("data") .. "/site"
local config = vim.g.snv_dev and vim.fn.stdpath("config") or "@out@/share/snv/site"
vim.opt.packpath = {
"@plugins@",
site,
vim.env.VIMRUNTIME,
vim.fs.normalize(vim.env.VIMRUNTIME .. "/../../../lib/nvim"),
}
vim.opt.runtimepath = {
config,
site,
-- treesitter needs to come before $VIMRUNTIME in order to be prioritized
-- above the builtin queries. otherwise, putting nvim-treesitter-runtime in
-- start would have been better.
vim.g.treesitter_runtime_dir,
vim.env.VIMRUNTIME,
site .. "/after",
config .. "/after",
}
if vim.g.snv_profile then
vim.cmd.packadd("snacks.nvim")
require("snacks.profiler").startup({
startup = { event = "User", pattern = "MiniDepsComplete" },
presets = { startup = { min_time = 0.1 } },
})
end