markdown preview

This commit is contained in:
RingOfStorms (Joshua Bell) 2023-04-04 02:16:54 -05:00
parent cb237fd8aa
commit 3dfe00f79c
3 changed files with 155 additions and 89 deletions

View file

@ -3,6 +3,7 @@ return {
["<C-d>"] = { "<C-d>zz", desc = "Vertical half page down and center cursor" }, ["<C-d>"] = { "<C-d>zz", desc = "Vertical half page down and center cursor" },
["<C-u>"] = { "<C-u>zz", desc = "Vertical half page up and center cursor" }, ["<C-u>"] = { "<C-u>zz", desc = "Vertical half page up and center cursor" },
["<leader>gf"] = { ":OpenInGHFile <CR>", desc = "Open in github" }, ["<leader>gf"] = { ":OpenInGHFile <CR>", desc = "Open in github" },
["<leader>mp"] = { ":Glow <CR>", desc = "Markdown preview" }
}, },
v = { v = {
["<leader>gf"] = { ":OpenInGHFile <CR>", desc = "Open in github" }, ["<leader>gf"] = { ":OpenInGHFile <CR>", desc = "Open in github" },

View file

@ -1,86 +1,148 @@
return { return {
-- customize alpha options -- customize alpha options
{ {
"goolord/alpha-nvim", "goolord/alpha-nvim",
opts = function(_, opts) -- config = function()
-- customize the dashboard header -- local alpha = require("alpha")
-- opts.section.header.val = { -- local dashboard = require("alpha.themes.dashboard")
-- ".-------. .-./`) ,---. .--. .-_'''-. ,-----. ________ .-'''-. ,---------. ,-----. .-------. ,---. ,---. .-'''-. ", -- require("alpha.term")
-- "| _ _ \\ \\ .-.')| \\ | | '_( )_ \\ .' .-, '. | | / _ \\\\ \\ .' .-, '. | _ _ \\ | \\ / | / _ \\", --
-- "| ( ' ) | / `-' \\| , \\ | ||(_ o _)| ' / ,-.| \\ _ \\ | .----' (`' )/`--' `--. ,---'/ ,-.| \\ _ \\ | ( ' ) | | , \\/ , | (`' )/`--'", -- local header = {
-- "|(_ o _) / `-'`\"`| |\\_ \\| |. (_,_)/___| ; \\ '_ / | :| _|____ (_ o _). | \\ ; \\ '_ / | :|(_ o _) / | |\\_ /| |(_ o _). ", -- type = "terminal",
-- "| (_,_).' __ .---. | _( )_\\ || | .-----.| _`,/ \\ _/ ||_( )_ | (_,_). '. :_ _: | _`,/ \\ _/ || (_,_).' __ | _( )_/ | | (_,_). '. ", -- command = "curl -s https://textart.sh/topic/bonsai/more\\?skip\\=$(if command -v jot >/dev/null 2>&l; then jot -r 1 127; else shuf -i 0-271 -n 1; fi)\\&limit\\=1 | sed -n '/<pre.*$/,/<\\/pre>/p' | sed 's/^.*>//gm'",
-- "| |\\ \\ | || | | (_ o _) |' \\ '- .': ( '\\_/ \\ ;(_ o._)__|.---. \\ : (_I_) : ( '\\_/ \\ ;| |\\ \\ | || (_ o _) | |.---. \\ :", -- width = 180,
-- "| | \\ `' /| | | (_,_)\\ | \\ `-'` | \\ `\"/ \\ ) / |(_,_) \\ `-' | (_(=)_) \\ `\"/ \\ ) / | | \\ `' /| (_,_) | |\\ `-' |", -- height = 80,
-- "| | \\ / | | | | | | \\ / '. \\_/``\".' | | \\ / (_I_) '. \\_/``\".' | | \\ / | | | | \\ / ", -- opts = {
-- "''-' `'-' '---' '--' '--' `'-...-' '-----' '---' `-...-' '---' '-----' ''-' `'-' '--' '--' `-...-' ", -- position = "center",
-- " ██╗ ██████╗ ███████╗██╗ ██╗", -- hl = "String",
-- " ██║██╔═══██╗██╔════╝██║ ██║", -- },
-- " ██║██║ ██║███████╗███████║", -- }
-- " ██ ██║██║ ██║╚════██║██╔══██║", --
-- " ╚█████╔╝╚██████╔╝███████║██║ ██║", -- local buttons = {
-- " ╚════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝", -- type = "group",
-- } -- val = {
-- { type = "text", val = "Joshua Bell :: RingOfStorms", opts = { hl = "SpecialComment", position = "center" } },
opts.section.header.val = { -- { type = "padding", val = 1 },
"", -- dashboard.button("SPC n", " " .. " New File"),
} -- dashboard.button("SPC f f", " " .. " Find File"),
-- dashboard.button("SPC f w", " " .. " Find Word"),
return opts -- -- dashboard.button("SPC q", " " .. " Quit", ":qa<CR>"),
end, -- },
}, -- }
-- You can disable default plugins as follows: --
-- { "max397574/better-escape.nvim", enabled = false }, -- local top_padding = vim.fn.max({ 2, vim.fn.floor(vim.fn.winheight(0) * 0.2) })
-- --
-- You can also easily customize additional setup of plugins that is outside of the plugin's setup call -- local config = {
-- { -- layout = {
-- "L3MON4D3/LuaSnip", -- { type = "padding", val = top_padding },
-- config = function(plugin, opts) -- header,
-- require "plugins.configs.luasnip"(plugin, opts) -- include the default astronvim config that calls the setup call -- { type = "padding", val = 14 },
-- -- add more custom luasnip configuration such as filetype extend or custom snippets -- { type = "padding", val = 2 },
-- local luasnip = require "luasnip" -- buttons,
-- luasnip.filetype_extend("javascript", { "javascriptreact" }) -- },
-- end, -- }
-- }, --
-- { -- alpha.setup(config)
-- "windwp/nvim-autopairs", -- end,
-- config = function(plugin, opts) opts = function(_, opts)
-- require "plugins.configs.nvim-autopairs"(plugin, opts) -- include the default astronvim config that calls the setup call -- customize the dashboard header
-- -- add more custom autopairs configuration such as custom rules opts.section.header.val = {
-- local npairs = require "nvim-autopairs" " ▒▒▒▒▒▒ ",
-- local Rule = require "nvim-autopairs.rule" " ▒▒▓▓▓▓▒▒▒▒▒▒▒▒ ",
-- local cond = require "nvim-autopairs.conds" " ▓▓▒▒▒▒▒▒▒▒░░ ▓▓ ",
-- npairs.add_rules( " ▒▒▓▓▓▓▓▓▓▓▓▓▓▓░░░░ ▒▒▒▒▓▓▒▒▒▒ ",
-- { " ▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░ ▒▒▓▓▓▓▓▓▒▒▒▒▒▒ ",
-- Rule("$", "$", { "tex", "latex" }) " ▓▓▓▓▓▓▓▓▓▓ ██▓▓▓▓▓▓▓▓ ▒▒▒▒ ██ ",
-- -- don't add a pair if the next character is % " ██▓▓▓▓ ▓▓████▓▓▓▓ ▒▒▒▒▒▒▒▒▓▓██▓▓ ▒▒▒▒▒▒ ",
-- :with_pair(cond.not_after_regex "%%") " ██ ██ ▒▒▒▒▒▒░░░░ ▒▒▒▒▒▒ ▓▓▓▓▓▓ ▒▒▒▒▓▓▓▓██▓▓▒▒▒▒██▒▒▒▒▒▒▒▒▒▒ ",
-- -- don't add a pair if the previous character is xxx " ▒▒▒▒▓▓ ▒▒▒▒▓▓▓▓▓▓▓▓▓▓▒▒░░ ░░▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒ ▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒ ██▓▓ ▓▓▓▓▓▓▓▓▒▒▒▒ ▓▓ ▒▒ ",
-- :with_pair( " ▒▒▓▓▓▓██▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░ ▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ░░██▓▓ ██▓▓ ▒▒ ▒▒▒▒▓▓▒▒▒▒▓▓ ▒▒ ▒▒ ",
-- cond.not_before_regex("xxx", 3) " ▒▒▓▓▓▓▓▓██▓▓▓▓▓▓████▓▓▓▓▓▓▓▓▓▓ ▒▒ ▒▒▒▒▒▒▒▒▒▒ ▓▓▓▓▓▓▓▓▓▓██▓▓▓▓██▓▓▓▓▓▓▓▓ ████▓▓▓▓▓▓▒▒ ██▒▒██▒▒▓▓▓▓▒▒▓▓▓▓▒▒▓▓▓▓██▓▓ ",
-- ) " ▓▓▓▓▓▓▓▓██▓▓██ ████ ▓▓▓▓▓▓▓▓ ▒▒▒▒▒▒▒▒▒▒ ▒▒▓▓▒▒ ▒▒▒▒▒▒ ░░██ ▓▓▓▓▓▓▓▓██▓▓ ▓▓██▓▓ ▓▓ ▒▒▒▒▒▒▒▒▒▒▒▒ ██▓▓ ██▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▒▒▓▓▓▓▒▒▓▓",
-- -- don't move right when repeat character " ░░▓▓▓▓░░░░████████░░ ░░▓▓▓▓░░ ░░▒▒▒▒▒▒▒▒░░▒▒▓▓▒▒░░▒▒▒▒░░ ░░██ ▓▓░░▓▓░░░░▓▓ ▓▓░░▓▓▒▒▓▓ ▒▒▓▓▓▓▓▓▓▓▒▒▒▒░░▒▒▓▓░░ ██▓▓▓▓▓▓██▓▓██░░██▓▓▓▓▓▓▒▒▓▓",
-- :with_move(cond.none()) " ░░░░ ░░██▓▓░░ ░░░░ ░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░ ░░██ ▓▓ ▓▓ ▓▓ ░░ ▓▓▓▓░░░░ ░░░░░░░░░░▓▓▓▓▒▒██░░ ░░░░░░ ▒▒░░▓▓▓▓▓▓██░░██▒▒░░▓▓██▓▓▓▓░░",
-- -- don't delete if the next character is xx " ██▓▓ ▒▒ ▒▒▒▒▒▒▒▒ ▓▓▓▓▒▒▒▒▒▒▒▒ ░░ ▓▓ ▓▓ ██ ▓▓▓▓▓▓ ▓▓ ▓▓██▓▓▓▓ ▒▒▒▒▒▒▒▒▒▒ ██░░██ ██▓▓████ ░░ ",
-- :with_del(cond.not_after_regex "xx") " ██▓▓ ░░ ▒▒░░▓▓░░ ▓▓▒▒░░▒▒░░▒▒ ▓▓ ██ ░░ ▒▒▓▓░░▓▓ ▓▓ ░░░░████▒▒▓▓▓▓▓▓▒▒▒▒░░ ░░ ░░ ██▓▓░░░░ ",
-- -- disable adding a newline when you press <cr> " ██▓▓ ▒▒▒▒▒▒ ▓▓ ██▓▓ ██ ██ ████▓▓██ ▓▓ ▓▓▒▒ ████ ",
-- :with_cr(cond.none()), " ▓▓▓▓██▓▓▓▓▓▓ ▓▓▒▒ ▓▓▓▓ ██▓▓ ▓▓▓▓▓▓▓▓██▓▓▓▓▓▓▓▓ ",
-- }, " ████▓▓██████▓▓▓▓████ ▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓██▓▓ ████████▓▓▓▓████████ ██████▓▓████ ██▒▒▓▓▓▓██████▓▓▓▓▒▒██ ",
-- -- disable for .vim files, but it work for another filetypes " ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓ ▓▓▒▒▓▓██████▓▓▓▓▓▓▓▓▒▒██ ▓▓▓▓▓▓▓▓██▓▓▓▓▓▓▓▓▓▓ ▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒██ ",
-- Rule("a", "a", "-vim") " ██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒ ▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒ ██▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ",
-- ) " ▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓▓▒▒▒▒▓▓ ▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓ ██▓▓▒▒▒▒▓▓▒▒▒▒▒▒▒▒▓▓▒▒▒▒▒▒██ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒██ ",
-- end, " ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▒▒▒▒░░░░░░░░░░░░░░░░▓▓ ░░██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██ ▓▓▓▓▓▓▒▒▒▒▒▒▓▓▒▒▒▒▓▓ ░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ",
-- }, " ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ░░████████████████████░░ ██▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░ ░░ ████▓▓▓▓▓▓▓▓▓▓████░░",
-- By adding to the which-key config and using our helper function you can add more which-key registered bindings -- " .-------. .-./`) ,---. .--. .-_'''-. ,-----. ________ .-'''-. ,---------. ,-----. .-------. ,---. ,---. .-'''-. ",
-- { -- " | _ _ \\ \\ .-.')| \\ | | '_( )_ \\ .' .-, '. | | / _ \\\\ \\ .' .-, '. | _ _ \\ | \\ / | / _ \\",
-- "folke/which-key.nvim", -- " | ( ' ) | / `-' \\| , \\ | ||(_ o _)| ' / ,-.| \\ _ \\ | .----' (`' )/`--' `--. ,---'/ ,-.| \\ _ \\ | ( ' ) | | , \\/ , | (`' )/`--'",
-- config = function(plugin, opts) -- " |(_ o _) / `-'`\"`| |\\_ \\| |. (_,_)/___| ; \\ '_ / | :| _|____ (_ o _). | \\ ; \\ '_ / | :|(_ o _) / | |\\_ /| |(_ o _). ",
-- require "plugins.configs.which-key"(plugin, opts) -- include the default astronvim config that calls the setup call -- " | (_,_).' __ .---. | _( )_\\ || | .-----.| _`,/ \\ _/ ||_( )_ | (_,_). '. :_ _: | _`,/ \\ _/ || (_,_).' __ | _( )_/ | | (_,_). '. ",
-- -- Add bindings which show up as group name -- " | |\\ \\ | || | | (_ o _) |' \\ '- .': ( '\\_/ \\ ;(_ o._)__|.---. \\ : (_I_) : ( '\\_/ \\ ;| |\\ \\ | || (_ o _) | |.---. \\ :",
-- local wk = require "which-key" -- " | | \\ `' /| | | (_,_)\\ | \\ `-'` | \\ `\"/ \\ ) / |(_,_) \\ `-' | (_(=)_) \\ `\"/ \\ ) / | | \\ `' /| (_,_) | |\\ `-' |",
-- wk.register({ -- " | | \\ / | | | | | | \\ / '. \\_/``\".' | | \\ / (_I_) '. \\_/``\".' | | \\ / | | | | \\ / ",
-- b = { name = "Buffer" }, -- " ''-' `'-' '---' '--' '--' `'-...-' '-----' '---' `-...-' '---' '-----' ''-' `'-' '--' '--' `-...-' ",
-- }, { mode = "n", prefix = "<leader>" }) "",
-- end, " ██╗ ██████╗ ███████╗██╗ ██╗",
-- }, " ██║██╔═══██╗██╔════╝██║ ██║",
" ██║██║ ██║███████╗███████║",
" ██ ██║██║ ██║╚════██║██╔══██║",
" ╚█████╔╝╚██████╔╝███████║██║ ██║",
" ╚════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝",
}
return opts
end,
},
-- You can disable default plugins as follows:
-- { "max397574/better-escape.nvim", enabled = false },
--
-- You can also easily customize additional setup of plugins that is outside of the plugin's setup call
-- {
-- "L3MON4D3/LuaSnip",
-- config = function(plugin, opts)
-- require "plugins.configs.luasnip"(plugin, opts) -- include the default astronvim config that calls the setup call
-- -- add more custom luasnip configuration such as filetype extend or custom snippets
-- local luasnip = require "luasnip"
-- luasnip.filetype_extend("javascript", { "javascriptreact" })
-- end,
-- },
-- {
-- "windwp/nvim-autopairs",
-- config = function(plugin, opts)
-- require "plugins.configs.nvim-autopairs"(plugin, opts) -- include the default astronvim config that calls the setup call
-- -- add more custom autopairs configuration such as custom rules
-- local npairs = require "nvim-autopairs"
-- local Rule = require "nvim-autopairs.rule"
-- local cond = require "nvim-autopairs.conds"
-- npairs.add_rules(
-- {
-- Rule("$", "$", { "tex", "latex" })
-- -- don't add a pair if the next character is %
-- :with_pair(cond.not_after_regex "%%")
-- -- don't add a pair if the previous character is xxx
-- :with_pair(
-- cond.not_before_regex("xxx", 3)
-- )
-- -- don't move right when repeat character
-- :with_move(cond.none())
-- -- don't delete if the next character is xx
-- :with_del(cond.not_after_regex "xx")
-- -- disable adding a newline when you press <cr>
-- :with_cr(cond.none()),
-- },
-- -- disable for .vim files, but it work for another filetypes
-- Rule("a", "a", "-vim")
-- )
-- end,
-- },
-- By adding to the which-key config and using our helper function you can add more which-key registered bindings
-- {
-- "folke/which-key.nvim",
-- config = function(plugin, opts)
-- require "plugins.configs.which-key"(plugin, opts) -- include the default astronvim config that calls the setup call
-- -- Add bindings which show up as group name
-- local wk = require "which-key"
-- wk.register({
-- b = { name = "Buffer" },
-- }, { mode = "n", prefix = "<leader>" })
-- end,
-- },
} }

View file

@ -22,11 +22,6 @@ return {
{ {
"Pocco81/auto-save.nvim", "Pocco81/auto-save.nvim",
event = "BufEnter", event = "BufEnter",
config = function()
require("auto-save").setup {
-- config
}
end,
}, },
{ {
"Almo7aya/openingh.nvim", "Almo7aya/openingh.nvim",
@ -36,6 +31,14 @@ return {
"gioele/vim-autoswap", "gioele/vim-autoswap",
event = "BufEnter", event = "BufEnter",
}, },
{
"lnc3l0t/glow.nvim",
branch = "advanced_window",
config = {
default_type = "keep"
},
cmd = "Glow"
}
-- { -- {
-- "simrat39/inlay-hints.nvim", -- "simrat39/inlay-hints.nvim",
-- }, -- },