add ui plugins

This commit is contained in:
xfy
2024-09-10 11:50:32 +08:00
parent 144fd87a21
commit c30dc3b36b
8 changed files with 105 additions and 14 deletions

View File

@ -28,6 +28,38 @@ return {
{
"RRethy/vim-illuminate",
event = "BufRead",
opts = {
delay = 200,
large_file_cutoff = 2000,
large_file_overrides = {
providers = { "lsp" },
},
},
config = function(_, opts)
require("illuminate").configure(opts)
local function map(key, dir, buffer)
vim.keymap.set("n", key, function()
require("illuminate")["goto_" .. dir .. "_reference"](false)
end, { desc = dir:sub(1, 1):upper() .. dir:sub(2) .. " Reference", buffer = buffer })
end
map("]]", "next")
map("[[", "prev")
-- also set it after loading ftplugins, since a lot overwrite [[ and ]]
vim.api.nvim_create_autocmd("FileType", {
callback = function()
local buffer = vim.api.nvim_get_current_buf()
map("]]", "next", buffer)
map("[[", "prev", buffer)
end,
})
end,
keys = {
{ "]]", desc = "Next Reference" },
{ "[[", desc = "Prev Reference" },
},
},
{
"NvChad/nvim-colorizer.lua",
@ -37,4 +69,12 @@ return {
},
},
},
{
"lukas-reineke/indent-blankline.nvim",
event = "BufRead",
main = "ibl",
---@module "ibl"
---@type ibl.config
opts = {},
},
}