astro-nvim-v3 - modified folder structure

This commit is contained in:
huyjaky
2025-01-19 12:00:28 +07:00
parent fe00af8147
commit 3c4feebbcc
21 changed files with 363 additions and 443 deletions

View File

@@ -38,4 +38,126 @@ return {
{ "<Leader>uT", "<Cmd>TransparentToggle<CR>", desc = "Toggle transparent" },
},
},
{
{
"HiPhish/rainbow-delimiters.nvim",
dependencies = {
"nvim-treesitter/nvim-treesitter",
{
"AstroNvim/astrocore",
opts = {
mappings = {
n = {
["<Leader>u("] = {
function()
local bufnr = vim.api.nvim_get_current_buf()
require("rainbow-delimiters").toggle(bufnr)
require("astrocore").notify(
string.format(
"Buffer rainbow delimeters %s",
require("rainbow-delimiters").is_enabled(bufnr) and "on" or "off"
)
)
end,
desc = "Toggle rainbow delimeters (buffer)",
},
},
},
},
},
},
event = "User AstroFile",
main = "rainbow-delimiters.setup",
opts = {},
},
},
{
"folke/todo-comments.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
keywords = {
FIX = {
icon = "", -- icon used for the sign, and in search results
color = "error", -- can be a hex color, or a named color (see below)
alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords
-- signs = false, -- configure signs for some keywords individually
},
TODO = { icon = "", color = "info" },
GOAL = { icon = "", color = "info" },
HACK = { icon = "", color = "warning" },
WARN = { icon = "", color = "warning", alt = { "WARNING", "XXX" } },
PERF = { icon = "", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } },
NOTE = { icon = "", color = "hint", alt = { "INFO" } },
TEST = { icon = "", color = "test", alt = { "TESTING", "PASSED", "FAILED" } },
},
},
},
{
"altermo/ultimate-autopair.nvim",
event = "InsertEnter",
branch = "v0.6", --recommended as each new version will have breaking changes
opts = {
-- disable autopair in the command line: https://github.com/altermo/ultimate-autopair.nvim/issues/8
cmap = false,
extensions = {
cond = {
-- disable in comments
-- https://github.com/altermo/ultimate-autopair.nvim/blob/6fd0d6aa976a97dd6f1bed4d46be1b437613a52f/Q%26A.md?plain=1#L26
cond = {
function(fn) return not fn.in_node "comment" end,
},
},
-- get fly mode working on strings:
-- https://github.com/altermo/ultimate-autopair.nvim/issues/33
fly = {
nofilter = true,
},
},
config_internal_pairs = {
{ '"', '"', fly = true },
{ "'", "'", fly = true },
{ "[", "]", fly = true },
{ "{", "}", fly = true },
{ "(", ")", fly = true },
-- { "<", ">", fly = true },
},
},
dependencies = {
{
"AstroNvim/astrocore",
opts = {
mappings = {
n = {
["<Leader>ua"] = {
desc = "Toggle Ultimate Autopair",
function()
local notify = require("astrocore").notify
local function bool2str(bool) return bool and "on" or "off" end
local ok, ultimate_autopair = pcall(require, "ultimate-autopair")
if ok then
ultimate_autopair.toggle()
vim.g.ultimate_autopair_enabled = require("ultimate-autopair.core").disable
notify(string.format("ultimate-autopair %s", bool2str(not vim.g.ultimate_autopair_enabled)))
else
notify "ultimate-autopair not available"
end
end,
},
},
},
},
},
},
specs = {
{
"windwp/nvim-autopairs",
optional = true,
enabled = false,
},
},
},
}