nvim/lua/lazy-load.lua

320 lines
13 KiB
Lua
Raw Normal View History

require("lazy").setup({
2023-03-04 19:50:10 +00:00
-- Nvim-tree stuff
{ 'nvim-tree/nvim-web-devicons' }, -- optional, for file icons
{
'nvim-tree/nvim-tree.lua',
opts = require('plugins.nvim-tree').config,
keys = require('plugins.nvim-tree').keys
},
2023-03-04 19:50:10 +00:00
{
'nvim-treesitter/nvim-treesitter',
-- treesitter need to be configured after load,
-- so let here be init, not config
init = require('plugins.treesitter'),
2024-01-13 07:58:00 +00:00
--build = ':TSUpdate', -- not needed in Container workflow
2023-03-04 19:50:10 +00:00
priority = 400
},
-- neovim lsp plugins and depencencies
2024-04-03 17:27:42 +00:00
{
2024-10-23 11:31:58 +00:00
"folke/lazydev.nvim",
2024-04-03 19:51:16 +00:00
},
2023-03-04 19:50:10 +00:00
{ 'hrsh7th/cmp-nvim-lsp' },
{ 'hrsh7th/cmp-buffer' },
{ 'hrsh7th/cmp-cmdline' },
{ 'hrsh7th/cmp-path' },
{
'hrsh7th/nvim-cmp',
config = require('plugins.nvim-cmp').init,
dependencies = { 'onsails/lspkind.nvim' }
},
{
'williamboman/mason.nvim',
opts = {},
priority = 200
},
2024-12-17 15:10:37 +00:00
{
"stevearc/conform.nvim",
--event = { "BufWritePre" },
cmd = { "ConformInfo" },
-- triggering is in lspconfig conf since it is the same key
opts = require("plugins.conform").opts,
init = function()
-- If you want the formatexpr, here is the place to set it
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
end,
},
2023-03-04 19:50:10 +00:00
-- mason-lspconfig might need disabling on first run
{
'williamboman/mason-lspconfig.nvim',
opts = require('plugins.mason-lspconfig').config,
dependencies = { 'williamboman/mason.nvim' },
priority = 150
},
{
'neovim/nvim-lspconfig',
2023-05-02 18:33:56 +00:00
init = require('plugins.nvim-lspconfig').init
2023-03-04 19:50:10 +00:00
},
{
'mfussenegger/nvim-lint',
init = require('plugins.nvim-lint').init
},
{
'folke/trouble.nvim',
opts = {},
cmd = "Trouble",
--opts = require('plugins.trouble').config,
2023-03-04 19:50:10 +00:00
keys = require("plugins.trouble").keys
},
2023-03-04 19:50:10 +00:00
-- various plugins
{
"folke/which-key.nvim",
config = function()
vim.o.timeout = true
vim.o.timeoutlen = 300
require("which-key").setup(
require('plugins.which-key').conf)
end,
},
{
'lewis6991/gitsigns.nvim',
opts = require('plugins.gitsigns').config
},
{
'petertriho/nvim-scrollbar',
opts = {}
},
{
'kevinhwang91/nvim-hlslens',
opts = {},
keys = require('plugins.hlslens').keys
},
{ 'L3MON4D3/LuaSnip', version = '*' },
{ 'saadparwaiz1/cmp_luasnip' },
{
'akinsho/bufferline.nvim',
version = '*',
opts = require('plugins.bufferline').config
},
{
'preservim/nerdcommenter',
keys = require('plugins.nerdcommenter').keys
},
2023-05-02 18:33:56 +00:00
{
'rmagatti/auto-session',
opts = require('plugins.auto-session').config
},
2024-04-09 19:13:31 +00:00
{
"NeogitOrg/neogit",
dependencies = {
"nvim-lua/plenary.nvim", -- required
2024-04-09 19:13:31 +00:00
"sindrets/diffview.nvim", -- optional - Diff integration
-- Only one of these is needed, not both.
"nvim-telescope/telescope.nvim", -- optional
},
2024-04-11 11:29:27 +00:00
opts = require('plugins.neogit').config
2024-04-09 19:13:31 +00:00
},
--{ 'Glench/Vim-Jinja2-Syntax', priority = 15 },
--{ 'vmware-archive/salt-vim', priority = 10 },
--{ 'stephpy/vim-yaml' }, -- for proper sls syntax highlighting when jinja
2023-03-04 19:50:10 +00:00
{
'lukas-reineke/indent-blankline.nvim',
main = "ibl",
init = require('plugins.indent-blankline').init
2023-03-04 19:50:10 +00:00
},
{ 'MunifTanjim/nui.nvim' },
{
'folke/noice.nvim',
opts = require("plugins.noice").config,
dependencies = {
"MunifTanjim/nui.nvim",
-- OPTIONAL:
-- `nvim-notify` is only needed, if you want to use the notification view.
-- If not available, we use `mini` as the fallback
2024-08-13 08:08:44 +00:00
--"rcarriga/nvim-notify", }
}
2023-03-04 19:50:10 +00:00
},
2024-07-27 14:48:27 +00:00
{
'MeanderingProgrammer/markdown.nvim',
main = "render-markdown",
opts = {},
2024-08-13 08:08:44 +00:00
name = 'render-markdown', -- Only needed if you have another plugin named markdown.nvim
2024-07-27 14:48:27 +00:00
--dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins
2024-10-23 11:31:58 +00:00
dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
2024-07-27 14:48:27 +00:00
},
2023-03-04 19:50:10 +00:00
{
'nvim-lualine/lualine.nvim',
opts = require('plugins.lualine').config
},
{ 'RRethy/vim-illuminate' },
2024-10-13 18:14:30 +00:00
--{ 'sheerun/vim-polyglot' }, -- not maintained
2024-10-17 14:31:22 +00:00
{ 'nfnty/vim-nftables' },
2024-10-13 18:14:30 +00:00
{ 'HiPhish/jinja.vim' },
2023-03-04 19:50:10 +00:00
-- themes
2024-07-27 14:48:27 +00:00
{ "ellisonleao/gruvbox.nvim", priority = 1000, config = true },
2023-03-04 19:50:10 +00:00
--Fuzzy search by Telescope and its dependencies:
{
'nvim-telescope/telescope.nvim',
branch = 'master',
config = require('plugins.nvim-telescope').config,
dependencies = { 'nvim-lua/plenary.nvim' },
priority = 100
},
{ 'BurntSushi/ripgrep' },
2023-03-04 19:50:10 +00:00
},
{
root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed
defaults = {
2023-03-04 19:50:10 +00:00
lazy = false, -- should plugins be lazy-loaded?
version = nil,
-- version = "*", -- enable this to try installing the latest stable versions of plugins
},
-- leave nil when passing the spec as the first argument to setup()
spec = nil, ---@type LazySpec
lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update.
concurrency = 1, ---@type number limit the maximum amount of concurrent tasks
git = {
-- defaults for the `Lazy log` command
-- log = { "-10" }, -- show the last 10 commits
log = { "--since=3 days ago" }, -- show commits from the last 3 days
2023-03-04 19:50:10 +00:00
timeout = 120, -- kill processes that take more than 2 minutes
url_format = "https://github.com/%s.git",
-- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version,
-- then set the below to false. This is should work, but is NOT supported and will
-- increase downloads a lot.
filter = true,
},
dev = {
-- directory where you store your local plugin projects
path = "~/projects",
---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub
2023-03-04 19:50:10 +00:00
patterns = {}, -- For example {"folke"}
fallback = false, -- Fallback to git when local plugin doesn't exist
},
install = {
-- install missing plugins on startup. This doesn't increase startup time.
missing = true,
-- try to load one of these colorschemes when starting an installation during startup
2023-02-09 18:46:26 +00:00
colorscheme = {},
},
ui = {
-- a number <1 is a percentage., >1 is a fixed size
size = { width = 0.8, height = 0.8 },
wrap = true, -- wrap the lines in the ui
-- The border to use for the UI window. Accepts same border values as |nvim_open_win()|.
border = "none",
icons = {
cmd = "",
config = "",
event = "",
ft = "",
init = "",
import = "",
keys = "",
lazy = "",
loaded = "",
not_loaded = "",
plugin = "",
runtime = "",
source = "",
start = "",
task = "",
list = {
"",
"",
"",
"",
},
},
-- leave nil, to automatically select a browser depending on your OS.
-- If you want to use a specific browser, you can define it here
browser = nil, ---@type string?
throttle = 20, -- how frequently should the ui process render events
custom_keys = {
-- you can define custom key maps here.
-- To disable one of the defaults, set it to false
-- open lazygit log
2023-05-02 18:33:56 +00:00
["<localleader>l"] = function(plugin)
require("lazy.util").float_term({ "lazygit", "log" }, {
cwd = plugin.dir,
})
end,
-- open a terminal for the plugin dir
2023-05-02 18:33:56 +00:00
["<localleader>t"] = function(plugin)
require("lazy.util").float_term(nil, {
cwd = plugin.dir,
})
end,
},
},
diff = {
-- diff command <d> can be one of:
-- * browser: opens the github compare view. Note that this is always mapped to <K> as well,
-- so you can have a different command for diff <d>
-- * git: will run git diff and open a buffer with filetype git
-- * terminal_git: will open a pseudo terminal with git diff
-- * diffview.nvim: will open Diffview to show the diff
cmd = "git",
},
checker = {
-- automatically check for plugin updates
enabled = false,
concurrency = nil, ---@type number? set to 1 to check for updates very slowly
2023-03-04 19:50:10 +00:00
notify = true, -- get a notification when new updates are found
frequency = 3600, -- check for updates every hour
},
change_detection = {
-- automatically check for config file changes and reload the ui
enabled = true,
notify = true, -- get a notification when changes are found
},
performance = {
cache = {
2023-02-14 21:09:08 +00:00
enabled = true,
path = vim.fn.stdpath("cache") .. "/lazy/cache",
-- Once one of the following events triggers, caching will be disabled.
-- To cache all modules, set this to `{}`, but that is not recommended.
-- The default is to disable on:
-- * VimEnter: not useful to cache anything else beyond startup
-- * BufReadPre: this will be triggered early when opening a file from the command line directly
disable_events = { "UIEnter", "BufReadPre" },
ttl = 3600 * 24 * 5, -- keep unused modules for up to 5 days
},
2023-03-04 19:50:10 +00:00
reset_packpath = true, -- reset the package path to improve startup time
rtp = {
2023-03-04 19:50:10 +00:00
reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory
---@type string[]
2023-03-04 19:50:10 +00:00
paths = {}, -- add any custom paths here that you want to includes in the rtp
---@type string[] list any plugins you want to disable here
disabled_plugins = {
-- "gzip",
-- "matchit",
-- "matchparen",
-- "netrwPlugin",
-- "tarPlugin",
-- "tohtml",
-- "tutor",
-- "zipPlugin",
},
},
},
-- lazy can generate helptags from the headings in markdown readme files,
-- so :help works even for plugins that don't have vim docs.
-- when the readme opens with :help it will be correctly displayed as markdown
readme = {
root = vim.fn.stdpath("state") .. "/lazy/readme",
files = { "README.md", "lua/**/README.md" },
-- only generate markdown helptags for plugins that dont have docs
skip_if_doc_exists = true,
},
state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things
})