-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
matchup.lua
57 lines (46 loc) · 1.28 KB
/
matchup.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
return {
'andymass/vim-matchup',
desc = 'Extends vim\'s % motion to language-specific words.',
config = function(config)
local has_treesitter, treesitterConf = pcall(require, 'nvim-treesitter.configs')
if has_treesitter then
treesitterConf.setup { matchup = { enable = true, disable = config.matchup.disableLangs } }
end
require('match-up').setup(config.matchup.setup)
end,
defaultConfig = {
'matchup',
{
-- The list of supported languages: https://github.com/andymass/vim-matchup/tree/master/after/queries
disableLangs = {}, -- list of language that will be disabled
-- https://github.com/andymass/vim-matchup#options
setup = {
sync = false,
matchparen = {
enabled = 1,
stopline = 400,
timeout = 300,
insert_timeout = 60,
deferred = 0,
deferred_show_delay = 50,
deferred_hide_delay = 700,
hi_surround_always = 0,
},
motion = { enabled = 1, cursor_end = 1, override_Npercent = 6 },
text_obj = {
enabled = 1,
linewise_operators = { 'd', 'y' }, -- enable "di%" to delete, "ya%" to yank
},
surround = { enabled = 1 },
transmute = { enabled = 0 },
delim = { stopline = 1500, noskips = 0 },
},
},
},
highlights = {
MatchParen = {
fg = '#79c0ff',
reverse = true,
},
},
}