debian-dots

dotfiles (does the obvious)
git clone [email protected]:dracuxan/debian-dots.git
Log | Files | Refs | README | LICENSE

lazy.lua (4663B)


      1 -- Set up the Lazy plugin manager
      2 local vim = vim
      3 local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
      4 if not (vim.uv or vim.loop).fs_stat(lazypath) then
      5 	local lazyrepo = "https://github.com/folke/lazy.nvim.git"
      6 	local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
      7 	if vim.v.shell_error ~= 0 then
      8 		error("Error cloning lazy.nvim:\n" .. out)
      9 	end
     10 end
     11 vim.opt.rtp:prepend(lazypath)
     12 
     13 local custom_plugins = {
     14 	require("dracuxan.plugins.telescope"),
     15 	require("dracuxan.plugins.misic"),
     16 	require("dracuxan.plugins.lsp"),
     17 	require("dracuxan.plugins.langages"),
     18 	require("dracuxan.plugins.textobjects"),
     19 
     20 	{
     21 		"tiagovla/scope.nvim",
     22 		config = function()
     23 			require("scope").setup({})
     24 		end,
     25 	},
     26 
     27 	{
     28 		"folke/snacks.nvim",
     29 		priority = 1000,
     30 		lazy = false,
     31 		opts = {
     32 			explorer = {
     33 				enabled = true,
     34 			},
     35 			picker = {
     36 				sources = {
     37 					explorer = {
     38 						layout = {
     39 							preset = "sidebar",
     40 							preview = false,
     41 							layout = {
     42 								position = "right",
     43 								width = 35,
     44 							},
     45 						},
     46 					},
     47 				},
     48 			},
     49 		},
     50 	},
     51 
     52 	{
     53 		"nyoom-engineering/oxocarbon.nvim",
     54 	},
     55 
     56 	{
     57 		"nvim-treesitter/nvim-treesitter",
     58 		branch = "master",
     59 		lazy = false,
     60 		build = ":TSUpdate",
     61 	},
     62 
     63 	{
     64 		"folke/noice.nvim",
     65 		config = function()
     66 			require("noice").setup({
     67 				-- add any options here
     68 				lsp = {
     69 					documentation = {
     70 						opts = {
     71 							size = {
     72 								max_width = 80,
     73 								max_height = 20,
     74 							},
     75 						},
     76 					},
     77 				},
     78 				routes = {
     79 					{
     80 						filter = {
     81 							event = "msg_show",
     82 							any = {
     83 								{ find = "%d+L, %d+B" },
     84 								{ find = "; after #%d+" },
     85 								{ find = "; before #%d+" },
     86 								{ find = "%d fewer lines" },
     87 								{ find = "%d more lines" },
     88 							},
     89 						},
     90 						opts = { skip = true },
     91 					},
     92 				},
     93 				presets = {
     94 					bottom_search = true, -- use a classic bottom cmdline for search
     95 					command_palette = true, -- position the cmdline and popupmenu together
     96 					long_message_to_split = true, -- long messages will be sent to a split
     97 					lsp_doc_border = true, -- add a border to hover docs and signature help
     98 				},
     99 			})
    100 		end,
    101 		dependencies = { "MunifTanjim/nui.nvim" },
    102 	},
    103 
    104 	{
    105 		"akinsho/toggleterm.nvim",
    106 		version = "*",
    107 		config = function()
    108 			require("dracuxan.plugins.toggleterm")
    109 		end,
    110 		lazy = false,
    111 	},
    112 
    113 	{
    114 		"datsfilipe/vesper.nvim",
    115 		version = false,
    116 		lazy = false,
    117 		priority = 1000, -- make sure to load this before all the other start plugins
    118 		config = function()
    119 			require("dracuxan.plugins.vesper")
    120 		end,
    121 	},
    122 
    123 	{
    124 		"lukas-reineke/indent-blankline.nvim",
    125 		main = "ibl",
    126 		config = function()
    127 			local hooks = require("ibl.hooks")
    128 
    129 			hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
    130 				-- normal indent lines (purple)
    131 				vim.api.nvim_set_hl(0, "IndentPurple", { fg = "#2f324f" })
    132 
    133 				-- active scope (when cursor inside function)
    134 				vim.api.nvim_set_hl(0, "ScopePeach", { fg = "#999ecf" })
    135 			end)
    136 
    137 			require("ibl").setup({
    138 				indent = {
    139 					highlight = { "IndentPurple" },
    140 				},
    141 				scope = {
    142 					enabled = true,
    143 					highlight = { "ScopePeach" },
    144 					show_start = true,
    145 					show_end = true,
    146 				},
    147 			})
    148 		end,
    149 	},
    150 
    151 	{
    152 		"rmagatti/auto-session",
    153 		config = function()
    154 			local height = math.floor(vim.o.lines * 0.45)
    155 			local width = 70
    156 
    157 			require("auto-session").setup({
    158 				session_lens = {
    159 					picker_opts = {
    160 						height = height,
    161 						width = width,
    162 						layout_strategy = "center",
    163 						layout_config = {
    164 							anchor = "C",
    165 						},
    166 						-- 	border = "rounded",
    167 					},
    168 				},
    169 				log_level = "error",
    170 				auto_session_suppress_dirs = { "~/", "~/Downloads" },
    171 			})
    172 		end,
    173 	},
    174 
    175 	{
    176 		"nvim-lualine/lualine.nvim",
    177 		dependencies = { "nvim-tree/nvim-web-devicons" },
    178 		disabled_filetypes = { "alpha" },
    179 		config = function()
    180 			require("dracuxan.plugins.lualine")
    181 		end,
    182 	},
    183 
    184 	{
    185 		"lewis6991/gitsigns.nvim",
    186 		opts = {
    187 			signs = {
    188 				add = { text = "+" },
    189 				change = { text = "~" },
    190 				delete = { text = "_" },
    191 				topdelete = { text = "‾" },
    192 				changedelete = { text = "~" },
    193 			},
    194 			signs_staged = {
    195 				add = { text = "+" },
    196 				change = { text = "~" },
    197 				delete = { text = "_" },
    198 				topdelete = { text = "‾" },
    199 				changedelete = { text = "~" },
    200 			},
    201 		},
    202 	},
    203 
    204 	{
    205 		"numToStr/Comment.nvim",
    206 		opts = {},
    207 		config = function()
    208 			local opts = { noremap = true, silent = true }
    209 			vim.keymap.set("n", "<C-c>", require("Comment.api").toggle.linewise.current, opts)
    210 			vim.keymap.set(
    211 				"v",
    212 				"<C-c>",
    213 				"<esc><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<cr>",
    214 				opts
    215 			)
    216 		end,
    217 	},
    218 }
    219 
    220 require("lazy").setup(custom_plugins)