File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -102,9 +102,7 @@ function keymap.setup(opts)
102
102
end
103
103
104
104
-- handle presets
105
- if type (opts ) == ' string' then
106
- mappings = keymap .get_preset_keymap (opts )
107
- end
105
+ if type (opts ) == ' string' then mappings = keymap .get_preset_keymap (opts ) end
108
106
109
107
-- we set on the buffer directly to avoid buffer-local keymaps (such as from autopairs)
110
108
-- from overriding our mappings. We also use InsertEnter to avoid conflicts with keymaps
@@ -115,6 +113,10 @@ function keymap.setup(opts)
115
113
keymap .apply_keymap_to_current_buffer (mappings )
116
114
end ,
117
115
})
116
+
117
+ if vim .api .nvim_get_mode ().mode == ' i' and not utils .is_blocked_buffer () then
118
+ keymap .apply_keymap_to_current_buffer (mappings )
119
+ end
118
120
end
119
121
120
122
--- Gets the preset keymap for the given preset name
You can’t perform that action at this time.
0 commit comments