Skip to content

Commit

Permalink
Auto-pair $ with tex
Browse files Browse the repository at this point in the history
  • Loading branch information
Jendker committed Dec 11, 2024
1 parent 99974c0 commit d7b8132
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions stow/common/dot-config/nvim/lua/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,17 @@ local plugins = {
'windwp/nvim-autopairs',
event = "InsertEnter",
opts = {},
config = function(_, opts)
require('nvim-autopairs').setup(opts)
local Rule = require('nvim-autopairs.rule')
local npairs = require('nvim-autopairs')
npairs.add_rule(
Rule("$", "$", "tex")
:with_move(function(args)
return args.next_char == args.char
end)
)
end,
cond = not_vscode
},
{
Expand Down

0 comments on commit d7b8132

Please sign in to comment.