chore(neovim): Better comments

This commit is contained in:
Pratik Tripathy
2025-07-28 11:11:13 +05:30
parent 39efa2af1f
commit 1baff14c5a
2 changed files with 34 additions and 34 deletions

View File

@@ -32,43 +32,43 @@ return {
"echasnovski/mini.nvim", "echasnovski/mini.nvim",
version = false, version = false,
config = function() config = function()
-- va) - [V]isually select [A]round [)]paren
-- - a) would implicitly select around another ), based on some predefined logic
-- ci' - [C]hange [I]nside [']quote
-- via - [a]rguments
-- vif - [f]unction calls
-- va_ - Select around "_"
-- va1 - Select around two "1"
--
-- Explicit Covering Region:
-- vinq - Select [I]nside [N]ext [Q]uote
-- vilb - Select Inside Last Bracket
-- cina - Change next function argument
-- cila - Change last function argument
require("mini.ai").setup({ n_lines = 500 })
-- mini.surround
-- Functionality similar to tpope's vim-surround
require("mini.surround").setup({
mappings = {
add = "ys", -- Add surrounding in Normal and Visual modes
delete = "ds", -- Delete surrounding
find = "yf", -- Find surrounding (to the right)
find_left = "yF", -- Find surrounding (to the left)
highlight = "yh", -- Highlight surrounding
replace = "cs", -- Replace surrounding
update_n_lines = "", -- Update `n_lines`
},
n_lines = 20,
search_method = "cover_or_next",
})
-- gc -- gc
require("mini.comment").setup() require("mini.comment").setup()
require("mini.pairs").setup() require("mini.pairs").setup()
-- Configure mini.indentscope -- mini.ai
-- va) - [v]isually select [a]round [)]paren
-- - a) would implicitly select around another ), based on some predefined logic
-- ci' - [c]hange [i]nside [']quote
-- via - [a]rguments
-- vif - [f]unction calls
-- va_ - select around "_"
-- va1 - select around two "1"
--
-- explicit covering region:
-- vinq - select [i]nside [n]ext [q]uote
-- vilb - select inside last bracket
-- cina - change next function argument
-- cila - change last function argument
require("mini.ai").setup({ n_lines = 500 })
-- mini.surround
-- functionality similar to tpope's vim-surround
require("mini.surround").setup({
mappings = {
add = "ys", -- add surrounding in normal and visual modes
delete = "ds", -- delete surrounding
find = "yf", -- find surrounding (to the right)
find_left = "yf", -- find surrounding (to the left)
highlight = "yh", -- highlight surrounding
replace = "cs", -- replace surrounding
update_n_lines = "", -- update `n_lines`
},
silent = true,
})
-- configure mini.indentscope
if require("config.util").is_not_vscode() then if require("config.util").is_not_vscode() then
require("mini.indentscope").setup({ require("mini.indentscope").setup({
delay = 100, delay = 100,

View File

@@ -3,7 +3,7 @@ return {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
cond = require("config.util").is_not_vscode(), cond = require("config.util").is_not_vscode(),
dependencies = { dependencies = {
{ "williamboman/mason.nvim", config = true }, -- NOTE: Must be loaded before dependants { "williamboman/mason.nvim", config = true }, -- TIP: Must be loaded before dependants
"williamboman/mason-lspconfig.nvim", "williamboman/mason-lspconfig.nvim",
"WhoIsSethDaniel/mason-tool-installer.nvim", "WhoIsSethDaniel/mason-tool-installer.nvim",
"saghen/blink.cmp", "saghen/blink.cmp",
@@ -12,7 +12,7 @@ return {
local servers = {} local servers = {}
local capabilities = vim.lsp.protocol.make_client_capabilities() local capabilities = vim.lsp.protocol.make_client_capabilities()
-- NOTE: `nvim-lspconfig` has default LSP configs in its DB which saves time -- TIP: `nvim-lspconfig` has default LSP configs in its DB which saves time
-- Useful even after NeoVim 0.11, which made LSP setup much easier -- Useful even after NeoVim 0.11, which made LSP setup much easier
-- Configs in `nvim/lsp/*` are APPENDED to each LSP setup here -- Configs in `nvim/lsp/*` are APPENDED to each LSP setup here
require("mason-lspconfig").setup({ require("mason-lspconfig").setup({