astro-nvim-v3 - modified layout dap ui

This commit is contained in:
huyjaky
2024-10-31 11:11:55 +07:00
parent e589e54fa3
commit f2237328fe
9 changed files with 136 additions and 44 deletions

View File

@@ -27,7 +27,7 @@ return {
sessions = {
-- Configure auto saving
autosave = {
last = false, -- auto save last session
last = true, -- auto save last session
cwd = false, -- auto save session for each working directory
},
-- Patterns to ignore when saving sessions

View File

@@ -9,7 +9,7 @@ return {
---@type AstroUIOpts
opts = {
-- change colorscheme
colorscheme = "monokai-pro",
colorscheme = "bamboo",
-- AstroUI allows you to easily modify highlight groups easily for any and all colorschemes
highlights = require "plugins.configs.ui.highlights",
-- Icons can be configured throughout the interface

View File

@@ -6,18 +6,10 @@ return {
-- your config goes here
-- or just leave it empty :)
enabled = true, -- start auto-save when the plugin is loaded (i.e. when your package manager loads it)
execution_message = {
enabled = true,
message = function() -- message to print on save
return ("AutoSave: saved at " .. vim.fn.strftime "%H:%M:%S")
end,
dim = 0.18, -- dim the color of `message`
cleaning_interval = 1250, -- (milliseconds) automatically clean MsgArea after displaying `message`. See :h MsgArea
},
trigger_events = { -- See :h events
-- immediate_save = { "BufLeave", "FocusLost" }, -- vim events that trigger an immediate save
defer_save = {"TextChanged" }, -- vim events that trigger a deferred save (saves after `debounce_delay`)
cancel_defered_save = { "InsertEnter" }, -- vim events that cancel a pending deferred save
cancel_deferred_save = { "InsertEnter" }, -- vim events that cancel a pending deferred save
},
-- function that takes the buffer handle and determines whether to save the current buffer or not
-- return true: if buffer is ok to be saved

View File

@@ -88,4 +88,6 @@ return {
},
},
},
{ "ribru17/bamboo.nvim", lazy = true },
}

View File

@@ -16,13 +16,14 @@ return {
{ "lukas-reineke/indent-blankline.nvim", enabled = false },
{ "chipsenkbeil/distant.nvim", enabled = false },
{ "gen740/SmoothCursor.nvim", enabled = false },
{ "stevearc/resession.nvim", enabled = false },
{ "stevearc/resession.nvim", enabled = true },
{ "AstroNvim/astrotheme", enabled = false },
{ "echasnovski/mini.move", enabled = false },
{ "scottmckendry/cyberdream.nvim", enabled = false },
{ "HiPhish/rainbow-delimiters.nvim", enabled = false },
{ "xiyaowong/transparent.nvim", enabled = false },
{ "xiyaowong/transparent.nvim", enabled = true },
{ "MagicDuck/grug-far.nvim", enabled = false },
-- { "hrsh7th/nvim-cmp", enabled = false },
}

View File

@@ -0,0 +1,42 @@
---@type LazySpec
return {
"iamcco/markdown-preview.nvim",
build = function(plugin)
local package_manager = vim.fn.executable "yarn" and "yarn" or vim.fn.executable "npx" and "npx -y yarn" or false
--- HACK: Use `yarn` or `npx` when possible, otherwise throw an error
---@see https://github.com/iamcco/markdown-preview.nvim/issues/690
---@see https://github.com/iamcco/markdown-preview.nvim/issues/695
if not package_manager then error "Missing `yarn` or `npx` in the PATH" end
local cmd = string.format(
"!cd %s && cd app && COREPACK_ENABLE_AUTO_PIN=0 %s install --frozen-lockfile",
plugin.dir,
package_manager
)
vim.cmd(cmd)
end,
ft = { "markdown", "markdown.mdx" },
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
init = function()
local plugin = require("lazy.core.config").spec.plugins["markdown-preview.nvim"]
vim.g.mkdp_filetypes = require("lazy.core.plugin").values(plugin, "ft", true)
end,
dependencies = {
{ "AstroNvim/astroui", opts = { icons = { Markdown = "" } } },
{
"AstroNvim/astrocore",
optional = true,
opts = function(_, opts)
local maps = opts.mappings
local prefix = "<Leader>M"
maps.n[prefix] = { desc = require("astroui").get_icon("Markdown", 1, true) .. "Markdown" }
maps.n[prefix .. "p"] = { "<cmd>MarkdownPreview<cr>", desc = "Preview" }
maps.n[prefix .. "s"] = { "<cmd>MarkdownPreviewStop<cr>", desc = "Stop preview" }
maps.n[prefix .. "t"] = { "<cmd>MarkdownPreviewToggle<cr>", desc = "Toggle preview" }
end,
},
},
}

View File

@@ -2,6 +2,49 @@ return {
"rcarriga/nvim-dap-ui",
requires = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" },
opts = {
eval = true
eval = true,
mappings = {
edit = "e",
expand = { "<CR>", "<2-LeftMouse>" },
open = "o",
remove = "d",
repl = "r",
toggle = "t"
},
layouts = {
{
elements = {
{
id = "repl",
size = 0.5,
},
{
id = "console",
size = 0.5,
},
},
position = "left",
size = 40,
},
{
elements = {
{
id = "scopes",
size = 0.25,
},
{
id = "breakpoints",
size = 0.25,
},
-- {
-- id = "stacks",
-- size = 0.25,
-- },
},
position = "bottom",
size = 20,
},
},
},
}

View File

@@ -0,0 +1,9 @@
return {
"theHamsta/nvim-dap-virtual-text",
event = "User AstroFile",
opts = {
commented = false,
enabled = true,
enabled_commands = true,
},
}