diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-06-07 10:27:20 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-06-07 10:27:20 +0900 |
| commit | 7ebd222b1de38e827172d7b158a25c7c73684f2f (patch) | |
| tree | 392bb86efbae2f00569a52b70f63a1a4c5655594 | |
| parent | 6d86033c32ce2c1d9a52a5013a83c7f8cbbbf36c (diff) | |
modified core/autocmds.lua, modified plugins/lsp.lua, modified plugins/markdown.lua, modified statusbar/sb-cpubars
4 files changed, 32 insertions, 59 deletions
diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua index 2c33f4f..3f93ae5 100644 --- a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua +++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua @@ -101,6 +101,7 @@ autocmd("FileType", { -- Show LSP diagnostics (inlay hints) in a hover window / popup lamw26wmal vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, { group = augroup("float_diagnostic"), + pattern = "markdown", callback = function() vim.diagnostic.open_float(nil, { focus = false, diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/lsp.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/lsp.lua index b265f5b..2015c47 100644 --- a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/lsp.lua +++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/lsp.lua @@ -327,6 +327,7 @@ return { svelte = { "prettier" }, typescript = { "prettier" }, typescriptreact = { "prettier" }, + vimwiki = { "prettier" }, yaml = { "prettier" }, zsh = { "beautysh" }, }, diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/markdown.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/markdown.lua index d7e9db7..1f935ee 100644 --- a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/markdown.lua +++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/markdown.lua @@ -153,6 +153,10 @@ return { code = { enabled = true, -- disable code rendering for .ipynb files sign = true, + -- Width of the code block background. + -- | block | width of the code block | + -- | full | full width of the window | + width = "block", }, file_types = { "markdown", "vimwiki" }, heading = { @@ -166,65 +170,33 @@ return { end, }) vim.treesitter.language.register("markdown", "vimwiki") + + local opts = { noremap = true, silent = true } + vim.keymap.set("n", "<leader>mrt", function() + require("render-markdown").buf_toggle() + end, vim.tbl_extend("force", opts, { desc = "Toggle render-markdown" })) + vim.keymap.set("n", "<leader>mre", function() + require("render-markdown").buf_enable() + end, vim.tbl_extend("force", opts, { desc = "Enable render-markdown" })) + vim.keymap.set("n", "<leader>mrx", function() + require("render-markdown").buf_disable() + end, vim.tbl_extend("force", opts, { desc = "Disable render-markdown" })) + vim.keymap.set("n", "<leader>mr+", function() + require("render-markdown").expand() + end, vim.tbl_extend("force", opts, { desc = "Expand conceal margin" })) + vim.keymap.set("n", "<leader>mr-", function() + require("render-markdown").contract() + end, vim.tbl_extend("force", opts, { desc = "Contract conceal margin" })) + vim.keymap.set("n", "<leader>mrl", function() + require("render-markdown").log() + end, vim.tbl_extend("force", opts, { desc = "Open render-markdown log" })) + vim.keymap.set("n", "<leader>mrc", function() + require("render-markdown").config() + end, vim.tbl_extend("force", opts, { desc = "Show render-markdown config diff" })) + vim.keymap.set("n", "<leader>mrd", function() + require("render-markdown").debug() + end, vim.tbl_extend("force", opts, { desc = "Debug render-markdown marks" })) 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", - -- }, - -- }, }, { -- Install markdown preview, use npx if available. diff --git a/ar/.local/bin/statusbar/sb-cpubars b/ar/.local/bin/statusbar/sb-cpubars index ce677ef..4b03fa6 100755 --- a/ar/.local/bin/statusbar/sb-cpubars +++ b/ar/.local/bin/statusbar/sb-cpubars @@ -18,7 +18,6 @@ esac stats=$(awk '/cpu[0-9]+/ {printf "%d %d %d\n", substr($1,4), ($2 + $3 + $4 + $5), $5 }' /proc/stat) [ ! -f $cache ] && echo "$stats" >"$cache" old=$(cat "$cache") -printf "🪨" echo "$stats" | while read -r row; do id=${row%% *} rest=${row#* } |
