romgrk / barbar.nvim

The neovim tabline plugin.
2.16k stars 81 forks source link

The `Buffer*` commands causes `windwp/nvim-ts-autotag` to stop working. #510

Closed anthony-S93 closed 5 months ago

anthony-S93 commented 1 year ago

Description

Every time I use the Buffer* commands (BufferWipeout and BufferClose), windwp/nvim-ts-autotag (https://github.com/windwp/nvim-ts-autotag) stops working. I will demonstrate this behavior through the following two videos.

https://github.com/romgrk/barbar.nvim/assets/69449791/def379d9-82f0-4b3d-bf16-222a2f70b477

https://github.com/romgrk/barbar.nvim/assets/69449791/7c43bf0b-e29a-4257-9fa6-aacb6e88ca74

Please note that I was able to reproduce the issue with the following minimal config:

vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=/tmp/nvim/site]]
local package_root = '/tmp/nvim/site/pack'
local install_path = package_root .. '/packer/start/packer.nvim'
local function load_plugins()
    require('packer').startup({
        function(use)
            use 'wbthomason/packer.nvim'
            use
            {
                "nvim-treesitter/nvim-treesitter",
                run = ':TSUpdate',
                config = function()
                    require("nvim-treesitter.configs").setup({
                        highlight = {
                            enable = true,
                            additional_vim_regex_highlighting = true,
                        },
                        ensure_installed = { "python", "javascript", "c", "cpp", "lua", "html", "css" },
                    })
                end,
            }

            use
            {
                "romgrk/barbar.nvim",
                config = function()
                    require('barbar').setup({
                        animation = false,
                        icons = {
                            filetype = {
                                custom_colors = false,
                                enabled = false,
                            },
                        },
                    })
                end,
            }

            use
            {
                "windwp/nvim-ts-autotag",
                config = function()
                    local ts_autotag = require('nvim-ts-autotag')
                    ts_autotag.setup({
                        filetypes = { "html", "xml", "markdown" },
                    })
                end
            }
        end,
        config = {
            package_root = package_root,
            compile_path = install_path .. '/plugin/packer_compiled.lua',
            display = { non_interactive = true },
        }
    })
end

if vim.fn.isdirectory(install_path) == 0 then
    vim.fn.system { 'git', 'clone', '--depth=1', 'https://github.com/wbthomason/packer.nvim', install_path }
end

load_plugins()
require('packer').sync()
vim.cmd [[autocmd User PackerComplete ++once echo "Ready!"]]

Additional Information Neovim version:

NVIM v0.9.1
Build type: Release
LuaJIT 2.1.0-beta3

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"
romgrk commented 1 year ago

Did you open an issue with the plugin that isn't working? I'm not sure under which conditions it stops operating, they might have more clues.

Iron-E commented 1 year ago

Yeah, we don't make any calls to vim.treesitter, so it's probable this is a bug somewhere else.

anthony-S93 commented 1 year ago

Did you open an issue with the plugin that isn't working?

I just did.

Iron-E commented 5 months ago

Closing as https://github.com/windwp/nvim-ts-autotag/issues/121 has been closed; it seems related to the builtin :bwipeout command.