diff --git a/.config/nvim/lua/plugins/img-clip.lua b/.config/nvim/lua/plugins/img-clip.lua new file mode 100644 index 0000000..bd10620 --- /dev/null +++ b/.config/nvim/lua/plugins/img-clip.lua @@ -0,0 +1,12 @@ +return { + "HakonHarnes/img-clip.nvim", + event = "VeryLazy", + opts = { + -- add options here + -- or leave it empty to use the default settings + }, + keys = { + -- suggested keymap + { "P", "PasteImage", desc = "Paste image from system clipboard" }, + }, +} diff --git a/.config/nvim/lua/plugins/render-markdown.lua b/.config/nvim/lua/plugins/render-markdown.lua index f2494d7..d848878 100644 --- a/.config/nvim/lua/plugins/render-markdown.lua +++ b/.config/nvim/lua/plugins/render-markdown.lua @@ -3,6 +3,8 @@ return { { "MeanderingProgrammer/render-markdown.nvim", dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" }, + lazy = true, + ft = "markdown", opts = { heading = { @@ -11,11 +13,14 @@ return { -- don't replace ### with icons icons = {}, + foreground = "none", + backgrounds = { "none", "none", "none", "none", "none", "none" }, }, code = { -- don't add a sign column indicator sign = false, + border = "thick", }, bullet = { @@ -31,8 +36,8 @@ return { }, }, checkbox = { - checked = { icon = "✓" } - } + checked = { icon = "✓" }, + }, }, }, } diff --git a/.config/nvim/lua/plugins/treesj.lua b/.config/nvim/lua/plugins/treesj.lua index ec2a720..46aa5a1 100644 --- a/.config/nvim/lua/plugins/treesj.lua +++ b/.config/nvim/lua/plugins/treesj.lua @@ -1,7 +1,7 @@ -- treesj splits and joins nodes return { 'Wansmer/treesj', - lazy = false, + keys = {'j'}, dependencies = { 'nvim-treesitter/nvim-treesitter' }, config = function() require('treesj').setup({ diff --git a/docs/bash.rst b/docs/bash.rst index abae1f5..abbc1aa 100644 --- a/docs/bash.rst +++ b/docs/bash.rst @@ -103,20 +103,20 @@ for the commands set for each alias. - faster way of moving up a directory * - ``gsv`` - - Opens vim and runs vim-fugitive. See :ref:`vimfugitive` for details. + - Opens vim and runs vim-fugitive. See :ref:`vimfugitive_ref` for details. * - ``glv`` - - Opens vim and runs diffview for browsing git history. See :ref:`diffview` + - Opens vim and runs diffview for browsing git history. See :ref:`diffview_ref` for details. * - ``s`` - Runs the start_agent function (see :file:`.functions` below) * - ``st`` - - If you connect to a host with SSH key forwarding, start a tmux session, - and then disconnect and reconnect to the remote tmux session, the - ``SSH_AUTH_SOCKET`` path used by tmux is stale, preventing key forwarding. - This refreshes the path so that key forwarding works. + - If you connect to a host with SSH key forwarding, start a tmux session, + and then disconnect and reconnect to the remote tmux session, the + ``SSH_AUTH_SOCKET`` path used by tmux is stale, preventing key forwarding. + This refreshes the path so that key forwarding works. * - ``git-clean-branches-master`` - Deletes any git branches that have been merged into the master branch diff --git a/docs/changelog.rst b/docs/changelog.rst index a0bc08b..dc6ef7f 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1,6 +1,26 @@ Changelog ========= +2026-01-28 +---------- + +**vim** + +- Add the `img-clip.nvim `__ + plugin to paste images from the clipboard into a file and add a link to the + markdown/latex/restructuredtext file you're editing + +2026-01-27 +---------- + +**setup** + +- Pin tmux to 3.5. The current :file:`.tmux.conf` is not updated yet to work with 3.6. + +**vim** + +- Add linter and LSP config for Ansible yaml files + 2026-01-17 ---------- diff --git a/docs/nvim-plugins.rst b/docs/nvim-plugins.rst index d74c3f4..cbf233b 100644 --- a/docs/nvim-plugins.rst +++ b/docs/nvim-plugins.rst @@ -1480,6 +1480,36 @@ and this: .. plugin-metadata:: :name: treesj +.. _imgclip_ref: + +``img-clip.nvim`` +~~~~~~~~~~~~~~~~~ + +`img-clip.nvim `__ lets you paste +an image on your clipboard into a Markdown, Latex, or ReST file. + +It detects what sort of image is on the clipboard, pastes it into a file in the +current directory (that you name at the prompt), and inserts it as an image +link into the document. + +On Mac, it needs `pngpaste `__ to be +installed and on your PATH. + +.. list-table:: + :header-rows: 1 + :align: left + + * - command + - description + + * - :kbd:`P` + - Paste image on clipboard + +.. plugin-metadata:: + :name: img-clip + +.. colorschemes_ref: + Colorschemes ------------ diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst index 469b161..78e6794 100644 --- a/docs/troubleshooting.rst +++ b/docs/troubleshooting.rst @@ -6,7 +6,7 @@ Updating nvim plugins In nvim, run ``:Lazy``. In the interface, use :kbd:`U` to update plugins. Use :kbd:`X` to clean up any other plugins. Run ``:Mason`` to select language -server protocols (more info at :ref:`mason`). +server protocols (more info at :ref:`mason_ref`). You can optionally remove your :file:`~/.local/share/nvim` directory, which will completely clean out any old plugins; you'll need to let lazy.nvim @@ -86,5 +86,5 @@ You may get an error like this when opening nvim: .... This happens because nvim is trying to install the treesitter parsers, but that -needs a compiler to be available. See :ref:`treesitter` for details on how to +needs a compiler to be available. See :ref:`treesitter_ref` for details on how to address this. diff --git a/docs/vim.rst b/docs/vim.rst index 6066c19..8bac134 100644 --- a/docs/vim.rst +++ b/docs/vim.rst @@ -120,7 +120,7 @@ Opening multiple files - Search for file in directory to open in new buffer (Telescope) * - :kbd:`fb` - - Toggle file browser, hit Enter on file (see :ref:`neotree` for more) + - Toggle file browser, hit Enter on file Switching between open files @@ -152,8 +152,8 @@ Switching between open files .. details:: Don't like this? - See the config for the :ref:`bufferline` plugin to change; the bufferline is - additionally styled using the :ref:`zenburn` plugin/colorscheme. + See the config for the :ref:`bufferline_ref` plugin to change; the + bufferline is additionally styled using the colorscheme. .. details:: Screencast of switching buffers @@ -173,7 +173,7 @@ You can browse around to see if there's anything you think might be useful, but there's no need for you to know all these! I happen to use them, and since I've included them in this config you get them for free. -The :ref:`whichkey` plugin will pop up a window showing what keys you can +The :ref:`whichkey_ref` plugin will pop up a window showing what keys you can press, so you can use that for exploration as well.