nvim: in-line Markdown rendering

This commit is contained in:
2026-07-04 18:02:20 -04:00
parent 9a4263ce8b
commit 8fcb6af306
10 changed files with 176 additions and 6 deletions

View File

@@ -0,0 +1,23 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.uv.fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
spec = {
{ import = "plugins" },
},
install = { colorscheme = { "nord" } },
checker = { enabled = false },
})

View File

@@ -15,12 +15,6 @@ opt.expandtab = true
opt.mouse = "a"
-- Neovim's built-in default colors paint their own dark/light background even
-- without a colorscheme; clear it so the terminal's own background shows through.
for _, group in ipairs({ "Normal", "NormalNC", "NormalFloat", "SignColumn" }) do
vim.api.nvim_set_hl(0, group, { bg = "none" })
end
opt.undofile = true
opt.ignorecase = true

View File

@@ -0,0 +1,12 @@
return {
"gbprod/nord.nvim",
lazy = false,
priority = 1000,
opts = {
transparent = true,
},
config = function(_, opts)
require("nord").setup(opts)
vim.cmd.colorscheme("nord")
end,
}

View File

@@ -0,0 +1,6 @@
return {
"MeanderingProgrammer/render-markdown.nvim",
ft = { "markdown" },
dependencies = { "nvim-treesitter/nvim-treesitter" },
opts = {},
}

View File

@@ -0,0 +1,30 @@
return {
"nvim-treesitter/nvim-treesitter",
branch = "master",
build = ":TSUpdate",
opts = {
ensure_installed = {
"markdown",
"markdown_inline",
"lua",
"bash",
"fish",
"rust",
"javascript",
"typescript",
"java",
"kotlin",
"c",
"cpp",
"html",
"css",
"python",
},
auto_install = false,
highlight = { enable = true },
indent = { enable = true },
},
config = function(_, opts)
require("nvim-treesitter.configs").setup(opts)
end,
}