.config/nvim/lua/plugins/editing.lua

changeset 1126
fe77c5eed375
parent 1101
40419d8e3cbb
child 1131
f3044a1658fc
equal deleted inserted replaced
1125:58490a30d6fb 1126:fe77c5eed375
40 end, 40 end,
41 }, 41 },
42 42
43 "tpope/vim-unimpaired", 43 "tpope/vim-unimpaired",
44 "tomtom/tcomment_vim", 44 "tomtom/tcomment_vim",
45 "tpope/vim-endwise", 45
46 {
47 "windwp/nvim-autopairs",
48 event = { "InsertEnter" },
49 config = function (_, _)
50 local npairs = require("nvim-autopairs")
51 npairs.setup({})
52 local Rule = require("nvim-autopairs.rule")
53
54 -- Only run autopairs for opening a multiline block
55 npairs.clear_rules()
56 for _,bracket in pairs { { '(', ')' }, { '[', ']' }, { '{', '}' } } do
57 npairs.add_rules {
58 Rule(bracket[1], bracket[2])
59 :end_wise(function() return true end)
60 }
61 end
62 end,
63 },
64
65 -- "tpope/vim-endwise",
66 -- treesitter-endwise only applies if the parser is installed. do i want to
67 -- worry about a fallback?
68 {
69 "RRethy/nvim-treesitter-endwise",
70 config = function (_,_)
71 require("nvim-treesitter.configs").setup({
72 endwise = { enable = true },
73 })
74 end,
75 },
76
46 "godlygeek/tabular", 77 "godlygeek/tabular",
47 { "mbbill/undotree", cmd = "UndotreeToggle" }, 78 { "mbbill/undotree", cmd = "UndotreeToggle" },
48 79
49 "tpope/vim-vinegar", 80 "tpope/vim-vinegar",
50 "lfv89/vim-interestingwords", 81 "lfv89/vim-interestingwords",

mercurial