Don't close window on exit
kobzar opened this issue · 4 comments
kobzar commented
neovim 7.2
OS: mac OS
shell: fisf/bash/sh
Jaq settings: default
When i run the code by :Jaq i see the results, next i push Esc to close the widow but get error
^N:lua vim.api.nvim_win_close(1005, true) │
▎ 6 │┬─[kobzar@Kobzar:~/D/zerg]─[10:59:16]─[G:main=] │n
▎ 7 │╰─>$ :lua vim.api.nvim_win_close(1005, true) │
▎ 8 mus│fish: Unknown command: 1005, │
▎ 9 mus│in command substitution │
~ │fish: Unknown command │
~ │:lua vim.api.nvim_win_close(1005, true) │
~ │ ^
By ZZ - window is close.
is0n commented
Could you show me the output of nvim --version
?
I'm on v0.7.2
and I don't encounter this issue.
Could you also show me your keymaps? It could also be that <ESC>
or <C-\><C-n>
have been remapped.
kobzar commented
When i try to run :Jaq from command line without keybindings - the same issue.
But, on LunarVim - all working fine
NVIM v0.7.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by builduser
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
My keybindings
local keymap = vim.keymap.set
keymap("n", "<leader>rr", ":Jaq<CR>", { silent = true, noremap = true, desc = "Run Code" })
My config
local status_ok, crun = pcall(require, "jaq-nvim")
if not status_ok then
return
end
crun.setup({
-- Commands used with 'Jaq'
cmds = {
-- Default UI used (see `Usage` for options)
default = "float",
-- Uses external commands such as 'g++' and 'cargo'
external = {
typescript = "deno run %",
javascript = "node %",
markdown = "glow %",
python = "python3 %",
rust = "rustc % && ./$fileBase && rm $fileBase",
cpp = "g++ % -o $fileBase && ./$fileBase",
go = "go run %",
sh = "sh %",
},
-- Uses internal commands such as 'source' and 'luafile'
internal = {
lua = "luafile %",
vim = "source %",
},
},
-- UI settings
ui = {
-- Auto-save the current file
-- before executing it
autosave = true,
-- Start in insert mode
startinsert = false,
-- Switch back to current file
-- after using Jaq
wincmd = false,
-- Floating Window / FTerm settings
float = {
-- Floating window border (see ':h nvim_open_win')
border = "rounded",
-- Num from `0 - 1` for measurements
height = 0.8,
width = 0.8,
x = 0.5,
y = 0.5,
-- Highlight group for floating window/border (see ':h winhl')
border_hl = "FloatBorder",
float_hl = "Normal",
-- Floating Window Transparency (see ':h winblend')
blend = 0,
},
terminal = {
-- Position of terminal
position = "bot",
-- Open the terminal without line numbers
line_no = false,
-- Size of terminal
size = 10,
},
toggleterm = {
-- Position of terminal, one of "vertical" | "horizontal" | "window" | "float"
position = "horizontal",
-- Size of terminal
size = 10,
},
quickfix = {
-- Position of quickfix window
position = "bot",
-- Size of quickfix window
size = 10,
},
},
})
is0n commented
Just pushed a new commit. Did it change anything?
kobzar commented
Now all working fine.
Thanks for the quick support.