mirror of
https://github.com/dcarrillo/dotfiles.git
synced 2025-02-20 18:38:00 +00:00
[neovim] Reorganize plugins
This commit is contained in:
parent
998d80ceb6
commit
2059c85c13
@ -135,6 +135,8 @@ keymap({ "n", "v" }, "<leader>lf", function()
|
||||
require("conform").format({ async = true, lsp_fallback = true })
|
||||
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
|
||||
keymap(
|
||||
"n",
|
||||
@ -216,20 +218,6 @@ keymap(
|
||||
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
|
||||
keymap(
|
||||
"n",
|
||||
|
@ -87,11 +87,13 @@ require("lazy").setup({
|
||||
|
||||
-- Plugins
|
||||
{ "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.animate", version = "*" },
|
||||
{ "windwp/nvim-autopairs" },
|
||||
{ "numToStr/Comment.nvim" },
|
||||
{ "JoosepAlviste/nvim-ts-context-commentstring" },
|
||||
{ "JoosepAlviste/nvim-ts-context-commentstring", lazy = true, opts = {
|
||||
enable_autocmd = false,
|
||||
} },
|
||||
{ "nvim-tree/nvim-web-devicons", lazy = true },
|
||||
{ "akinsho/bufferline.nvim", event = "VeryLazy", version = "v4.*" },
|
||||
{ "moll/vim-bbye" },
|
||||
@ -161,6 +163,7 @@ require("lazy").setup({
|
||||
event = { "BufWritePre" },
|
||||
cmd = { "ConformInfo" },
|
||||
},
|
||||
{ "hedyhli/outline.nvim", opts = {} },
|
||||
|
||||
-- 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.avante")
|
||||
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.autopairs")
|
||||
require("plugins.comment")
|
||||
require("plugins.gitsigns")
|
||||
require("plugins.neo-tree")
|
||||
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({
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"comment",
|
||||
"diff",
|
||||
"go",
|
||||
"gomod",
|
||||
"gosum",
|
||||
"gowork",
|
||||
"java",
|
||||
"javascript",
|
||||
|
Loading…
x
Reference in New Issue
Block a user