Skip to content

Conversation

przepompownia
Copy link
Contributor

Problem: setting up extui buffers sends redundant events.

require('vim._extui').enable({enable = true, msg = {target = 'msg'}})
vim.api.nvim_create_autocmd('BufFilePost', {
  callback = function (ev) print(ev.match) end
})

For example, gitsigns attempts to attach these buffers.

Solution: set them up when eventignorewin is active.

@przepompownia
Copy link
Contributor Author

Cc @luukvbaal, @lewis6991 (side effect of lewis6991/gitsigns.nvim#1409 (comment))

Copy link
Member

@justinmk justinmk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

waiting for luukvbaal approval

Problem:  Setting up extui buffers emits OptionSet and BufFilePost events.
Solution: Set options and buffer name after 'eventignorewin'.
@luukvbaal luukvbaal enabled auto-merge (squash) September 26, 2025 01:17
@luukvbaal
Copy link
Member

Thanks, I changed the order some more and added a clarifying comment.

@luukvbaal luukvbaal merged commit 56709ca into neovim:master Sep 26, 2025
35 checks passed
@przepompownia przepompownia deleted the extui-noautocmds branch September 26, 2025 08:07
@przepompownia
Copy link
Contributor Author

przepompownia commented Sep 26, 2025

Thanks for improvements @luukvbaal - I missed the autocommands related to window options here.

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.

3 participants