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
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
-- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct.
-- This is also a good place to setup other settings (vim.opt)
vim.g.mapleader = "\\"
vim.g.maplocalleader = "\\"
require('lazy').setup({
spec = {
{
'windwp/nvim-autopairs',
config = function() require('nvim-autopairs').setup {} end
},
{
'lewis6991/gitsigns.nvim',
config = function() require('gitsigns').setup {} end
},
{
'numToStr/Comment.nvim',
dependencies = { 'JoosepAlviste/nvim-ts-context-commentstring' },
config = function() require('Comment').setup {} end
},
{ 'mbbill/undotree' },
{ 'chrisbra/csv.vim' },
{
'ThePrimeagen/harpoon',
branch = 'harpoon2',
dependencies = { 'nvim-lua/plenary.nvim' }
},
{
'lukas-reineke/indent-blankline.nvim',
config = function()
local highlight = {
"Whitespace",
}
require('ibl').setup {
debounce = 100,
indent = { highlight = highlight, char = '┊', },
scope = { show_start = false, show_end = false },
}
end,
},
{
'folke/todo-comments.nvim',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
require('todo-comments.config').setup{
highlight = {
multiline = false,
},
}
require('todo-comments')
end
},
{
'lcheylus/overlength.nvim',
config = function()
require('overlength').setup{
enabled = true,
colors = {
ctermfg = nil,
ctermbg = 'darkgrey',
fg = nil,
bg = '#8B0000',
},
textwidth_mode = 0,
default_overlength = 80,
grace_length = 1,
highlight_to_eol = true,
disable_ft = { 'qf', 'help', 'man', 'checkhealth', 'lazy', 'packer', 'NvimTree', 'Telescope', 'WhichKey', 'text', 'csv', 'lua', '' }
}
end
},
{
'kylechui/nvim-surround',
version = "^3.0.0",
event = "VeryLazy",
config = function() require('nvim-surround').setup {} end
},
{
'ggandor/leap.nvim',
dependencies = { 'tpope/vim-repeat' },
config = function()
require('leap').setup({})
vim.keymap.set({'n', 'x', 'o'}, '<leader>s', '<Plug>(leap-forward-to)')
vim.keymap.set({'n', 'x', 'o'}, '<leader>S', '<Plug>(leap-backward-to)')
vim.keymap.set({'n', 'x', 'o'}, '<C-s>', '<Plug>(leap-forward-till)')
vim.keymap.set({'n', 'x', 'o'}, '<C-S-s>', '<Plug>(leap-backward-till)')
end
},
{
'ibhagwan/fzf-lua',
dependencies = { 'nvim-tree/nvim-web-devicons' },
opts = {
defaults = {
file_icons = false,
no_header = true,
no_header_i = true,
},
winopts = {
width = 1,
height = 0.45,
row = 1,
border = 'none',
preview = {
border = 'none',
title = false
},
previewers = {
builtin = {
syntax_limit_b = 1024 * 100,
},
}
}
}
},
{ import = "plugins" },
},
})
-- use 'preservim/tagbar'
-- use 'sainnhe/gruvbox-material'
-- use 'savq/melange-nvim'
|