mirror of
https://github.com/dcarrillo/dotfiles.git
synced 2025-08-20 03:30:22 +00:00
[neovim] Reorganize plugins
This commit is contained in:
@@ -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",
|
||||
|
Reference in New Issue
Block a user