shellRaining / hlchunk.nvim

This is the lua implementation of nvim-hlchunk, you can use this neovim plugin to highlight your indent line and the current chunk (context) your cursor stayed
MIT License
627 stars 31 forks source link

exclude_filetypes check wrong #47

Closed davidosomething closed 1 year ago

davidosomething commented 1 year ago

Describe the bug

mods currently check for

    if (not self.options.enable) or self.options.exclude_filetypes[vim.bo.filetype] then

so need to use this format for exclude_filetypes:

exclude_filetypes = {
  sh = true
}

not

exclude_filetypes = { "sh" }

as stated in https://github.com/shellRaining/hlchunk.nvim/blob/main/docs/en/indent.md

maybe change to

vim.tbl_contains(exclude_filetypes, vim.bo.filetype)

or update docs to use { ft1 = true, ft2 = true }

shellRaining commented 1 year ago

Oh yes, I'm sorry. There were some error in the document.

shellRaining commented 1 year ago

This design is only for the convenience of coding, but it does feel weirs for users. If there are similar feedback in the future, I will make some changes accordingly.