summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Vanbesien <tvanbesi@proton.me>2026-06-13 00:28:08 +0200
committerThomas Vanbesien <tvanbesi@proton.me>2026-06-13 00:40:07 +0200
commitcf8ceeb3210cd446533b798b22f0f5eada954207 (patch)
treec4c8519377850ceb7244ec300699d0f6789230ad
parent036db1dd17978719d31179550622339afde76c60 (diff)
downloaddotfiles-cf8ceeb3210cd446533b798b22f0f5eada954207.tar.gz
dotfiles-cf8ceeb3210cd446533b798b22f0f5eada954207.zip
docs(nvim): edit comments
-rw-r--r--.config/nvim/plugin/00-plugin.lua2
-rw-r--r--.config/nvim/plugin/50-autopairs.lua7
-rw-r--r--.config/nvim/plugin/50-extmarks.lua3
-rw-r--r--.config/nvim/plugin/50-format.lua2
-rw-r--r--.config/nvim/plugin/50-ftdetect.lua4
-rw-r--r--.config/nvim/plugin/50-fzf.lua24
6 files changed, 26 insertions, 16 deletions
diff --git a/.config/nvim/plugin/00-plugin.lua b/.config/nvim/plugin/00-plugin.lua
index 584fe8e..47588c4 100644
--- a/.config/nvim/plugin/00-plugin.lua
+++ b/.config/nvim/plugin/00-plugin.lua
@@ -1,7 +1,7 @@
--
-- 00-plugin.lua
--
--- Installs third-party plugins.
+-- * Installs third-party plugins.
--
vim.pack.add({
diff --git a/.config/nvim/plugin/50-autopairs.lua b/.config/nvim/plugin/50-autopairs.lua
index 5f976db..25dd8f7 100644
--- a/.config/nvim/plugin/50-autopairs.lua
+++ b/.config/nvim/plugin/50-autopairs.lua
@@ -1,14 +1,13 @@
--
--- Autopairs configuration (inserting matching delimiters while inserting)
+-- 50-autopairs.lua
+--
+-- * Add autopairs for markdown (`**` and `~~`)
--
--- See https://github.com/windwp/nvim-autopairs
local Rule = require("nvim-autopairs.rule")
local npairs = require("nvim-autopairs")
local cond = require("nvim-autopairs.conds")
-
npairs.setup()
-
npairs.add_rules({
Rule("*", "*", "markdown"):with_cr(cond.none()),
Rule("~", "~", "markdown"):with_cr(cond.none()),
diff --git a/.config/nvim/plugin/50-extmarks.lua b/.config/nvim/plugin/50-extmarks.lua
index 50ba81d..c9e9eaa 100644
--- a/.config/nvim/plugin/50-extmarks.lua
+++ b/.config/nvim/plugin/50-extmarks.lua
@@ -3,7 +3,8 @@
--
-- * Creates a global highlight namespace for extended marks.
-- * Keeps track of the current global highlight namespace in `vim.g.hl_ns`.
--- * Creates an autocommand that initializes and updates extended marks.
+-- * Creates an autocommand that initializes and updates extended marks when 'background' or the
+-- color scheme change.
-- For now, only "TODO" strings are marked but the system can be easily extended by adding items
-- in `marks`.
-- Doesn't support multi-line patterns.
diff --git a/.config/nvim/plugin/50-format.lua b/.config/nvim/plugin/50-format.lua
index b471e1b..e021227 100644
--- a/.config/nvim/plugin/50-format.lua
+++ b/.config/nvim/plugin/50-format.lua
@@ -2,7 +2,7 @@
-- 50-format.lua
--
-- * Specifies the formatters to use for different file types.
--- * Sets up an autocommand to format on 'BufWritePre'.
+-- * Creates an autocommand to format on 'BufWritePre'.
--
-- User commands:
-- FormatToggle: toggle formatting on write for the current buffer
diff --git a/.config/nvim/plugin/50-ftdetect.lua b/.config/nvim/plugin/50-ftdetect.lua
index 49fc6d6..b824d4d 100644
--- a/.config/nvim/plugin/50-ftdetect.lua
+++ b/.config/nvim/plugin/50-ftdetect.lua
@@ -1,5 +1,7 @@
--
--- Filetype detection plugin
+-- 50-ftdetect.lua
+--
+-- * Detects bash files and sets 'filetype'.
--
-- Detect bash files
diff --git a/.config/nvim/plugin/50-fzf.lua b/.config/nvim/plugin/50-fzf.lua
index e0c4ce3..e57d95a 100644
--- a/.config/nvim/plugin/50-fzf.lua
+++ b/.config/nvim/plugin/50-fzf.lua
@@ -1,7 +1,14 @@
--
--- Fuzzy finder configuration (files, grep, buffers, help)
+-- 50-fzf.lua
--
--- See https://github.com/ibhagwan/fzf-lua
+-- * Configures fzf.
+--
+-- Keymaps:
+-- `<Leader>ff`: File picker
+-- `<Leader>fg`: Grep picker
+-- `<Leader>fb`: Buffer picker
+-- `<Leader>fh`: Help tag picker
+-- `<Leader>fr`: Resume last picker
-- Avoid conflicts with the already existing fzf configuration at ~/.config/fzf/fzf.bash
vim.env.FZF_DEFAULT_OPTS = nil
@@ -32,20 +39,19 @@ fzf.setup({
keymap = {
fzf = {
true, -- inherit defaults
- ["tab"] = "down", -- navigate instead of fzf's default toggle
+ ["tab"] = "down",
["btab"] = "up",
- ["ctrl-y"] = "toggle", -- multi-select toggle (tab no longer does it)
+ ["ctrl-y"] = "toggle",
},
builtin = {
true, -- inherit defaults
- ["<M-/>"] = "toggle-preview", -- show/hide preview
- ["<C-n>"] = "preview-half-page-down", -- scroll preview (Ctrl-j/k navigate)
+ ["<M-/>"] = "toggle-preview",
+ ["<C-n>"] = "preview-half-page-down",
["<C-p>"] = "preview-half-page-up",
},
},
actions = {
- files = { true, ["alt-y"] = copy_to_clipboard }, -- files + live_grep
- buffers = { true, ["alt-y"] = copy_to_clipboard },
+ files = { true, ["alt-y"] = copy_to_clipboard },
},
-- Sticky footer of keybinding hints, like --footer in ~/.config/fzf/fzf.bash.
fzf_opts = {
@@ -57,6 +63,8 @@ fzf.setup({
},
})
+----------------------------------------------------------------------------------------------------
+
vim.keymap.set("n", "<Leader>ff", fzf.files, { desc = "Fuzzy-find files" })
vim.keymap.set("n", "<Leader>fg", fzf.live_grep, { desc = "Fuzzy-find files content" })
vim.keymap.set("n", "<Leader>fb", fzf.buffers, { desc = "Fuzzy-find buffers" })