Skip to content

Bug: vim.g.puppeteer_disable_filetypes ignored #29

@simonmandlik

Description

@simonmandlik

Make sure you have done the following

  • I have updated to the latest version of the plugin.
  • I have read the README.
  • All Treesitter parsers for the filetypes used by nvim-puppeteer are installed, and I updated all my Treesitter parsers via :TSUpdate.

Bug Description

Hi, it seems that this variable takes no effect. When installing with lazy as follows

{
    "chrisgrieser/nvim-puppeteer",
    dependencies = "nvim-treesitter/nvim-treesitter",
}

I'm getting

:=vim.g.puppeteer_disable_filetypes
nil

When doing

{
    "chrisgrieser/nvim-puppeteer",
    dependencies = "nvim-treesitter/nvim-treesitter",
    init = function()
        vim.g.puppeteer_disable_filetypes = { "lua" }
    end
}

I'm getting

:=vim.g.puppeteer_disable_filetypes
{ "lua" }

but the plugin still works in lua files.

Relevant Screenshot

No response

To Reproduce

vim.cmd([[keeppatterns %s/\s\+$//e]])

in a lua file gets turned to

vim.cmd(([[keeppatterns %s/\s\+$//e]]):format())

neovim version

v0.11.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions