about summary refs log tree commit diff
path: root/.config
diff options
context:
space:
mode:
authorvenomade <venomade@venomade.com>2026-02-13 18:09:22 +0000
committervenomade <venomade@venomade.com>2026-02-13 18:09:22 +0000
commit4b8cc0b9a9d92636b5c5b84595e6302900f5dfce (patch)
treef0896b545f01e87c661af2dbf53f80337c06c05e /.config
parent0bd150185551b6d8835d022c15a5f6e832d51113 (diff)
ZK, NVIM and Misc
Add ZK config, template and script.
Add various Neovim plugins, and some markdown specific settings.
Add Neovim aliases.
Fix 100% in alsa luastatus plugin.
Diffstat (limited to '.config')
-rw-r--r--.config/luastatus/alsa.lua12
-rw-r--r--.config/nvim/ftplugin/markdown.lua10
-rw-r--r--.config/nvim/lua/plugins/cmp.lua10
-rw-r--r--.config/nvim/lua/plugins/colorizer.lua15
-rw-r--r--.config/nvim/lua/plugins/image.lua20
-rw-r--r--.config/nvim/lua/plugins/render-markdown.lua114
-rw-r--r--.config/nvim/lua/plugins/ui.lua18
-rw-r--r--.config/nvim/lua/plugins/zk.lua26
-rw-r--r--.config/shell/alias2
-rw-r--r--.config/shell/vars1
-rw-r--r--.config/sway/config2
-rw-r--r--.config/zk/config.toml35
-rw-r--r--.config/zk/templates/note.md6
13 files changed, 260 insertions, 11 deletions
diff --git a/.config/luastatus/alsa.lua b/.config/luastatus/alsa.lua
index fb97270..fc0f13b 100644
--- a/.config/luastatus/alsa.lua
+++ b/.config/luastatus/alsa.lua
@@ -10,8 +10,18 @@ widget = {
         symbol = '󰕿'
       elseif percent >= 70 then
         symbol = '󰕾'
+        if percent >= 99.5 then
+          return {
+            full_text = string.format('%s %d%%', symbol, math.floor(0.5 + percent)),
+            color = '#b7bdf8'
+          }
+        end
       end
-      return { full_text = string.format('%s%3d%%', symbol, math.floor(0.5 + percent)), color = '#b7bdf8' }
+
+      return {
+        full_text = string.format('%s%3d%%', symbol, math.floor(0.5 + percent)),
+        color = '#b7bdf8'
+      }
     end
   end,
   event = [[
diff --git a/.config/nvim/ftplugin/markdown.lua b/.config/nvim/ftplugin/markdown.lua
new file mode 100644
index 0000000..4f658e4
--- /dev/null
+++ b/.config/nvim/ftplugin/markdown.lua
@@ -0,0 +1,10 @@
+vim.keymap.set('n', 'n', 'gj', { buffer = true, noremap = true })
+vim.keymap.set('n', 'e', 'gk', { buffer = true, noremap = true })
+
+vim.opt_local.wrap = true
+vim.opt_local.linebreak = true
+
+vim.opt_local.number = false
+vim.opt_local.relativenumber = false
+
+vim.treesitter.start(vim.api.nvim_get_current_buf(), 'markdown')
diff --git a/.config/nvim/lua/plugins/cmp.lua b/.config/nvim/lua/plugins/cmp.lua
index 541e62c..7728d19 100644
--- a/.config/nvim/lua/plugins/cmp.lua
+++ b/.config/nvim/lua/plugins/cmp.lua
@@ -15,6 +15,8 @@ return {
       -- preselect = cmp.PreselectMode.None,
       completion = {
         completeopt = "menu,menuone,noinsert",
+        callSnippet = "Replace",
+        keywordSnippet = "Replace",
       },
       window = {
         completion = cmp.config.window.bordered({}),
@@ -37,11 +39,11 @@ return {
         },
         {
           { name = 'path' },
-        },
-        {
-          { name = 'buffer' },
-          { name = 'rg',    keyword_length = 3 }
         }
+        -- {
+        --   { name = 'buffer' },
+        --   { name = 'rg',    keyword_length = 3 }
+        -- }
       ),
       formatting = {
         format = lspkind.cmp_format({
diff --git a/.config/nvim/lua/plugins/colorizer.lua b/.config/nvim/lua/plugins/colorizer.lua
new file mode 100644
index 0000000..460eb5c
--- /dev/null
+++ b/.config/nvim/lua/plugins/colorizer.lua
@@ -0,0 +1,15 @@
+return {
+  'norcalli/nvim-colorizer.lua',
+  config = function()
+    require("colorizer").setup({ "*" }, {
+      RGB = true,
+      RRGGBB = true,
+      names = false,
+      RRGGBBAA = true,
+      rgb_fn = true,
+      hsl_fn = true,
+      css = false,
+      css_fn = false,
+    })
+  end
+}
diff --git a/.config/nvim/lua/plugins/image.lua b/.config/nvim/lua/plugins/image.lua
new file mode 100644
index 0000000..32c3540
--- /dev/null
+++ b/.config/nvim/lua/plugins/image.lua
@@ -0,0 +1,20 @@
+return {
+  '3rd/image.nvim',
+  config = function()
+    require("image").setup({
+      backend = "sixel",
+      processor = "magick_cli",
+      integrations = {
+        markdown = {
+          enabled = true,
+          only_render_image_at_cursor = true,
+          only_render_image_at_cursor_mode = "popup", -- or "inline"
+          floating_windows = true,               -- if true, images will be rendered in floating markdown windows
+        },
+      },
+      window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs" },
+      editor_only_render_when_focused = true,                                        -- auto show/hide images when the editor gains/looses focus
+    })
+  end
+
+}
diff --git a/.config/nvim/lua/plugins/render-markdown.lua b/.config/nvim/lua/plugins/render-markdown.lua
index 65408bc..9d52c5b 100644
--- a/.config/nvim/lua/plugins/render-markdown.lua
+++ b/.config/nvim/lua/plugins/render-markdown.lua
@@ -1,7 +1,111 @@
 return {
-    'MeanderingProgrammer/render-markdown.nvim',
-    dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
-    ---@module 'render-markdown'
-    ---@type render.md.UserConfig
-    opts = {},
+  'MeanderingProgrammer/render-markdown.nvim',
+  dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' },
+  config = function()
+    require('render-markdown').setup({
+      link = {
+        enabled = true,
+        render_modes = false,
+        footnote = {
+          enabled = true,
+          superscript = true,
+          prefix = '',
+          suffix = '',
+        },
+        image = '󰥶 ',
+        email = '󰀓 ',
+        hyperlink = '󰌹 ',
+        highlight = 'RenderMarkdownLink',
+        wiki = {
+          icon = '󱗖 ',
+          body = function()
+            return nil
+          end,
+          highlight = 'RenderMarkdownWikiLink',
+        },
+        custom = {
+          web           = { pattern = '^http', icon = '󰖟 ' },
+          github        = { pattern = 'github%.com', icon = '󰊤 ' },
+          stackoverflow = { pattern = 'stackoverflow%.com', icon = '󰓌 ' },
+          wikipedia     = { pattern = 'wikipedia%.org', icon = '󰖬 ' },
+          youtube       = { pattern = 'youtube%.com', icon = '󰗃 ' },
+          reddit        = { pattern = 'reddit%.com', icon = '󰑍 ' },
+          old_reddit    = { pattern = 'old.reddit%.com', icon = '󰑍 ' },
+          gvc           = { pattern = 'git%.venomade%.com', icon = '󰊢 ' },
+          catechism     = { pattern = 'ccc%.directory', icon = '󰅄 ' },
+          bible         = { pattern = 'biblenow%.net', icon = '󰂢 ' },
+          luarocks      = { pattern = 'luarocks%.org', icon = '󰢱 ' },
+        },
+      },
+      callout = {
+        note      = { raw = '[!NOTE]', rendered = '󰋽 Note', highlight = 'RenderMarkdownInfo' },
+        tip       = { raw = '[!TIP]', rendered = '󰌶 Tip', highlight = 'RenderMarkdownSuccess' },
+        important = { raw = '[!IMPORTANT]', rendered = '󰅾 Important', highlight = 'RenderMarkdownHint' },
+        warning   = { raw = '[!WARNING]', rendered = '󰀪 Warning', highlight = 'RenderMarkdownWarn' },
+        caution   = { raw = '[!CAUTION]', rendered = '󰳦 Caution', highlight = 'RenderMarkdownError' },
+        abstract  = { raw = '[!ABSTRACT]', rendered = '󰨸 Abstract', highlight = 'RenderMarkdownInfo' },
+        summary   = { raw = '[!SUMMARY]', rendered = '󰨸 Summary', highlight = 'RenderMarkdownInfo' },
+        tldr      = { raw = '[!TLDR]', rendered = '󰨸 Tldr', highlight = 'RenderMarkdownInfo' },
+        info      = { raw = '[!INFO]', rendered = '󰋽 Info', highlight = 'RenderMarkdownInfo' },
+        todo      = { raw = '[!TODO]', rendered = '󰗡 Todo', highlight = 'RenderMarkdownInfo' },
+        hint      = { raw = '[!HINT]', rendered = '󰌶 Hint', highlight = 'RenderMarkdownSuccess' },
+        success   = { raw = '[!SUCCESS]', rendered = '󰄬 Success', highlight = 'RenderMarkdownSuccess' },
+        check     = { raw = '[!CHECK]', rendered = '󰄬 Check', highlight = 'RenderMarkdownSuccess' },
+        done      = { raw = '[!DONE]', rendered = '󰄬 Done', highlight = 'RenderMarkdownSuccess' },
+        question  = { raw = '[!QUESTION]', rendered = '󰘥 Question', highlight = 'RenderMarkdownWarn' },
+        help      = { raw = '[!HELP]', rendered = '󰘥 Help', highlight = 'RenderMarkdownWarn' },
+        faq       = { raw = '[!FAQ]', rendered = '󰘥 Faq', highlight = 'RenderMarkdownWarn' },
+        attention = { raw = '[!ATTENTION]', rendered = '󰀪 Attention', highlight = 'RenderMarkdownWarn' },
+        failure   = { raw = '[!FAILURE]', rendered = '󰅖 Failure', highlight = 'RenderMarkdownError' },
+        fail      = { raw = '[!FAIL]', rendered = '󰅖 Fail', highlight = 'RenderMarkdownError' },
+        missing   = { raw = '[!MISSING]', rendered = '󰅖 Missing', highlight = 'RenderMarkdownError' },
+        danger    = { raw = '[!DANGER]', rendered = '󱐌 Danger', highlight = 'RenderMarkdownError' },
+        error     = { raw = '[!ERROR]', rendered = '󱐌 Error', highlight = 'RenderMarkdownError' },
+        bug       = { raw = '[!BUG]', rendered = '󰨰 Bug', highlight = 'RenderMarkdownError' },
+        example   = { raw = '[!EXAMPLE]', rendered = '󰉹 Example', highlight = 'RenderMarkdownHint' },
+        quote     = { raw = '[!QUOTE]', rendered = '󱆨 Quote', highlight = 'RenderMarkdownQuote' },
+        cite      = { raw = '[!CITE]', rendered = '󱆨 Cite', highlight = 'RenderMarkdownQuote' },
+      },
+      checkbox = {
+        enabled = true,
+        render_modes = false,
+        bullet = false,
+        right_pad = 1,
+        unchecked = {
+          icon = '󰄱 ',
+          highlight = 'RenderMarkdownUnchecked',
+          scope_highlight = nil,
+        },
+        checked = {
+          icon = '󰱒 ',
+          highlight = 'RenderMarkdownChecked',
+          scope_highlight = nil,
+        },
+        custom = {
+          todo = { raw = '[-]', rendered = '󰥔 ', highlight = 'RenderMarkdownTodo', scope_highlight = nil },
+        },
+      },
+      bullet = {
+        enabled = true,
+        render_modes = false,
+        icons = { '●', '○', '◆', '◇' },
+        ordered_icons = function(ctx)
+          local value = vim.trim(ctx.value)
+          local index = tonumber(value:sub(1, #value - 1))
+          return ('%d.'):format(index > 1 and index or ctx.index)
+        end,
+        left_pad = 0,
+        right_pad = 0,
+        highlight = 'RenderMarkdownBullet',
+        scope_highlight = {},
+      },
+      quote = { icon = '▋' },
+      anti_conceal = {
+        enabled = false,
+      },
+      heading = {
+        width = 'block',
+      }
+    })
+  end
 }
diff --git a/.config/nvim/lua/plugins/ui.lua b/.config/nvim/lua/plugins/ui.lua
new file mode 100644
index 0000000..96e9404
--- /dev/null
+++ b/.config/nvim/lua/plugins/ui.lua
@@ -0,0 +1,18 @@
+return {
+  "OXY2DEV/ui.nvim",
+  lazy = false,
+  config = function()
+    require("ui").setup({
+      cmdline = {
+        enable = true,
+        row_offset = 0,
+      },
+      messages = {
+        enable = true,
+      },
+      popupmenu = {
+        enable = false,
+      },
+    });
+  end,
+};
diff --git a/.config/nvim/lua/plugins/zk.lua b/.config/nvim/lua/plugins/zk.lua
new file mode 100644
index 0000000..ce2e11a
--- /dev/null
+++ b/.config/nvim/lua/plugins/zk.lua
@@ -0,0 +1,26 @@
+return {
+  "zk-org/zk-nvim",
+  lazy = false,
+  config = function()
+    require("zk").setup({
+      picker = "telescope",
+      lsp = {
+        config = {
+          name = "zk",
+          cmd = { "zk", "lsp" },
+          filetypes = { "markdown" },
+        },
+        auto_attach = {
+          enabled = true,
+        },
+      },
+    })
+  end,
+  keys = {
+    { "<leader>zz", "<cmd>ZkNotes<cr>", desc = "Notes" },
+    { "<leader>zl", "<cmd>ZkLinks<cr>", desc = "Links" },
+    { "<leader>zb", "<cmd>ZkBacklinks<cr>", desc = "Backlinks" },
+    { "<leader>zi", "<cmd>ZkInsertLink<cr>", desc = "Insert Link" },
+    { "<leader>zd", "<cmd>ZkCd<cr>", desc = "Enter Directory" },
+  }
+}
diff --git a/.config/shell/alias b/.config/shell/alias
index 627e915..931c115 100644
--- a/.config/shell/alias
+++ b/.config/shell/alias
@@ -7,3 +7,5 @@ alias man='batman'
 alias diff='batdiff'
 alias fzf="fzf --preview 'bat --style=numbers --color=always {}'"
 alias tlbx="toolbox enter"
+alias vi="nvim"
+alias vim="nvim"
diff --git a/.config/shell/vars b/.config/shell/vars
index 2f9c223..974c435 100644
--- a/.config/shell/vars
+++ b/.config/shell/vars
@@ -1 +1,2 @@
 export EDITOR=nvim
+export ZK_NOTEBOOK_DIR=/home/venomade/Documents/Notes
diff --git a/.config/sway/config b/.config/sway/config
index 6747a42..a5d6b0f 100644
--- a/.config/sway/config
+++ b/.config/sway/config
@@ -15,7 +15,7 @@ set $rofi_drun rofi -show drun -show-icons
 # This is a little hacky but I don't know if
 # any other way is possible on wayland.
 set $rofi_cliphist cliphist list \
-                   | rofi -dmenu -p "" \
+                   | rofi -dmenu -i -p "" \
                    | cliphist decode \
                    | wl-copy \
                    && wtype -M ctrl -M shift -k v -m shift -m ctrl
diff --git a/.config/zk/config.toml b/.config/zk/config.toml
new file mode 100644
index 0000000..1e6df92
--- /dev/null
+++ b/.config/zk/config.toml
@@ -0,0 +1,35 @@
+[notebook]
+dir = "~/Documents/Notes"
+
+[note]
+filename = "{{slug title}}"
+template = "note.md"
+
+[extra]
+author = "Venomade"
+
+[format.markdown]
+link-format = "wiki"
+hashtags = true
+colon-tags = false
+multiword-tags = true
+
+[tool]
+editor = "nvim"
+shell = "/bin/bash"
+fzf-preview = "bat -p --color always {-1}"
+
+[alias]
+todo = "zk edit TODO"
+
+push = "git fetch && if [ \"$(git rev-parse @)\" = \"$(git rev-parse @{u})\" ]; then git add -A && git commit -m \"Update: $(date '+%Y-%m-%d %H:%M:%S')\" && git push; else echo \"Local branch is not up‑to‑date with the remote; aborting.\"; fi"
+pull = "git pull"
+history = "git log --pretty=format:\"%s\" | tail -10; echo"
+
+rm = "rm -i $@.md"
+
+[lsp]
+[lsp.diagnostics]
+wiki-title = "hint"
+dead-link = "error"
+missing-backlink = { level = "warning", position = "bottom" }
diff --git a/.config/zk/templates/note.md b/.config/zk/templates/note.md
new file mode 100644
index 0000000..be4c1d2
--- /dev/null
+++ b/.config/zk/templates/note.md
@@ -0,0 +1,6 @@
+---
+title: {{title}}
+tags: []
+---
+
+{{content}}