nvim: in-line Markdown rendering
This commit is contained in:
1
.config/nvim/after/ftplugin/markdown.lua
Normal file
1
.config/nvim/after/ftplugin/markdown.lua
Normal file
@@ -0,0 +1 @@
|
||||
vim.opt_local.conceallevel = 2
|
||||
@@ -1,2 +1,3 @@
|
||||
require("config.options")
|
||||
require("config.keymaps")
|
||||
require("config.lazy")
|
||||
|
||||
6
.config/nvim/lazy-lock.json
Normal file
6
.config/nvim/lazy-lock.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"nord.nvim": { "branch": "main", "commit": "87394d4fc35c901bbe38326a78d31ab1ead826b6" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "cf12346a3414fa1b06af75c79faebe7f76df080a" },
|
||||
"render-markdown.nvim": { "branch": "main", "commit": "f422cb5c6855f150e2ddcfaf44e7157b98b34f6a" }
|
||||
}
|
||||
23
.config/nvim/lua/config/lazy.lua
Normal file
23
.config/nvim/lua/config/lazy.lua
Normal 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 },
|
||||
})
|
||||
@@ -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
|
||||
|
||||
12
.config/nvim/lua/plugins/nord.lua
Normal file
12
.config/nvim/lua/plugins/nord.lua
Normal 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,
|
||||
}
|
||||
6
.config/nvim/lua/plugins/render-markdown.lua
Normal file
6
.config/nvim/lua/plugins/render-markdown.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
return {
|
||||
"MeanderingProgrammer/render-markdown.nvim",
|
||||
ft = { "markdown" },
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||
opts = {},
|
||||
}
|
||||
30
.config/nvim/lua/plugins/treesitter.lua
Normal file
30
.config/nvim/lua/plugins/treesitter.lua
Normal 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,
|
||||
}
|
||||
Reference in New Issue
Block a user