mirror of
				https://github.com/dcarrillo/dotfiles.git
				synced 2025-10-31 07:39:09 +00:00 
			
		
		
		
	[neovim] Reorganize plugins
This commit is contained in:
		| @@ -135,6 +135,8 @@ keymap({ "n", "v" }, "<leader>lf", function() | |||||||
| 	require("conform").format({ async = true, lsp_fallback = true }) | 	require("conform").format({ async = true, lsp_fallback = true }) | ||||||
| end, vim.tbl_extend("force", opts, { desc = "Format the current buffer or selection" })) | end, vim.tbl_extend("force", opts, { desc = "Format the current buffer or selection" })) | ||||||
|  |  | ||||||
|  | keymap({ "n", "v" }, "<leader>o", "<cmd>Outline<CR>", vim.tbl_extend("force", opts, { desc = "Toogle Outline" })) | ||||||
|  |  | ||||||
| -- Neotest | -- Neotest | ||||||
| keymap( | keymap( | ||||||
| 	"n", | 	"n", | ||||||
| @@ -216,20 +218,6 @@ keymap( | |||||||
| 	vim.tbl_extend("force", opts, { desc = "Open a Telescope prompt to show all commands" }) | 	vim.tbl_extend("force", opts, { desc = "Open a Telescope prompt to show all commands" }) | ||||||
| ) | ) | ||||||
|  |  | ||||||
| -- Comment |  | ||||||
| keymap( |  | ||||||
| 	"n", |  | ||||||
| 	"<leader>/", |  | ||||||
| 	"<cmd>lua require'Comment.api'.toggle.linewise.current()<cr>", |  | ||||||
| 	vim.tbl_extend("force", opts, { desc = "Comment/Uncomment code lines" }) |  | ||||||
| ) |  | ||||||
| keymap( |  | ||||||
| 	"x", |  | ||||||
| 	"<leader>/", |  | ||||||
| 	"<esc><cmd>lua require'Comment.api'.toggle.linewise(vim.fn.visualmode())<cr>", |  | ||||||
| 	vim.tbl_extend("force", opts, { desc = "Comment/Uncomment code lines on visual block mode" }) |  | ||||||
| ) |  | ||||||
|  |  | ||||||
| -- Gitdiff | -- Gitdiff | ||||||
| keymap( | keymap( | ||||||
| 	"n", | 	"n", | ||||||
|   | |||||||
| @@ -87,11 +87,13 @@ require("lazy").setup({ | |||||||
|  |  | ||||||
| 	-- Plugins | 	-- Plugins | ||||||
| 	{ "nvim-lua/plenary.nvim", lazy = true }, | 	{ "nvim-lua/plenary.nvim", lazy = true }, | ||||||
|  | 	{ "echasnovski/mini.animate", event = "VeryLazy", version = "*" }, | ||||||
|  | 	{ "echasnovski/mini.comment", event = "VeryLazy", version = "*" }, | ||||||
|  | 	{ "echasnovski/mini.pairs", event = "VeryLazy", version = "*" }, | ||||||
| 	{ "echasnovski/mini.starter", lazy = "VimEnter", version = "*" }, | 	{ "echasnovski/mini.starter", lazy = "VimEnter", version = "*" }, | ||||||
| 	{ "echasnovski/mini.animate", version = "*" }, | 	{ "JoosepAlviste/nvim-ts-context-commentstring", lazy = true, opts = { | ||||||
| 	{ "windwp/nvim-autopairs" }, | 		enable_autocmd = false, | ||||||
| 	{ "numToStr/Comment.nvim" }, | 	} }, | ||||||
| 	{ "JoosepAlviste/nvim-ts-context-commentstring" }, |  | ||||||
| 	{ "nvim-tree/nvim-web-devicons", lazy = true }, | 	{ "nvim-tree/nvim-web-devicons", lazy = true }, | ||||||
| 	{ "akinsho/bufferline.nvim", event = "VeryLazy", version = "v4.*" }, | 	{ "akinsho/bufferline.nvim", event = "VeryLazy", version = "v4.*" }, | ||||||
| 	{ "moll/vim-bbye" }, | 	{ "moll/vim-bbye" }, | ||||||
| @@ -161,6 +163,7 @@ require("lazy").setup({ | |||||||
| 		event = { "BufWritePre" }, | 		event = { "BufWritePre" }, | ||||||
| 		cmd = { "ConformInfo" }, | 		cmd = { "ConformInfo" }, | ||||||
| 	}, | 	}, | ||||||
|  | 	{ "hedyhli/outline.nvim", opts = {} }, | ||||||
|  |  | ||||||
| 	-- Telescope | 	-- Telescope | ||||||
| 	{ "nvim-telescope/telescope.nvim", cmd = "Telescope" }, | 	{ "nvim-telescope/telescope.nvim", cmd = "Telescope" }, | ||||||
|   | |||||||
| @@ -1 +0,0 @@ | |||||||
| require("mini.animate").setup() |  | ||||||
| @@ -1,18 +0,0 @@ | |||||||
| require("nvim-autopairs").setup({ |  | ||||||
| 	check_ts = true, |  | ||||||
| 	disable_filetype = { "TelescopePrompt", "neo-tree" }, |  | ||||||
| 	ts_config = { |  | ||||||
| 		lua = { "string", "source" }, |  | ||||||
| 	}, |  | ||||||
| 	fast_wrap = { |  | ||||||
| 		map = "<M-e>", |  | ||||||
| 		chars = { "{", "[", "(", '"', "'" }, |  | ||||||
| 		pattern = string.gsub([[ [%'%"%)%>%]%)%}%,] ]], "%s+", ""), |  | ||||||
| 		offset = 0, |  | ||||||
| 		end_key = "$", |  | ||||||
| 		keys = "qwertyuiopzxcvbnmasdfghjkl", |  | ||||||
| 		check_comma = true, |  | ||||||
| 		highlight = "PmenuSel", |  | ||||||
| 		highlight_grey = "LineNr", |  | ||||||
| 	}, |  | ||||||
| }) |  | ||||||
| @@ -1,9 +0,0 @@ | |||||||
| require("ts_context_commentstring").setup({ |  | ||||||
| 	enable_autocmd = false, |  | ||||||
| }) |  | ||||||
|  |  | ||||||
| require("Comment").setup({ |  | ||||||
| 	pre_hook = require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook(), |  | ||||||
| }) |  | ||||||
|  |  | ||||||
| vim.g.skip_ts_context_commentstring_module = true |  | ||||||
| @@ -2,10 +2,11 @@ require("plugins.blink") | |||||||
| require("plugins.copilot") | require("plugins.copilot") | ||||||
| require("plugins.avante") | require("plugins.avante") | ||||||
| require("plugins.telescope") | require("plugins.telescope") | ||||||
| require("plugins.starter") | require("plugins.mini-animate") | ||||||
|  | require("plugins.mini-comment") | ||||||
|  | require("plugins.mini-pairs") | ||||||
|  | require("plugins.mini-starter") | ||||||
| require("plugins.treesitter") | require("plugins.treesitter") | ||||||
| require("plugins.autopairs") |  | ||||||
| require("plugins.comment") |  | ||||||
| require("plugins.gitsigns") | require("plugins.gitsigns") | ||||||
| require("plugins.neo-tree") | require("plugins.neo-tree") | ||||||
| require("plugins.illuminate") | require("plugins.illuminate") | ||||||
|   | |||||||
							
								
								
									
										34
									
								
								.config/nvim/lua/plugins/mini-animate.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								.config/nvim/lua/plugins/mini-animate.lua
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,34 @@ | |||||||
|  | local mouse_scrolled = false | ||||||
|  | for _, scroll in ipairs({ "Up", "Down" }) do | ||||||
|  | 	local key = "<ScrollWheel" .. scroll .. ">" | ||||||
|  | 	vim.keymap.set({ "", "i" }, key, function() | ||||||
|  | 		mouse_scrolled = true | ||||||
|  | 		return key | ||||||
|  | 	end, { expr = true }) | ||||||
|  | end | ||||||
|  |  | ||||||
|  | vim.api.nvim_create_autocmd({ "FileType" }, { | ||||||
|  | 	pattern = { "grug-far", "ministarter" }, | ||||||
|  | 	callback = function() | ||||||
|  | 		vim.b.minianimate_disable = true | ||||||
|  | 	end, | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | local animate = require("mini.animate") | ||||||
|  | animate.setup({ | ||||||
|  | 	resize = { | ||||||
|  | 		timing = animate.gen_timing.linear({ duration = 50, unit = "total" }), | ||||||
|  | 	}, | ||||||
|  | 	scroll = { | ||||||
|  | 		timing = animate.gen_timing.linear({ duration = 150, unit = "total" }), | ||||||
|  | 		subscroll = animate.gen_subscroll.equal({ | ||||||
|  | 			predicate = function(total_scroll) | ||||||
|  | 				if mouse_scrolled then | ||||||
|  | 					mouse_scrolled = false | ||||||
|  | 					return false | ||||||
|  | 				end | ||||||
|  | 				return total_scroll > 1 | ||||||
|  | 			end, | ||||||
|  | 		}), | ||||||
|  | 	}, | ||||||
|  | }) | ||||||
							
								
								
									
										14
									
								
								.config/nvim/lua/plugins/mini-comment.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								.config/nvim/lua/plugins/mini-comment.lua
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | |||||||
|  | require("mini.comment").setup({ | ||||||
|  | 	options = { | ||||||
|  | 		custom_commentstring = function() | ||||||
|  | 			return require("ts_context_commentstring.internal").calculate_commentstring() or vim.bo.commentstring | ||||||
|  | 		end, | ||||||
|  | 	}, | ||||||
|  |  | ||||||
|  | 	mappings = { | ||||||
|  | 		comment = "<leader>/", | ||||||
|  | 		comment_line = "<leader>/", | ||||||
|  | 		comment_visual = "<leader>/", | ||||||
|  | 		textobject = "<leader>/", | ||||||
|  | 	}, | ||||||
|  | }) | ||||||
							
								
								
									
										3
									
								
								.config/nvim/lua/plugins/mini-pairs.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								.config/nvim/lua/plugins/mini-pairs.lua
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | |||||||
|  | require("mini.pairs").setup({ | ||||||
|  | 	modes = { insert = true, command = true, terminal = false }, | ||||||
|  | }) | ||||||
| @@ -1,9 +1,11 @@ | |||||||
| require("nvim-treesitter.configs").setup({ | require("nvim-treesitter.configs").setup({ | ||||||
| 	ensure_installed = { | 	ensure_installed = { | ||||||
| 		"bash", | 		"bash", | ||||||
|  | 		"comment", | ||||||
| 		"diff", | 		"diff", | ||||||
| 		"go", | 		"go", | ||||||
| 		"gomod", | 		"gomod", | ||||||
|  | 		"gosum", | ||||||
| 		"gowork", | 		"gowork", | ||||||
| 		"java", | 		"java", | ||||||
| 		"javascript", | 		"javascript", | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user