Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .config/nvim/lua/plugins/accelerated-jk.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-- speeds up vertical navigation with j and k
return {
{
"rhysd/accelerated-jk",
"rainbowhxch/accelerated-jk.nvim",
keys = {
{ "j", "<Plug>(accelerated_jk_gj)" },
{ "k", "<Plug>(accelerated_jk_gk)" },
Expand Down
2 changes: 2 additions & 0 deletions .config/nvim/lua/plugins/conform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ return {
python = { "ruff", "black" },
bash = { "shfmt" },
sh = { "shfmt" },
snakemake = { "snakefmt" },
markdown = { "markdownlint" },
},
formatters = {
shfmt = {
Expand Down
27 changes: 26 additions & 1 deletion .config/nvim/lua/plugins/nvim-tree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,32 @@ return {
-- don't lazy load; otherwise, opening a directory as first buffer doesn't trigger it.
lazy = false,

config = true,
config = function()
require("nvim-tree").setup({
on_attach = function(bufnr)
local api = require("nvim-tree.api")

api.config.mappings.default_on_attach(bufnr)

local function git_add()
local node = api.tree.get_node_under_cursor()
if node and node.absolute_path then
vim.cmd("Git add " .. vim.fn.fnameescape(node.absolute_path))
api.tree.reload()
end
end
local function git_unstage()
local node = api.tree.get_node_under_cursor()
if node and node.absolute_path then
vim.cmd("Git restore --staged " .. vim.fn.fnameescape(node.absolute_path))
api.tree.reload()
end
end
vim.keymap.set("n", "ga", git_add, { buffer = bufnr, desc = "Git Add" })
vim.keymap.set("n", "gu", git_unstage, { buffer = bufnr, desc = "Git Unstage" })
end,
})
end,
keys = {
{ "<leader>fb", "<cmd>NvimTreeToggle<CR>", desc = "[f]ile [b]rowser toggle" },
},
Expand Down
12 changes: 12 additions & 0 deletions .config/nvim/lua/plugins/snakemake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
return {
{
"snakemake/snakemake",
ft = "snakemake",
config = function(plugin)
vim.opt.rtp:append(plugin.dir .. "/misc/vim")
end,
init = function(plugin)
require("lazy.core.loader").ftdetect(plugin.dir .. "/misc/vim")
end,
},
}
12 changes: 12 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
Changelog
=========

2026-01-17
----------

**vim**

- Add snakemake formatter
- Add snakemake filetype plugin
- Add markdown linter
- Use updated accelerated-jk repo
- Support adding files to git from within nvim-tree (:kbd:`ga`) or unstaging (:kbd:`gu`)


2025-11-21
----------

Expand Down
14 changes: 11 additions & 3 deletions docs/nvim-plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ load plugins when they're needed. See :ref:`nvim-lua` for my rationale on that.
Because of how frequently nvim changes, each plugin section below has
a changelog. Since I have reorganized files over the years, the changelogs show
the *mention* of a plugin in a commit message, in a filename, or as part of the
changeset of a commit in an attempt to catch all of the changes. This may be
a little overzealous (for example the ``trouble`` plugin picks up commits
related to troubleshooting) but I've opted to err on the side of completeness.
changeset of a commit. Checking all of these things is an attempt to catch all
of the changes. This may be a little overzealous (for example the ``trouble``
plugin picks up commits related to troubleshooting) but I've opted to err on
the side of completeness.

Plugin list
-----------
Expand Down Expand Up @@ -633,6 +634,13 @@ Other useful things you can do with Telescope:
- Opens file in editor, expands directory to show contents, or collapses
open directory

* - :kbd:`ga` (within browser)
- Add file to git. Useful when you have fugitive also open, and want to
add a file from an as-yet-untracked directory

* - :kbd:`gu` (within browser)
- Unstage file to git. Useful when you have fugitive also open

The window-switching shortcuts :kbd:`<leader>w` and :kbd:`<leader>q` (move to
windows left and right respectively; see :ref:`toggleterm_ref`) also work.

Expand Down