File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change 1
1
local terminal = require (" toggleterm.terminal" ).Terminal
2
-
3
- local M = {
4
- settings = {
5
- mapping = " <leader>tt" ,
6
- },
7
- }
2
+ local config = require (" toggleterm.config" )
8
3
9
4
function M .reset ()
10
5
if M ._asyncrun_term ~= nil then
@@ -30,9 +25,6 @@ function M.runner(opts, mapping)
30
25
dir = opts .cwd ,
31
26
close_on_exit = false ,
32
27
hidden = true ,
33
- on_open = function (_ )
34
- vim .cmd (" startinsert!" )
35
- end ,
36
28
})
37
29
38
30
function M ._asyncrun_term_toggle ()
@@ -42,7 +34,7 @@ function M.runner(opts, mapping)
42
34
if not opts .silent then
43
35
M ._asyncrun_term_toggle ()
44
36
end
45
- M ._asyncrun_mapping = mapping or M . settings . mapping
37
+ M ._asyncrun_mapping = mapping or config . get ( " open_mapping " )
46
38
if M ._asyncrun_mapping then
47
39
vim .api .nvim_set_keymap (
48
40
" n" ,
You can’t perform that action at this time.
0 commit comments