summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-06-06 08:17:31 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-06-06 08:17:31 +0900
commit1432d08d7107abe873c733c64493d69d90364a1d (patch)
tree8fbe52c93ecfdf9c35e5296a7316f170e73f29bb
parent545bd2d72f1e76d8b86611e16b8d2608d0e30f26 (diff)
modified core/autocmds.lua, modified plugins/markdown.lua, modified plugins/sessions.lua, modified plugins/wiki.lua
-rw-r--r--ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua6
-rw-r--r--ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/markdown.lua120
-rw-r--r--ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/sessions.lua2
-rw-r--r--ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/wiki.lua26
4 files changed, 82 insertions, 72 deletions
diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua
index 7ba527f..861128c 100644
--- a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua
+++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua
@@ -290,8 +290,10 @@ vim.api.nvim_create_autocmd("BufWritePost", {
local vimwiki_config = augroup("vimwiki_config")
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
group = vimwiki_config,
- pattern = vim.fn.expand("~/.local/share/vimwiki/index.md"),
- command = "setfiletype vimwiki",
+ pattern = vim.fn.expand("~/.local/share/vimwiki") .. "/**/*.md",
+ callback = function(args)
+ vim.bo[args.buf].filetype = "vimwiki"
+ end,
})
-- Run xrdb whenever Xdefaults or Xresources are updated.
diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/markdown.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/markdown.lua
index cc9e8d8..d7e9db7 100644
--- a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/markdown.lua
+++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/markdown.lua
@@ -128,8 +128,7 @@ end
return {
{
- "meanderingprogrammer/render-markdown.nvim",
- enabled = true,
+ "MeanderingProgrammer/render-markdown.nvim",
-- dependencies = { "nvim-treesitter/nvim-treesitter", "echasnovski/mini.nvim" }, -- if you use the mini.nvim suite
dependencies = { "nvim-treesitter/nvim-treesitter", "echasnovski/mini.icons" }, -- if you use standalone mini plugins
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
@@ -157,6 +156,7 @@ return {
},
file_types = { "markdown", "vimwiki" },
heading = {
+ enabled = true,
sign = false,
icons = { "󰎤 ", "󰎧 ", "󰎪 ", "󰎭 ", "󰎱 ", "󰎳 " },
},
@@ -167,64 +167,64 @@ return {
})
vim.treesitter.language.register("markdown", "vimwiki")
end,
- keys = {
- {
- "<leader>mrt",
- function()
- require("render-markdown").buf_toggle()
- end,
- desc = "Toggle render-markdown",
- },
- {
- "<leader>mre",
- function()
- require("render-markdown").buf_enable()
- end,
- desc = "Enable render-markdown",
- },
- {
- "<leader>mrx",
- function()
- require("render-markdown").buf_disable()
- end,
- desc = "Disable render-markdown",
- },
- {
- "<leader>mr+",
- function()
- require("render-markdown").expand()
- end,
- desc = "Expand conceal margin",
- },
- {
- "<leader>mr-",
- function()
- require("render-markdown").contract()
- end,
- desc = "Contract conceal margin",
- },
- {
- "<leader>mrl",
- function()
- require("render-markdown").log()
- end,
- desc = "Open render-markdown log",
- },
- {
- "<leader>mrc",
- function()
- require("render-markdown").config()
- end,
- desc = "Show render-markdown config diff",
- },
- {
- "<leader>mrd",
- function()
- require("render-markdown").debug()
- end,
- desc = "Debug render-markdown marks",
- },
- },
+ -- keys = {
+ -- {
+ -- "<leader>mrt",
+ -- function()
+ -- require("render-markdown").buf_toggle()
+ -- end,
+ -- desc = "Toggle render-markdown",
+ -- },
+ -- {
+ -- "<leader>mre",
+ -- function()
+ -- require("render-markdown").buf_enable()
+ -- end,
+ -- desc = "Enable render-markdown",
+ -- },
+ -- {
+ -- "<leader>mrx",
+ -- function()
+ -- require("render-markdown").buf_disable()
+ -- end,
+ -- desc = "Disable render-markdown",
+ -- },
+ -- {
+ -- "<leader>mr+",
+ -- function()
+ -- require("render-markdown").expand()
+ -- end,
+ -- desc = "Expand conceal margin",
+ -- },
+ -- {
+ -- "<leader>mr-",
+ -- function()
+ -- require("render-markdown").contract()
+ -- end,
+ -- desc = "Contract conceal margin",
+ -- },
+ -- {
+ -- "<leader>mrl",
+ -- function()
+ -- require("render-markdown").log()
+ -- end,
+ -- desc = "Open render-markdown log",
+ -- },
+ -- {
+ -- "<leader>mrc",
+ -- function()
+ -- require("render-markdown").config()
+ -- end,
+ -- desc = "Show render-markdown config diff",
+ -- },
+ -- {
+ -- "<leader>mrd",
+ -- function()
+ -- require("render-markdown").debug()
+ -- end,
+ -- desc = "Debug render-markdown marks",
+ -- },
+ -- },
},
{
-- Install markdown preview, use npx if available.
diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/sessions.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/sessions.lua
index ab55441..2126196 100644
--- a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/sessions.lua
+++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/sessions.lua
@@ -53,7 +53,7 @@ return {
keys = {
{ "<leader>fs", "<cmd>SessionSearch<CR>", desc = "Session search" },
{ "<leader>ws", "<cmd>SessionSave<CR>", desc = "Save session" },
- { "<leader>wd", "<cmd>SessionDisableAutoSave<CR>", desc = "Disable autosave" },
+ { "<leader>wx", "<cmd>SessionDisableAutoSave<CR>", desc = "Disable autosave" },
{ "<leader>wp", "<cmd>SessionPurgeOrphaned<CR>", desc = "Purge autosave" },
{ "<leader>wa", "<cmd>SessionToggleAutoSave<CR>", desc = "Toggle autosave" },
},
diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/wiki.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/wiki.lua
index f244171..83213ba 100644
--- a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/wiki.lua
+++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/wiki.lua
@@ -9,23 +9,31 @@ return {
{ "<leader>w<leader>", group = "Diary" },
})
- -- Ensure files are read with the desired filetype
- vim.g.vimwiki_ext2syntax = {
- [".Rmd"] = "markdown",
- [".rmd"] = "markdown",
- [".md"] = "markdown",
- [".markdown"] = "markdown",
- [".mdown"] = "markdown",
- }
-
-- Set up Vimwiki list
vim.g.vimwiki_list = {
{
path = vim.fn.expand("~/.local/share/vimwiki"),
+ template_path = vim.fn.expand("~/.local/share/vimwiki/templates"),
+ auto_toc = 1,
syntax = "markdown",
+ nested_syntaxes = {
+ python = "python",
+ ["c++"] = "cpp",
+ },
ext = ".md",
},
}
+
+ vim.g.vimwiki_global_ext = 1
+
+ -- Ensure files are read with the desired filetype
+ vim.g.vimwiki_ext2syntax = {
+ [".Rmd"] = "markdown",
+ [".rmd"] = "markdown",
+ [".md"] = "markdown",
+ [".markdown"] = "markdown",
+ [".mdown"] = "markdown",
+ }
end,
keys = {
{ "<leader>ww", ":VimwikiIndex<CR>", desc = "Vimwiki index" },