forked from nvim-lua/kickstart.nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.lua
121 lines (100 loc) · 3.98 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
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
-- load options, keymaps, autocommands etc...
require 'configuration'
-- [[ 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)
require('lazy').setup({
spec = {
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
--
-- Load snacks, umbrela for multiple plugins
require 'core.plugins.snacks',
-- Detect tabstop and shiftwidth automatically
'tpope/vim-sleuth',
-- Commenting lines
-- Use `opts = {}` to force a plugin to be loaded, equivalent to require('plugin').setup({})
{ 'numToStr/Comment.nvim', opts = {} },
-- navigation between vim and tmux
require 'core.plugins.vim-tmux-navigator',
-- Useful plugin to show you pending keybinds.
require 'core.plugins.which-key',
-- Fuzzy finder ( files, lsp, etc. )
require 'core.plugins.telescope',
-- LSP Configuration & Plugins ( Language Servers )
require 'core.plugins.yaml-companion',
require 'core.plugins.lsp',
-- Autoformat
require 'core.plugins.conform',
-- Autocompletion
require 'core.plugins.nvim-cmp',
-- Colorscheme configuration
require 'core.plugins.colorscheme',
-- Highlight todo, notes, etc in comments
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
-- TODO: Check mini plugins and see if you can use some of them instead other plugins
-- Collection of various small independent plugins/modules
{
'echasnovski/mini.nvim',
config = function()
-- Better Around/Inside textobjects
--
-- Examples:
-- - va) - [V]isually select [A]round [)]paren
-- - yinq - [Y]ank [I]nside [N]ext [']quote
-- - ci' - [C]hange [I]nside [']quote
require('mini.ai').setup { n_lines = 500 }
-- Add/delete/replace surroundings (brackets, quotes, etc.)
--
-- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
-- - sd' - [S]urround [D]elete [']quotes
-- - sr)' - [S]urround [R]eplace [)] [']
require('mini.surround').setup()
-- Simple and easy statusline.
-- You could remove this setup call if you don't like it,
-- and try some other statusline plugin
require('mini.icons').setup()
local statusline = require 'mini.statusline'
-- set use_icons to true if you have a Nerd Font
statusline.setup { use_icons = vim.g.have_nerd_font }
-- ... and there is more!
-- Check out: https://github.com/echasnovski/mini.nvim
end,
},
-- Highlight, edit, and navigate code
require 'core.plugins.nvim-treesitter',
-- require 'core.plugins.debug',
require 'core.plugins.lint',
require 'core.plugins.autopairs',
require 'core.plugins.neo-tree',
-- Add your plugins to `lua/custom/plugins/*.lua` to get going.
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
{ import = 'custom.plugins' },
},
}, {
ui = {
-- If you are using a Nerd Font: set icons to an empty table which will use the
-- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table
icons = vim.g.have_nerd_font and {} or {
cmd = '⌘',
config = '🛠',
event = '📅',
ft = '📂',
init = '⚙',
keys = '🗝',
plugin = '🔌',
runtime = '💻',
require = '🌙',
source = '📄',
start = '🚀',
task = '📌',
lazy = '💤 ',
},
},
})
-- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et