-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.lua
81 lines (76 loc) · 2.37 KB
/
init.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
-- [[ Install `lazy.nvim` plugin manager ]]
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }
end ---@diagnostic disable-next-line: undefined-field
vim.opt.rtp:prepend(lazypath)
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
vim.opt.termguicolors = true
local spec = {
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
{ 'numToStr/Comment.nvim', opts = {} }, -- "gc" to comment visual regions/lines
{ -- Useful plugin to show you pending keybinds.
'folke/which-key.nvim',
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
config = function() -- This is the function that runs, AFTER loading
require('which-key').setup()
-- Document existing key chains
require('which-key').add {
{ '<leader>c', group = '[C]ode' },
{ '<leader>d', group = '[D]ocument' },
{ '<leader>r', group = '[R]ename' },
{ '<leader>s', group = '[S]earch' },
{ '<leader>w', group = '[W]orkspace' },
{ '<leader>t', group = '[T]oggle' },
{ '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } },
{ '<leader>-', group = 'File tree', mode = { 'n', 'v' } },
}
end,
},
{ 'nvim-lua/plenary.nvim', lazy = true },
'nvim-tree/nvim-web-devicons',
{
'dstein64/vim-startuptime',
cmd = 'StartupTime',
config = function()
vim.g.startuptime_tries = 10
end,
},
{ 'lukas-reineke/indent-blankline.nvim', main = 'ibl', config = true },
'github/copilot.vim',
{
'otavioschwanck/arrow.nvim',
opts = {
show_icons = true,
leader_key = ',', -- Recommended to be a single key
},
},
-- Highlight todo, notes, etc in comments
{ 'folke/todo-comments.nvim', event = 'VimEnter', opts = { signs = false } },
{ import = 'plugins' },
}
require('lazy').setup {
spec = spec,
install = {
colorscheme = { 'catppuccin', 'habamax' },
},
checker = {
enabled = true,
notify = false,
},
change_detection = {
enabled = true,
notify = false,
},
performance = {
cache = {
enabled = true,
},
},
}
require 'options'
require 'keymaps'
require 'autocmds'