|
1 | 1 | -- Setup nvim-cmp. |
2 | | -local status_ok, npairs = pcall(require, "nvim-autopairs") |
| 2 | +local status_ok, npairs = pcall(require, 'nvim-autopairs') |
3 | 3 | if not status_ok then |
4 | 4 | return |
5 | 5 | end |
6 | 6 |
|
7 | | -npairs.setup { |
| 7 | +npairs.setup({ |
8 | 8 | check_ts = true, |
9 | 9 | ts_config = { |
10 | | - lua = { "string", "source" }, |
11 | | - javascript = { "string", "template_string" }, |
| 10 | + lua = { 'string', 'source' }, |
| 11 | + javascript = { 'string', 'template_string' }, |
12 | 12 | java = false, |
13 | 13 | }, |
14 | | - disable_filetype = { "TelescopePrompt", "spectre_panel" }, |
| 14 | + disable_filetype = { 'TelescopePrompt', 'spectre_panel' }, |
15 | 15 | fast_wrap = { |
16 | | - map = "<M-e>", |
17 | | - chars = { "{", "[", "(", '"', "'" }, |
18 | | - pattern = string.gsub([[ [%'%"%)%>%]%)%}%,] ]], "%s+", ""), |
| 16 | + map = '<M-e>', |
| 17 | + chars = { '{', '[', '(', '"', "'" }, |
| 18 | + pattern = string.gsub([[ [%'%"%)%>%]%)%}%,] ]], '%s+', ''), |
19 | 19 | offset = 0, -- Offset from pattern match |
20 | | - end_key = "$", |
21 | | - keys = "qwertyuiopzxcvbnmasdfghjkl", |
| 20 | + end_key = '$', |
| 21 | + keys = 'qwertyuiopzxcvbnmasdfghjkl', |
22 | 22 | check_comma = true, |
23 | | - highlight = "PmenuSel", |
24 | | - highlight_grey = "LineNr", |
| 23 | + highlight = 'PmenuSel', |
| 24 | + highlight_grey = 'LineNr', |
25 | 25 | }, |
26 | | -} |
| 26 | +}) |
27 | 27 |
|
28 | | -local cmp_autopairs = require "nvim-autopairs.completion.cmp" |
29 | | -local cmp_status_ok, cmp = pcall(require, "cmp") |
| 28 | +local cmp_autopairs = require('nvim-autopairs.completion.cmp') |
| 29 | +local cmp_status_ok, cmp = pcall(require, 'cmp') |
30 | 30 | if not cmp_status_ok then |
31 | 31 | return |
32 | 32 | end |
33 | | -cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done { map_char = { tex = "" } }) |
| 33 | +cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = '' } })) |
0 commit comments