-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathinit.lua
More file actions
148 lines (137 loc) · 4.62 KB
/
Copy pathinit.lua
File metadata and controls
148 lines (137 loc) · 4.62 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
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
_G.global = {}
_G.global.float_border_opts = { border = 'rounded', focusable = false, scope = 'line' }
vim.g.mapleader = ','
vim.g.maplocalleader = ','
vim.g.sessions_enabled = true
local disabled_builtins = {
'gzip',
'matchit',
'matchparen',
'netrwPlugin',
'tarPlugin',
'tohtml',
'tutor',
'zipPlugin',
}
for _, plugin in ipairs(disabled_builtins) do
vim.g['loaded_' .. plugin] = 1
end
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
'git',
'clone',
'--filter=blob:none',
'--single-branch',
'https://github.com/folke/lazy.nvim.git',
lazypath,
})
end
vim.opt.runtimepath:prepend(lazypath)
require('lazy').setup({
spec = {
{ import = 'plugins' },
---@type LazyPluginSpec
{
'neovim/nvim-lspconfig',
dependencies = {
'b0o/SchemaStore.nvim',
},
event = { 'BufReadPre', 'BufNewFile' },
},
---@type LazyPluginSpec
{
'kylechui/nvim-surround',
event = 'VeryLazy',
},
---@type LazyPluginSpec
{
'nvzone/typr',
dependencies = 'nvzone/volt',
opts = {},
cmd = { 'Typr', 'TyprStats' },
},
{
'dmtrKovalenko/fff.nvim',
lazy = false,
build = function()
require('fff.download').download_or_build_binary()
end,
opts = {
layout = {
height = 0.9,
width = 0.9,
prompt_position = 'top',
preview_size = 0.6,
},
preview = {
enabled = true,
line_numbers = true,
},
debug = {
enabled = true, -- show the file info panel next to the preview
show_scores = true,
show_file_info = {
file_info = true, -- size, type, git status, frecency
score_breakdown = true, -- total + match type, bonuses, modifiers, penalty
-- modified + accessed timestamps; pass a table to hide individual rows:
-- timings = { modified = false, accessed = true }
timings = false,
full_path = true, -- relative path at the bottom (wraps if too long)
},
},
grep = {
max_matches_per_file = 0, -- 0 to unlimited
time_budget_ms = 100, -- prevents UI freeze, 0 = no limit
},
keymaps = {
close = '<esc><esc>',
select = '<CR>',
select_split = '<C-s>',
select_vsplit = '<C-v>',
select_tab = '<C-t>',
-- you can assign multiple keys to any action
move_up = { '<Up>', '<C-p>' },
move_down = { '<Down>', '<C-n>' },
preview_scroll_up = '<C-u>',
preview_scroll_down = '<C-d>',
toggle_debug = '<F2>',
-- grep mode: cycle between plain text, regex, and fuzzy search
cycle_grep_modes = '<S-Tab>',
grep_jump_to_next_file = { '<C-A-n>' },
grep_jump_to_prev_file = { '<C-A-p>' },
-- goes to the previous query in history
cycle_previous_query = '<C-Up>',
-- multi-select keymaps for quickfix
toggle_select = '<Tab>',
send_to_quickfix = '<C-q>',
-- this are specific for the normal mode (you can exit it using any other keybind like jj)
focus_list = '<leader>l',
focus_preview = '<leader>p',
},
file_picker = {
current_file_label = '[Current File]',
},
},
},
},
defaults = {
lazy = true,
version = false,
},
install = {
missing = true,
colorscheme = { 'catppuccin' },
},
checker = { enabled = true },
rocks = { enabled = false },
})
vim.cmd.colorscheme('catppuccin-mocha')
vim.cmd('packadd nvim.difftool')
vim.cmd('packadd nvim.undotree')
require('config')
require('vim._core.ui2').enable({
enable = true,
})
vim.opt.grepprg = 'rg --vimgrep --smart-case --hidden'
vim.opt.grepformat = '%f:%l:%c:%m'