Skip to content

Commit fdae9ec

Browse files
author
Alejandro Baez
committed
init: char_matches changed to auto_pairs
1 parent ad05db3 commit fdae9ec

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

init.lua

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ end
2424

2525
textadept.file_types.extensions.rs = 'rust'
2626
textadept.editing.comment_string.rust = '//'
27-
textadept.editing.char_matches.rust = {
28-
[40] = ')', [91] = ']', [123] = '}', [34] = '"'
29-
}
3027

3128
-- compiler
3229
textadept.run.compile_commands.rust = 'cargo build'
@@ -43,8 +40,12 @@ end
4340
keys.rust = _keys
4441

4542
events.connect(events.LEXER_LOADED, function (lang)
46-
if lang ~= 'rust' then return end
43+
if lang ~= 'rust' then
44+
textadept.editing.auto_pairs[39] = "'" -- re-enable single quote
45+
return
46+
end
4747

48+
textadept.editing.auto_pairs[39] = nil -- single quote
4849
buffer.tab_width = 4
4950
buffer.use_tabs = false
5051
buffer.edge_column = 99

0 commit comments

Comments
 (0)