100
100
101
101
function M .setup (options )
102
102
options = options or {}
103
-
104
- for k , v in pairs (options ) do
105
- config .options [k ] = v
106
- end
103
+ config .options = vim .tbl_deep_extend (' force' , config .options , options )
107
104
108
105
vim .api .nvim_create_autocmd ({ " CursorMoved" , " CursorMovedI" }, {
109
106
group = vim .api .nvim_create_augroup (" HoverSplit" , { clear = true }),
@@ -120,28 +117,28 @@ function M.setup(options)
120
117
121
118
vim .keymap .set (
122
119
" n" ,
123
- config .options .key_bindings [ " split_remain_focused" ] ,
120
+ config .options .key_bindings . split_remain_focused ,
124
121
M .split_remain_focused ,
125
122
{ noremap = true , silent = true , desc = ' HoverSplit split (Remain Focused)' }
126
123
)
127
124
128
125
vim .keymap .set (
129
126
" n" ,
130
- config .options .key_bindings [ " vsplit_remain_focused" ] ,
127
+ config .options .key_bindings . vsplit_remain_focused ,
131
128
M .vsplit_remain_focused ,
132
129
{ noremap = true , silent = true , desc = ' HoverSplit vsplit (Remain Focused)' }
133
130
)
134
131
135
132
vim .keymap .set (
136
133
" n" ,
137
- config .options .key_bindings [ " split" ] ,
134
+ config .options .key_bindings . split ,
138
135
M .split ,
139
136
{ noremap = true , silent = true , desc = ' HoverSplit split' }
140
137
)
141
138
142
139
vim .keymap .set (
143
140
" n" ,
144
- config .options .key_bindings [ " vsplit" ] ,
141
+ config .options .key_bindings . vsplit ,
145
142
M .vsplit ,
146
143
{ noremap = true , silent = true , desc = ' HoverSplit vsplit' }
147
144
)
0 commit comments