fix(nvim): Add autopair plugins for formatting lines when autopaired and

cursor goes to next line, deprecated `vim.highlight` to `vim.hl`

- fix: replaced deprecated `vim.highlight.on_yank` to `vim.hl.on_yank`
This commit is contained in:
Pratik Tripathy
2025-07-29 11:38:13 +05:30
parent 22157e682a
commit dbb0df0c4d
2 changed files with 16 additions and 7 deletions

View File

@@ -17,7 +17,7 @@ vim.api.nvim_create_autocmd("TextYankPost", {
desc = "Highlight when yanking text",
group = vim.api.nvim_create_augroup("highlight-yank", { clear = true }),
callback = function()
vim.highlight.on_yank({
vim.hl.on_yank({
higroup = "Visual", -- Highlight group to use
timeout = 400, -- Duration in milliseconds
on_visual = true, -- Highlight visual selections

View File

@@ -1,6 +1,14 @@
return {
{ "tpope/vim-repeat" },
{
"windwp/nvim-autopairs",
event = "InsertEnter",
config = function()
require("nvim-autopairs").setup()
end,
},
-- mini.nvim: Collection of various small independent plugins/modules
{
"echasnovski/mini.nvim",
@@ -289,12 +297,6 @@ return {
-- Treesitter
{
-- nvim-treesitter provides parsers for individual languages
-- Output of these parses are fed to the NVIM's native treesitter(vim.treesitter)
-- What is fed to the native treesitter is essentially the AST
-- This AST is then used for syntax-highlighting and many other operations on the code
-- Hence, this plugin is only to make installing parsers easier
"nvim-treesitter/nvim-treesitter",
lazy = false,
build = ":TSUpdate",
@@ -357,6 +359,13 @@ return {
"jsonc",
"python",
"dockerfile",
"latex",
"norg",
"scss",
"tsx",
"vue",
"svelte",
"typst",
},
auto_install = true,