-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathminimal.lua
94 lines (90 loc) · 2.18 KB
/
minimal.lua
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs {"config", "data", "state", "cache"} do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.uv.fs_stat(lazypath) then
vim.fn.system {
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
lazypath
}
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
{
"nvim-telescope/telescope.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
{"nvim-telescope/telescope-fzf-native.nvim", build = "make"}
},
keys = {
{
"<space>h",
function()
require("telescope.builtin").help_tags()
end,
desc = "Help Tags"
}
},
config = function()
-- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
telescope = require("telescope")
telescope.setup {
defaults = {
path_display = {"truncate"},
sorting_strategy = "ascending",
layout_config = {
horizontal = {
prompt_position = "top"
}
},
mappings = {
i = {
["<C-h>"] = "which_key",
["<C-u>"] = false,
["<C-d>"] = false
}
},
vimgrep_arguments = {
"rg",
"--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
"--smart-case"
}
},
extensions = {
fzf = {
fuzzy = true,
override_generic_sorter = true,
override_file_sorter = true,
case_mode = "smart_case"
}
},
pickers = {
lsp_code_actions = {
theme = "dropdown"
},
find_files = {
find_command = {"rg", "--files", "--hidden", "--glob", "!**/.git/*"}
}
}
}
telescope.load_extension("fzf")
end
}
}
require("lazy").setup(
plugins,
{
root = root .. "/plugins"
}
)