is0n/jaq-nvim

Internal commands don't work

trimclain opened this issue · 4 comments

In my config I defined cmds.internal.lua = "luafile %", as shown in Example Lua Config. Everytime I try to run a luafile, the Error: Invalid command pops up. Same thing happens with every other filetype I define in internal commands.

is0n commented

Try running :Jaq internal.

The error is most likely because :Jaq by itself is trying to use the behavior.default option (which is float by default).

I see, thanks.
Since types float, terminal, bang and quickfix work only for external commands, what do you think about making :Jaq to use behavior.default only for external commands? So that it's possible to have only one keymap defined to ":Jaq<CR>", which would work for every filetype defined in commands.

I implemented my ideas in #19. Let me know what you think.

is0n commented

Looks amazing! Feel free to close the issue if you feel that #19 resolved it :)