diff --git a/nvim/lua/plugins/diagram.lua b/nvim/lua/plugins/diagram.lua new file mode 100644 index 0000000..237fba4 --- /dev/null +++ b/nvim/lua/plugins/diagram.lua @@ -0,0 +1,38 @@ +return { + "3rd/diagram.nvim", + event = 'BufEnter', + opts = { -- you can just pass {}, defaults below + events = { + render_buffer = { "InsertLeave", "BufWinEnter", "TextChanged" }, + clear_buffer = {"BufLeave"}, + }, + renderer_options = { + mermaid = { + background = "transparent", -- nil | "transparent" | "white" | "#hex" + theme = "dark", -- nil | "default" | "dark" | "forest" | "neutral" + scale = 1, -- nil | 1 (default) | 2 | 3 | ... + width = nil, -- nil | 800 | 400 | ... + height = nil, -- nil | 600 | 300 | ... + cli_args = nil, -- nil | { "--no-sandbox" } | { "-p", "/path/to/puppeteer" } | ... + }, + plantuml = { + charset = nil, + cli_args = nil, -- nil | { "-Djava.awt.headless=true" } | ... + }, + d2 = { + theme_id = nil, + dark_theme_id = nil, + scale = nil, + layout = nil, + sketch = nil, + cli_args = nil, -- nil | { "--pad", "0" } | ... + }, + gnuplot = { + size = nil, -- nil | "800,600" | ... + font = nil, -- nil | "Arial,12" | ... + theme = nil, -- nil | "light" | "dark" | custom theme string + cli_args = nil, -- nil | { "-p" } | { "-c", "config.plt" } | ... + }, + }, + }, +} diff --git a/nvim/lua/plugins/dynomark.lua b/nvim/lua/plugins/dynomark.lua new file mode 100644 index 0000000..a4ebea9 --- /dev/null +++ b/nvim/lua/plugins/dynomark.lua @@ -0,0 +1,20 @@ +return {{ + "k-lar/dynomark.nvim", + dependencies = "nvim-treesitter/nvim-treesitter", + event = 'BufEnter', + opts = { -- Default values + remap_arrows = false, + results_view_location = "vertical", -- Can be "float", "tab", "vertical" or "horizontal" + + -- This is only used when results_view_location is "float" + -- By default the window is placed in the upper right of the window + -- If you want to have the window centered, set both offsets to 0.0 + float_horizontal_offset = 0.2, + float_vertical_offset = 0.2, + + -- Turn this to true if you want the plugin to automatically download + -- the dynomark engine if it's not found in your PATH. + -- This is false by default! + auto_download = true, + }, +}} diff --git a/nvim/lua/plugins/image.lua b/nvim/lua/plugins/image.lua index 82ce983..2fb99de 100644 --- a/nvim/lua/plugins/image.lua +++ b/nvim/lua/plugins/image.lua @@ -1,6 +1,6 @@ return { "3rd/image.nvim", - -- event = 'BufEnter', + event = 'BufEnter', build = false, -- so that it doesn't build the rock https://github.com/3rd/image.nvim/issues/91#issuecomment-2453430239 config = function() require("image").setup({ @@ -11,7 +11,7 @@ return { enabled = true, clear_in_insert_mode = true, download_remote_images = true, - only_render_image_at_cursor = false, + only_render_image_at_cursor = true, only_render_image_at_cursor_mode = "popup", floating_windows = false, -- if true, images will be rendered in floating markdown windows filetypes = { "markdown", "vimwiki" }, -- markdown extensions (ie. quarto) can go here diff --git a/nvim/lua/plugins/zk.lua b/nvim/lua/plugins/zk.lua new file mode 100644 index 0000000..1885ff8 --- /dev/null +++ b/nvim/lua/plugins/zk.lua @@ -0,0 +1,27 @@ +return { + "zk-org/zk-nvim", + event = 'BufEnter', + config = function() + require("zk").setup({ + -- Can be "telescope", "fzf", "fzf_lua", "minipick", "snacks_picker", + -- or select" (`vim.ui.select`). + picker = "telescope", + + lsp = { + -- `config` is passed to `vim.lsp.start(config)` + config = { + name = "zk", + cmd = { "zk", "lsp" }, + filetypes = { "markdown" }, + -- on_attach = ... + -- etc, see `:h vim.lsp.start()` + }, + + -- automatically attach buffers in a zk notebook that match the given filetypes + auto_attach = { + enabled = true, + }, + }, + }) + end, +}