-
Notifications
You must be signed in to change notification settings - Fork 115
/
lazy.lua
150 lines (133 loc) · 3.99 KB
/
lazy.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
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
149
150
-----------------------------------------------------------
-- Plugin manager configuration file
-----------------------------------------------------------
-- Plugin manager: lazy.nvim
-- URL: https://github.com/folke/lazy.nvim
-- https://lazy.folke.io/
--[[
For information about installed plugins see the README:
neovim-lua/README.md: Plugins
https://github.com/brainfucksec/neovim-lua?tab=readme-ov-file#plugins
--]]
-- Bootstrap lazy.nvim
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)
-- Use a protected call so we don't error out on first use
local status_ok, lazy = pcall(require, 'lazy')require('lazy')
if not status_ok then
return
end
-- Start setup
lazy.setup({
pkg = {
enabled = true,
cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua",
-- the first package source that is found for a plugin will be used.
sources = {
"lazy",
"rockspec", -- will only be used when rocks.enabled is true
"packspec",
},
},
rocks = {
-- disable rockspec
-- see: https://github.com/folke/lazy.nvim?tab=readme-ov-file#%EF%B8%8F-requirements
-- https://github.com/folke/lazy.nvim/issues/1576
enabled = false,
root = vim.fn.stdpath("data") .. "/lazy-rocks",
server = "https://nvim-neorocks.github.io/rocks-binaries/",
},
spec = {
--[[
Colorscheme:
The colorscheme should be available when starting Neovim.
Current available color schemes: onedark, kanagawa, monokai, rose-pine
See: /nvim/lua/core/colors.lua
--]]
{
'navarasu/onedark.nvim',
lazy = false, -- make sure we load this during startup if it is your main colorscheme
priority = 1000, -- make sure to load this before all the other start plugins
},
-- Other color schemes:
{ 'rebelot/kanagawa.nvim', lazy = true },
{ 'tanvirtin/monokai.nvim', lazy = true },
{ 'https://github.com/rose-pine/neovim', name = 'rose-pine', lazy = true },
-- Icons
{ 'kyazdani42/nvim-web-devicons', lazy = true },
-- Dashboard (start screen)
{
'goolord/alpha-nvim',
dependencies = { 'kyazdani42/nvim-web-devicons' },
},
-- Git labels
{
'lewis6991/gitsigns.nvim',
lazy = true,
dependencies = {
'nvim-lua/plenary.nvim',
'kyazdani42/nvim-web-devicons',
},
config = function()
require('gitsigns').setup{}
end
},
-- File explorer
{
'kyazdani42/nvim-tree.lua',
dependencies = { 'kyazdani42/nvim-web-devicons' },
},
-- Statusline
{
'nvim-lualine/lualine.nvim',
dependencies = {
'kyazdani42/nvim-web-devicons',
'lewis6991/gitsigns.nvim',
},
},
-- Treesitter
{ 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate' },
-- Indent line
{ 'lukas-reineke/indent-blankline.nvim', main = 'ibl', opts = {} },
-- Tag viewer
{ 'preservim/tagbar' },
-- Autopair
{
'windwp/nvim-autopairs',
event = 'InsertEnter',
config = function()
require('nvim-autopairs').setup{}
end
},
-- LSP
{ 'neovim/nvim-lspconfig' },
-- Autocomplete
{
'hrsh7th/nvim-cmp',
-- load cmp on InsertEnter
event = 'InsertEnter',
-- these dependencies will only be loaded when cmp loads
-- dependencies are always lazy-loaded unless specified otherwise
dependencies = {
'L3MON4D3/LuaSnip',
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-path',
'hrsh7th/cmp-buffer',
'saadparwaiz1/cmp_luasnip',
},
},
},
})