Skip to content
Open
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
5 changes: 3 additions & 2 deletions chezmoi/dot_config/nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,11 @@ require("lazy").setup({
end
},
{
"ggandor/leap.nvim",
url = "https://codeberg.org/andyg/leap.nvim",
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switching to an unofficial Codeberg fork introduces maintenance and security risks. The fork at https://codeberg.org/andyg/leap.nvim may not receive updates, security patches, or bug fixes that are applied to the original repository. Consider documenting why this specific fork is being used (e.g., what features or fixes does it provide?) and establish a process to track upstream changes. If the fork doesn't provide essential functionality, using the official repository (ggandor/leap.nvim) would be more maintainable and secure.

Suggested change
url = "https://codeberg.org/andyg/leap.nvim",
"ggandor/leap.nvim",

Copilot uses AI. Check for mistakes.
event = "VeryLazy",
config = function()
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The custom keymaps override Vim's built-in s (substitute character) and S (substitute line) commands. While this is intentional for leap.nvim's functionality, users who rely on these built-in commands will lose that functionality. Consider documenting this trade-off or using alternative keys if the built-in commands are important to your workflow. The default leap.nvim mappings make the same choice, so this aligns with plugin conventions, but it's worth being aware of the override.

Suggested change
config = function()
config = function()
-- NOTE: These mappings intentionally override Vim's built-in:
-- - 's' (substitute character) in normal/visual/operator-pending modes
-- - 'S' (substitute line) in normal mode
-- This matches leap.nvim's default keybindings and provides quick motion
-- on 's'/'S'. If you rely on the original substitute commands, you may
-- want to change these keys or rebind the built-ins to alternative keys.

Copilot uses AI. Check for mistakes.
require("leap").add_default_mappings()
vim.keymap.set({'n', 'x', 'o'}, 's', '<Plug>(leap)')
vim.keymap.set('n', 'S', '<Plug>(leap-from-window)')
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The custom keymaps are missing backward leap functionality. The default leap.nvim mappings include both forward (s/S) and backward (x/X) leap motions, but this configuration only maps forward leap motions. Consider adding mappings for <Plug>(leap-backward) to restore backward leap functionality, for example:

vim.keymap.set({'n', 'x', 'o'}, 'x', '<Plug>(leap-backward)')

Additionally, the S mapping now points to <Plug>(leap-from-window) instead of <Plug>(leap-backward) which changes the default behavior. If the intention is to match the default keymaps, S should map to backward leap in normal mode, and the window leap functionality should use a different key.

Suggested change
vim.keymap.set('n', 'S', '<Plug>(leap-from-window)')
vim.keymap.set({'n', 'x', 'o'}, 'x', '<Plug>(leap-backward)')
vim.keymap.set('n', 'S', '<Plug>(leap-backward)')
vim.keymap.set('n', '<leader>lw', '<Plug>(leap-from-window)')

Copilot uses AI. Check for mistakes.
Comment on lines +273 to +274
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The keymaps are missing description fields. The codebase convention is to add { desc = '...' } to keymap definitions for documentation and which-key.nvim integration. For example:

vim.keymap.set({'n', 'x', 'o'}, 's', '<Plug>(leap)', { desc = 'Leap forward' })
vim.keymap.set('n', 'S', '<Plug>(leap-from-window)', { desc = 'Leap from window' })

This improves discoverability and provides inline documentation for users.

Suggested change
vim.keymap.set({'n', 'x', 'o'}, 's', '<Plug>(leap)')
vim.keymap.set('n', 'S', '<Plug>(leap-from-window)')
vim.keymap.set({'n', 'x', 'o'}, 's', '<Plug>(leap)', { desc = 'Leap forward' })
vim.keymap.set('n', 'S', '<Plug>(leap-from-window)', { desc = 'Leap from window' })

Copilot uses AI. Check for mistakes.
end,
},
{
Expand Down
22 changes: 11 additions & 11 deletions devbox.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2357,50 +2357,50 @@
}
},
"neovim@latest": {
"last_modified": "2024-12-30T01:48:12Z",
"resolved": "github:NixOS/nixpkgs/6d97d419e5a9b36e6293887a89a078cf85f5a61b#neovim",
"last_modified": "2025-01-27T09:07:08Z",
"resolved": "github:NixOS/nixpkgs/dd613136ee91f67e5dba3f3f41ac99ae89c5406b#neovim",
"source": "devbox-search",
"version": "0.10.3",
"version": "0.10.4",
"systems": {
"aarch64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/l1qg9fvn9h1jha5i77cg76s2ldl99q53-neovim-0.10.3",
"path": "/nix/store/31im56gkd7nlj8mcsf2xgrq810v21xki-neovim-0.10.4",
"default": true
}
],
"store_path": "/nix/store/l1qg9fvn9h1jha5i77cg76s2ldl99q53-neovim-0.10.3"
"store_path": "/nix/store/31im56gkd7nlj8mcsf2xgrq810v21xki-neovim-0.10.4"
},
"aarch64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/4jsvhlj0519bsflh7h61qibr80hdhrwl-neovim-0.10.3",
"path": "/nix/store/fcaz7zinpnasfpsnnmclbyvc8bk3dd7i-neovim-0.10.4",
"default": true
}
],
"store_path": "/nix/store/4jsvhlj0519bsflh7h61qibr80hdhrwl-neovim-0.10.3"
"store_path": "/nix/store/fcaz7zinpnasfpsnnmclbyvc8bk3dd7i-neovim-0.10.4"
},
"x86_64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/c6v163rc7frrzaacq5im0wrjj9yg6hh0-neovim-0.10.3",
"path": "/nix/store/lpprvj9sk0mwg7hqi35xi47q8jidjz1n-neovim-0.10.4",
"default": true
}
],
"store_path": "/nix/store/c6v163rc7frrzaacq5im0wrjj9yg6hh0-neovim-0.10.3"
"store_path": "/nix/store/lpprvj9sk0mwg7hqi35xi47q8jidjz1n-neovim-0.10.4"
},
"x86_64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/0p4jixf4vckf84vl1v892a2zkl8dgpxr-neovim-0.10.3",
"path": "/nix/store/0l2xfa4bjq79124qir05vcc854bp0c0j-neovim-0.10.4",
"default": true
}
],
"store_path": "/nix/store/0p4jixf4vckf84vl1v892a2zkl8dgpxr-neovim-0.10.3"
"store_path": "/nix/store/0l2xfa4bjq79124qir05vcc854bp0c0j-neovim-0.10.4"
}
}
},
Expand Down