Skip to content

Commit

Permalink
fix: only disable autoclose for specific filetypes (ayamir#916)
Browse files Browse the repository at this point in the history
* fix: set autoclose properly for cpp&rust.

Signed-off-by: ayamir <lgt986452565@gmail.com>

* fixup!: clean code.

---------

Signed-off-by: ayamir <lgt986452565@gmail.com>
  • Loading branch information
ayamir authored and singlemancombat committed Jul 31, 2023
1 parent ae07fbc commit ab8d301
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/modules/configs/editor/autoclose.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ return function()
["["] = { escape = false, close = true, pair = "[]" },
["{"] = { escape = false, close = true, pair = "{}" },

[">"] = { escape = true, close = false, pair = "<>" },
[")"] = { escape = true, close = false, pair = "()" },
["]"] = { escape = true, close = false, pair = "[]" },
["}"] = { escape = true, close = false, pair = "{}" },

['"'] = { escape = true, close = true, pair = '""' },
["'"] = { escape = true, close = true, pair = "''" },
["`"] = { escape = true, close = true, pair = "``" },
["'"] = { escape = true, close = true, pair = "''", disabled_filetypes = { "rust" } },
["<"] = { escape = true, close = true, pair = "<>", disabled_filetypes = { "cpp" } },
[">"] = { escape = true, close = true, pair = "<>", disabled_filetypes = { "cpp" } },
},
options = {
disabled_filetypes = { "big_file_disabled_ft" },
Expand Down

0 comments on commit ab8d301

Please sign in to comment.