Skip to content

feat(option): add option to close existing Jaq buffers - #33

Open
naoki-mizuno wants to merge 1 commit into
is0n:masterfrom
naoki-mizuno:close-existing
Open

feat(option): add option to close existing Jaq buffers#33
naoki-mizuno wants to merge 1 commit into
is0n:masterfrom
naoki-mizuno:close-existing

Conversation

@naoki-mizuno

Copy link
Copy Markdown

Hi, in this PR I added an option to close existing Jaq buffers upon starting a new quickrun.

I like having a terminal quickrun buffer side-by-side with my source code buffer, and leave that open as I make modifications to the source code and rerun (see image at the bottom). However, every time I run :Jaq it opens a new quickrun buffer. By adding this option, it becomes possible to automatically close the buffer before running a new quickrun.

It seems that nvim_buf_get_option has been deprecated in 0.10, but I'm deliberately using it in order to make it consistent with the other uses of nvim_buf_{set,get}_option.

-- Note: Irrelevant options are omitted
require("jaq-nvim").setup({
  behavior = {
    default = "terminal",
    -- New option added in this PR
    -- closeexisting = true,
  },

  ui = {
    terminal = {
      position = "vert",
      size = 80,
      line_no = false
    },
  }
})

How I normally use jaq: show the results side-by-side, and edit, run, and repeat
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant