Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(bqf.qfwin.handler): allow to use function as opener #129

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

przepompownia
Copy link

For example

local function tabDropHandler()
  require('bqf.qfwin.handler').open(true, function(fname)
    customTabDrop(fname)
  end)
end
local function configureWindow()
  vim.keymap.set({'n'}, '<CR>', tabDropHandler, {buffer = true})
end

local augroup = vim.api.nvim_create_augroup ('BqfMappings', {clear = true })
vim.api.nvim_create_autocmd ('FileType', {
  group = augroup,
  pattern = 'qf',
  callback = configureWindow,
})

#45

For example
```lua
local function tabDropHandler()
  require('bqf.qfwin.handler').open(true, function(fname)
    customTabDrop(fname))
  end)
end
local function configureWindow()
  vim.keymap.set({'n'}, '<CR>', tabDropHandler, {buffer = true})
end

local augroup = vim.api.nvim_create_augroup ('BqfMappings', {clear = true })
vim.api.nvim_create_autocmd ('FileType', {
  group = augroup,
  pattern = 'qf',
  callback = configureWindow,
})
```

kevinhwang91#45
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.

None yet

1 participant