GithubHelp home page GithubHelp logo

shellraining / hlchunk.nvim Goto Github PK

View Code? Open in Web Editor NEW
487.0 487.0 30.0 431 KB

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

License: MIT License

Lua 98.88% Makefile 1.12%
chunk indentline lua neovim

hlchunk.nvim's People

Contributors

amlanjlahkar avatar crivotz avatar happyori avatar hinell avatar itepechi avatar juanzoran avatar kang8 avatar kevintraver avatar miversen33 avatar nyngwang avatar pauldesmondparker avatar postcyberpunk avatar shellraining avatar soifou avatar tlindsay avatar xiao-m0 avatar yuguorui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

hlchunk.nvim's Issues

Bending on typing in the chunk/block

Describe the bug

The chunk line is not static during typing.

To Reproduce

use {
  'shellRaining/hlchunk.nvim',
  config = function ()
    require('hlchunk').setup {
      chunk = {
        enable = true,
        use_treesitter = true,
        chars = {
          horizontal_line = "",
          vertical_line = "",
          left_top = "",
          left_bottom = "",
          right_arrow = "",
        },
        style = "#00ffff",
      },
      line_num = {
        enable = true,
        style = "#806d9c",
      },
      indent = { enable = false },
      blank = { enable = false },
    }
  end
}

example code:

vim.api.nvim_create_autocmd({ 'ColorScheme' }, {
  -- group = curfile_augroup,
  pattern = '*',
  callback = function ()
    vim.aj
  end
})

Expected behavior

I would expect the chunk line to be static when I was typing.

Screenshots

Screen.Recording.2023-05-04.at.2.19.13.AM.mov

Additional context
Add any other context about the problem here.

[bug] hl_chunk wrong rendering the chunk

Snipaste_2023-03-01_22-10-29

当我光标在for j 上时,它不是for j 这个代码块

函数也是这样

when one hunk is in another hunk, it will highlight the outer hunk, such as this situation under, when cursor at x, expect highlighting the inner hunk at right

{
    {

    },
 x  {

    }
}

Use callback for bg/fg color styles OR reconfigure mod

Is your feature request related to a problem? Please describe.

When assigning style bg/fg colors to any mod, the color is set forever

Describe the solution you'd like

Ability to use function as

local function get_indent_bg()
              if vim.g.color_name = "colorsa" then
 return vim.fn.synIDattr(
                vim.fn.synIDtrans(vim.fn.hlID("Whitespace")),
                "bg",
                "gui"
              )
else
 return vim.fn.synIDattr(
                vim.fn.synIDtrans(vim.fn.hlID("NonText")),
                "fg",
                "gui"
              )
end

style = {
  { bg = get_indent_bg, fg = get_indent_fg },
  { bg = get_indent_bg_alt, fg = get_indent_fg_alt },
}

OR

blank = require('hlchunk').get_mod('blank')
current = blank:get_options()
next = vim.tbl_extend('force', current, { style = new styles })
blank:set_options(next)

OR

blank:set_hl(OVERRIDES) -- set_hl from BaseMod with new param to set override

Describe alternatives you've considered

Additional context
Add any other context or screenshots about the feature request here.

Indent guide is behind folds

Describe the bug
The indent guide is behind folds.

To Reproduce
Steps to reproduce the behavior:

  1. Write some code with folds.
  2. The indent guide is hidden behind the folds, resulting in disconnected lines.

Expected behavior
The indent guide should be above the folds. indent-blankline.nvim has the option char_priority to control this IIRC.

Screenshots
image

Feel laggy when moving the cursor across multi-line comments in JavaScript

Describe the bug
As title. I need to investigate the output bundle, which is a js file with thousands of lines and containing some ugly comments inserted by webpack. (see below)

Whenever I move the cursor vertically across these lines it feels like neovim is frozen for 0.5 second or so. This also happens when I move the cursor horizontally on a line that has many asterisks.

To Reproduce
Open a javascript file that contains some multi-line comments like this:

/***/ "./node_modules/@babel/runtime/regenerator/index.js":
/*!**********************************************************!*\
  !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
  \**********************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

Expected behavior
No frozen

Screenshots
Nope.

Additional context
Nope.

what will do next step?

Add animation effects to the chunk~
change vim.fn function to utils function, because such as vim.fn.line() is so confused for its 1-base index
Improve multi-person cooperation process
Improve documentation (including extreme cases where indent cannot be rendered, and the functionality of text objects in chunks).

On installation with Plug, commands not available

Describe the bug
After installation with Plug, none of the listed commands are available. I.e. EnableHLChunk

To Reproduce
Steps to reproduce the behavior:

  1. Edit init.vim to add Plug 'shellRaining/hlchunk.nvim' and save.
  2. Enter nvim and run :PlugInstall
  3. Restart nvim
  4. Verify plugin health with :PlugStatus

Expected behavior
:EnableHLChunk should be available.

Screenshots
image
image

Additional Context

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

Indent lines are not shown in Python docstrings

Describe the bug
Indent lines are not shown in Python docstrings, as shown in the screenshot below.

To Reproduce
You can try the code in the screenshot. My config:

chunk = {
    enable = true,
    use_treesitter = true,
    notify = true,
    chars = {
        horizontal_line = icons.bar.horizontal_thin,
        vertical_line = icons.bar.vertical_center_thin,
        left_top = icons.bar.upper_left_corner_thin,
        left_bottom = icons.bar.lower_left_corner_thin,
        right_arrow = icons.bar.horizontal_thin,
    },
    style = {
        {
            fg = c.info_fg,
        },
    },
    exclude_filetypes = {
        qf = true,
        help = true,
        dapui_scopes = true,
        dapui_watches = true,
        dapui_stacks = true,
        dapui_breakpoints = true,
        dapui_console = true,
        ["dap-repl"] = true,
        harpoon = true,
        dropbar_menu = true,
        glow = true,
        aerial = true,
        dashboard = true,
        lspinfo = true,
        lspsagafinder = true,
        packer = true,
        checkhealth = true,
        man = true,
        mason = true,
        NvimTree = true,
        ["neo-tree"] = true,
        plugin = true,
        lazy = true,
        TelescopePrompt = true,
        [""] = true, -- because TelescopePrompt will set a empty ft, so add this.
        alpha = true,
        toggleterm = true,
        sagafinder = true,
        sagaoutline = true,
        better_term = true,
        fugitiveblame = true,
        Trouble = true,
        Outline = true,
        starter = true,
        NeogitPopup = true,
        NeogitStatus = true,
        DiffviewFiles = true,
        DiffviewFileHistory = true,
        DressingInput = true,
        spectre_panel = true,
        zsh = true,
        vuffers = true,
    },
},

indent = {
    enable = true,
    use_treesitter = true,
    chars = {
        icons.bar.vertical_center_thin,
    },
    style = {
        {
            fg = c.comment_fg,
        },
    },
},

line_num = {
    enable = false,
},

blank = {
    enable = false,
    chars = {
        " ",
    },
    style = {
        {
            bg = c.bg,
        },
        {
            bg = c.cursor_line_bg,
        },
    },
},

Expected behavior
I would expect the indent lines to be shown for the docstrings.

Screenshots
Screenshot 2023-11-14 at 17 07 54

[bug] when open a makefile, it will enter a dead loop

Describe the bug

when open a make file with these texts

CC = gcc
CFLAGS = -Wall
TARGET = xc

.PHONY: all clean run

all: $(TARGET)

$(TARGET): xc.c
	$(CC) $(CFLAGS) $< -o $@

run: $(TARGET)
	./$(TARGET)

clean:
	rm -f $(TARGET)

this plugin will enter a dead loop. and make neovim can not use.

Chunk & Line_num failing to get correct treesitter node.

Describe the bug
Chunk and line_num fail to get the correct treesitter node, only the outermost scope is highlighted. with use_treesitter = false both work as intended. Indent seems unaffected by treesitter.

To Reproduce
Steps to reproduce the behavior:
enable use_treesitter on chunk or line_num

Expected behavior
chunk & line_num draw as expected in the spec

Screenshots
use_treesitter = true as in screenshot:
image
use_treesitter = false as in screenshot:
image

Additional context
treesitter configuration:
image

stucked when opening .cs

Describe the bug
the chunk will stop moving when edting .cs files,disableHL the enableHL will refresh once,no error throwed ,but disableHL will pop a notice of my register
.lua and .py runs smoothly,

To Reproduce
open any .cs file

Hidden text for elaborate if-statements in Python

Describe the bug
The first character of some lines is hidden by the indent lines. In the screenshot, you can see that the closing parenthesis of the if statement is hidden, as well as the first character of and and len.

To Reproduce
Replicate the code in the screenshot. I have the following config:

chunk = {
    enable = true,
    use_treesitter = true,
    notify = true,
    chars = {
        horizontal_line = icons.bar.horizontal_thin,
        vertical_line = icons.bar.vertical_center_thin,
        left_top = icons.bar.upper_left_corner_thin,
        left_bottom = icons.bar.lower_left_corner_thin,
        right_arrow = icons.bar.horizontal_thin,
    },
    style = {
        {
            fg = c.info_fg,
        },
    },
    exclude_filetypes = {
        qf = true,
        help = true,
        dapui_scopes = true,
        dapui_watches = true,
        dapui_stacks = true,
        dapui_breakpoints = true,
        dapui_console = true,
        ["dap-repl"] = true,
        harpoon = true,
        dropbar_menu = true,
        glow = true,
        aerial = true,
        dashboard = true,
        lspinfo = true,
        lspsagafinder = true,
        packer = true,
        checkhealth = true,
        man = true,
        mason = true,
        NvimTree = true,
        ["neo-tree"] = true,
        plugin = true,
        lazy = true,
        TelescopePrompt = true,
        [""] = true, -- because TelescopePrompt will set a empty ft, so add this.
        alpha = true,
        toggleterm = true,
        sagafinder = true,
        sagaoutline = true,
        better_term = true,
        fugitiveblame = true,
        Trouble = true,
        Outline = true,
        starter = true,
        NeogitPopup = true,
        NeogitStatus = true,
        DiffviewFiles = true,
        DiffviewFileHistory = true,
        DressingInput = true,
        spectre_panel = true,
        zsh = true,
        vuffers = true,
    },
},

indent = {
    enable = true,
    use_treesitter = true,
    chars = {
        icons.bar.vertical_center_thin,
    },
    style = {
        {
            fg = c.comment_fg,
        },
    },
},

line_num = {
    enable = false,
},

blank = {
    enable = false,
    chars = {
        " ",
    },
    style = {
        {
            bg = c.bg,
        },
        {
            bg = c.cursor_line_bg,
        },
    },
},

Expected behavior
I expect the indent lines to never cover real text.

Screenshots
Screenshot 2023-11-14 at 17 08 38

Feature Request: Ignore filetypes

Is your feature request related to a problem? Please describe.
I use alpha dashboard. I have no way to disable it in the config except manually disabling all of them using autocommand.

Describe the solution you'd like
Add ignore_ft = {} into the configuration

Describe alternatives you've considered
above

Additional context
Screenshot 2023-05-21 at 10 06 35

hlchunk clobbers listchars `{tab, nbsp, trail}`

Is your feature request related to a problem? Please describe.

Important

TL;DR hlchunk clobbers special listchars.

I highlight unexpected, but usually invisible, characters with the use of explicit listchars for tab, nbsp, and trail.
However, whenever hlchunk is engaged in a block it clobbers listchars.

Describe the solution you'd like
I'd like to see hlchunk respect listchars {tab, nbsp}, or have a mechanism to recreate this treatment inside blank setup.

Describe alternatives you've considered
I've tried to set blank = { enable = false }, but it's spotty. Tabs will show after the chunk line, but not before.

Additional context
image

Sometimes the highlighting of the number line(s) disappeared

Describe the bug

It seems that sometimes there was no highlighting when I moved my cursor to some nested block(in my case, Lua table). I only tested this with Lua.

To Reproduce

use {
  'shellRaining/hlchunk.nvim',
  config = function ()
    require('hlchunk').setup {
      chunk = {
        enable = true,
        use_treesitter = true,
        chars = {
          horizontal_line = "",
          vertical_line = "",
          left_top = "",
          left_bottom = "",
          right_arrow = "",
        },
        style = "#00ffff",
      },
      line_num = {
        enable = true,
        style = "#806d9c",
      },
      indent = { enable = false },
      blank = { enable = false },
    }
  end
}

example code: turned out to be the config itself.

Expected behavior

I would expect the highlighting of the current chunk to always exist.

Screenshots

Screen.Recording.2023-05-04.at.2.26.57.AM.mov

Additional context
Add any other context about the problem here.

invalid key

No matter what file I open, this message pops up.
屏幕截图 2023-05-14 191551

Exclude files based on `buftype`

Thank you for the great project.

Is your feature request related to a problem? Please describe.
Nope.

Describe the solution you'd like
Exclude files by using buftype, see vimdoc help on that one.

Getting error when opening any file that has an LSP associated with it

Describe the bug
When I open a file that has an LSP that runs, I get the following error from hlchunk

Error detected while processing CursorMoved Autocommands for "*":
Error executing lua callback: ...share/nvim/lazy/hlchunk.nvim/lua/hlchunk/utils/utils.lua:152: attempt to index local 'rows_indent_list'
(a number value)
stack traceback:
        ...share/nvim/lazy/hlchunk.nvim/lua/hlchunk/utils/utils.lua:152: in function 'get_indent_range'
        ...hare/nvim/lazy/hlchunk.nvim/lua/hlchunk/mods/context.lua:37: in function 'render'
        ...hare/nvim/lazy/hlchunk.nvim/lua/hlchunk/mods/context.lua:80: in function <...hare/nvim/lazy/hlchunk.nvim/lua/hlchunk/mods/cont
ext.lua:74>

To Reproduce
Steps to reproduce the behavior:

  1. Open a file that has a known LSP running with it
  2. See error

Expected behavior
Errors (and notifications) are thrown far too often for a UI tool IMO. This is the latest, but frequently I will also get random "no parser" messages being thrown into the editor. IMO these should be logged somewhere instead of displayed to the end user. Though in this case, this appears to be a true bug.

Additional context
I will update this issue as I find more details. To start, I recently updated my plugins. The previous commit I was on is here and this was not an issue. I may bisect a bit to see if I can find the specific commit that introduced the bug.

Neovim info:

NVIM v0.10.0-dev-798+g72e619ca9
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3

Hlchunk Config:

{
    indent = {
        enable = false,
        use_treesitter = true
    },
    context = {
        enable = true,
        use_treesitter = true
    },
    chunk = {
        enable = true,
        use_treesitter = true
    },
    blank = {
        enable = false,
        use_treesitter = true
    },
    line_num = {
        enable = true,
        use_treesitter = true
    }
}

Didn't get the coloring for chunk

Describe the bug

No coloring of the chunk line after starting Neovim.

To Reproduce

use {
  'shellRaining/hlchunk.nvim',
  config = function ()
    require('hlchunk').setup {
      chunk = {
        enable = true,
        use_treesitter = true,
        chars = {
          horizontal_line = "",
          vertical_line = "",
          left_top = "",
          left_bottom = "",
          right_arrow = "",
        },
        style = "#00ffff",
      },
      line_num = {
        enable = true,
        style = "#806d9c",
      },
      indent = { enable = false },
      blank = { enable = false },
    }
  end
}

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.
Set the coloring of the chunk line.

Screenshots
If applicable, add screenshots to help explain your problem.
image

Additional context
Add any other context about the problem here.

[bug] when press key 'o', the chunk not render correctly

Describe the bug

Kapture 2023-05-08 at 15 28 55

when press the key, the chunk not render correctly.

To Reproduce

use this text and place cursor at the begin of line23

    if (!set.has(s[r])) {
      set.add(s[r]);
      r++;
      max_len = Math.max(max_len, r - l);
    } else {
    }

then press o to add a new line, will occur this situation.

NeoVim crashes on current nightly build

Hi! Thank you for this plugin, I am now switching from mini.indentscope, because it looks cool and works really fast. I had a small issue, which I would like to report here.

Describe the bug

Current nightly build of NeoVim crashes, when opening a file with a file type which is not supported by hlchunk.nvim.

Aug 10 17:46:47.214 ERROR Error: Process exited with error code 134

I feel like this is kind of related to #49.

When I open the same file on a stable build it works, but I get this message in the logs:

[hlchunk]: not have parser for make

I think the proper message for this in terms of grammar would be no parser for <filetype>.

Crashing aside, I would like to have an option to disable these messages or have a documentation in this repo about how to turn them off, as you mentioned in the linked issue:

each plugin has a "notify" attribute that can be used to disable prompts

Where can I find this option?

To Reproduce

  1. Use NeoVim nightly build
  2. Open any file, which is not supported, ex. Makefile

Expected behavior

The file opens, there are no warnings about the missing filetype.

Screenshots
N/A

Additional context

NVIM v0.10.0-dev-798+g72e619ca9
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3

Lazy package manager, with this config:

require("hlchunk").setup({
    blank = { enable = false },
})

Another indent-guide rendering issue.

Describe the bug
Indent-guides fail to draw or render if the screen is moved when the first columns in a line aren't visible.

To Reproduce
Steps to reproduce the behavior:

  1. :set nowrap
  2. Scroll the screen horizontally, for example by going to the end of a long line that doesn't fit on the screen.
  3. Scroll the screen vertically, up or down.
  4. Scroll the screen horizontally, back to the first column.
  5. Scroll the screen vertically, back to where the screen was before step 3. (If you scrolled down, scroll back up.)
  6. Error: Some indent-guides will not have been drawn in.

NOTE: At step 3, it is already possible that wrongly rendering indent-guides might be visible. (First screenshot below)

Expected behavior
No missing indent-guides. The drawing of the indent-guides should update correctly even when the columns aren't initially visible on the screen.

Screenshots

image

image

Question- How do I disable the dots?

Describe the bug
I'm unsure of how to disable the dots. They make everything look cluttered and messy.

To Reproduce
Steps to reproduce the behavior:

  1. Go to .vimrc
  2. Use the example for the indent mod that uses multiple chars
  3. Exit and reopen vim

Expected behavior
The indentation should look like the example screenshot.

Screenshots
image

Install with packer question

hlchunk commit id : a17b86f
nvim version: v0.8.3

Packer with this config installed seems no use.

use { "shellRaining/hlchunk.nvim" }

and :PackerStatus can see hlchunk.nvim this plugin

When I try to use EnableHL get err , │E492: Not an editor command: EnableHL

I change config like below get another error

     use {
      "shellRaining/hlchunk.nvim",
      config = function()
        require('hlchunk').setup({
            indent = {
                chars = { "", "¦", "", "", },
                style = {
                    "#8B00FF",
                },
            },
            blank = {
                enable = false,
            }
        })
      end,
    }
packer.nvim: Error running config for hlchunk.nvim: ...ack/packer/start/hlchunk.nvim/lua/hlchunk/mods/blank.lua:25: attempt to call field 'nvim_get_hl' (a nil value)

Characters are hidden behind indent lines

Characters are sometimes hidden behind the indent lines (i.e., those generated by indent mode, not chunk or others).

I attach two screenshots, the first one having the indent lines enabled and the second one without them. As can be observed in the first screenshot, the parenthesis closing the if statement is hidden. Also, some of the initial letters of each line within the if statement are hidden. I believe the ideal solution would be to either start the indent line after the : happens in an if statement (at least on Python), or to simply hide the indent line whenever needed.

Screenshot 2023-07-06 at 16 29 16
Screenshot 2023-07-06 at 16 29 39

Thanks!

Chunk NOT working with *.jsx & *.tsx

Describe the bug
I'm having issues with "chunk" in the filetypes: jsx and tsx. The chunks don't seem to work even though I've checked that the plugin supports both in support_filetypes.

I have tested it with file formats .lua or .js, and the chunking works fine in those cases.

Screenshots

  • Chunk working with .lua and .js:
    CleanShot 2023-05-29 at 12 35 43
    CleanShot 2023-05-29 at 12 36 36

  • Chunk NOT working with .jsx and .tsx:
    CleanShot 2023-05-29 at 12 37 49
    CleanShot 2023-05-29 at 12 38 25

Thank you, and I look forward to receiving a prompt response from you.

The `then` block of if statement seems to be skipped

Describe the bug

When my cursor is on the same line with then (or inside the then block) the chunk line didn't point to it.

To Reproduce

use {
  'shellRaining/hlchunk.nvim',
  config = function ()
    require('hlchunk').setup {
      chunk = {
        enable = true,
        use_treesitter = true,
        chars = {
          horizontal_line = "",
          vertical_line = "",
          left_top = "",
          left_bottom = "",
          right_arrow = "",
        },
        style = "#00ffff",
      },
      line_num = {
        enable = true,
        style = "#806d9c",
      },
      indent = { enable = false },
      blank = { enable = false },
    }
  end
}

example code:

if T.builtin[vim.bo.filetype]
  or T.builtin[vim.bo.buftype]
  or T.common[vim.bo.filetype]
then vim.cmd('IndentBlanklineDisable')
else vim.cmd('IndentBlanklineEnable') end

Expected behavior
A clear and concise description of what you expected to happen.
When I move my cursor at the then block, then the chunk line should end at then.

Screenshots
If applicable, add screenshots to help explain your problem.

Screen.Recording.2023-05-04.at.2.06.06.AM.mov

Additional context
Add any other context about the problem here.

Notification "You have disable this plugin" appears when using default configuration from readme

Describe the bug
When using the default configuration provided in the readme

{ "shellRaining/hlchunk.nvim", event = { "UIEnter" }, },

A notification is displayed on Vim start that says

you have disable this plugin

image

To Reproduce
Steps to reproduce the behavior:
Install hlchunk.nvim, use the configuration provided in the readme, open a file with neovimvim

I am using neovim stable

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

Expected behavior
I would expect the provided configuration to work "out of the box". If we need to manually enable specific features to make it work, that should be notated in the readme. It appears that the only way to make this notification not appear is to enable all features of the plugin. Which is fine, but that should be notated.

Additionally, the readme states the default configuration is supposed to have all parts of hlchunk enabled

Lastly, disabling an optional piece of the plugin should not display a message on vim startup.

Rendering error on the first line in a file.

Describe the bug
In the situation explained below, the indent-guide characters improperly render on the first line of a file.

Screenshots of the bug
Text in the buffer:

image

Wrongly rendering indent-guide characters:

image

image

My setup
Using lazy.nvim:

{
    "shellRaining/hlchunk.nvim",
    enabled = true,
    lazy = true,
    version = false,
    event = "UIEnter",

    config = function()
        require("hlchunk").setup({
            indent = {
                enable = true,
                use_treesitter = false,
                chars = { "" },
                style = {
                    { fg = vim.fn.synIDattr(vim.fn.synIDtrans(vim.fn.hlID("AumIndentGuide")), "fg", "gui") },
                },
            },

            blank = {
                enable = false,
            },
            chunk = {
                enable = false,
            },
            line_num = {
                enable = false,
            },
        })
    end,
},

To Reproduce
Steps to reproduce the behavior:

  1. In the hlchunk setup, enable at least indent. I have disabled the other modules: blank, chunk and line_num.
  2. Open a empty file, for example: temp.txt
  3. Enter any text on the first line, for example test.
  4. Indent the first line 1 or more times, then unident it back. (Indenting the text N amount of times and then entering a new line before the first non-whitespace character in the line also causes the bug.)
  5. Error: The indent characters remain, and replace characters on the line.

image

Expected behavior
The indent-guide characters should not be rendered in this broken manner on the first line of the file.

autocommand maybe solve this

          autocommand maybe solve this
autocmd("BufEnter", {
	group = myAutoGroup,
	pattern = "*",
	callback = function()
		local max_filesize = 100 * 1024 -- 100 KB
		local ok, stats = pcall(loop.fs_stat, api.nvim_buf_get_name(api.nvim_get_current_buf()))
		if ok and stats and stats.size < max_filesize then
			-- require("plugin-config.todo-comments")
			require("indent_blankline.commands").enable()
		end
	end,
})
-- TODO: disable indentline before loading file
autocmd("BufReadPre", {
	group = myAutoGroup,
	pattern = "*",
	callback = function()
		-- vim.api.nvim_cmd(vim.api.nvim_parse_cmd("IndentBlanklineDisable", {}), {}) o
		-- if vim.api.nvim_buf_line_count(0) > 1000 then
		require("indent_blankline.commands").disable()
		-- end
	end,
})

Originally posted by @HUAHUAI23 in lukas-reineke/indent-blankline.nvim#440 (comment)

Indent lines get cleared on one window if scrolling the same buffer in another window

Describe the bug
When viewing a single buffer in two windows simultaneously, the active window behaves as expected, but when scrolling the buffer on the active window, the indent lines on the secondary window get gradually cleared.

To Reproduce
Steps to reproduce the behavior:

  1. Open any file, and go to a section with indent lines displayed (in the example neovim/src/nvim/eval/funcs.c)
  2. Open a vertically split window (ctrl-w v)
  3. Scroll the buffer down in one window
  4. Watch as the indents disappear in the other window

Expected behavior
As long as a buffer is visible in a window from the active tab, the indent guides should stay visible in each window's viewport.

Screenshots
Both windows with indents:
image

As the right window is scrolled, the indents in the left window get cleared:
image

Additional context
Config:

      require("hlchunk").setup({
        indent = {
          chars = {
            "",
          },
        },
        blank = {
          enable = false,
        },
        chunk = {
          enable = false,
        },
        line_num = {
          enable = false,
        }
      })

Great job with the plugin!

Add option to disable vim.notify when EnableHL/DisableHL

Describe the bug

When using commands EnableHL and DisableHL with disabled mods, it vim.notify the mod status
Please provide option to turn off notifications

To Reproduce

  • :DisableHL and :EnableHL, see notifications

Expected behavior

no notifications, just silently disable and re-enable

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Error executing lua callback: .../share/nvim/lazy/hlchunk.nvim/lua/hlchunk/mods/chunk.lua:93: index out of range

Describe the bug

Got a kinda serious error when pressing n to jump to the next matching by /:

Error detected while processing CursorMoved Autocommands for "*.lua":
Error executing lua callback: .../share/nvim/lazy/hlchunk.nvim/lua/hlchunk/mods/chunk.lua:93: index out of range
stack traceback:
	[C]: in function 'str_byteindex'
	.../share/nvim/lazy/hlchunk.nvim/lua/hlchunk/mods/chunk.lua:93: in function 'render'
	.../share/nvim/lazy/hlchunk.nvim/lua/hlchunk/mods/chunk.lua:146: in function <.../share/nvim/lazy/hlchunk.nvim/lua/hlchunk/mods/chunk.lua:145>

To Reproduce

  1. Start Neovim
  2. Open two vsplits A|B.
  3. Try to open a file on B, where you will have a long line such that the chunk.chars.left_top will be invisible after scrolling right, e.g. z50l.
  4. You will get the same error after 3.

Expected behavior

No error, and the jump(the default behaviour of n) should succeed.

Screenshots

Additional context
Add any other context about the problem here.

Allow excluded filetypes for other modules besides `chunk`

Is your feature request related to a problem? Please describe.
The Chunk module has an option that can be passed on setup to exclude filetypes. This is great but is apparently only an option for the chunk module. In my particular case, I don't want the Blank module (or indent) to work on lazy filetypes

image

Intuitively I figured I could just provide the same array I use for the chunk exclusion in the configuration for blank but it seems it doesn't work. I haven't dug into the code but I suspect that option just isn't available for that module. If you are open to it, I am fine submitting a PR to accomplish this behavior :)

Laggy in diff-mode with a thousand lines folded

Describe the bug
In diff-mode, Vim/Neovim uses different fold method, it can lead to thousands of unchanged lines will be folded. Rendering chunks in folded lines costs a lot of CPU resources and laggy while scrolling.

To Reproduce
Steps to reproduce the behavior:

  1. You have a file > 3000 lines of code.
  2. Make some changes near the end of file.
  3. Open diffview
  4. See the CPU percentage goes up and laggy while scrolling.

Expected behavior
Shouldn't render chunk in folded lines, or is there any way to disable it in diff-mode.

Screenshots
image

Additional context
Here is my hlchunk config:

{
    "shellRaining/hlchunk.nvim",
    config = function()
      require("hlchunk").setup({
        chunk = {
          notify = false,
          style = {
            { fg = "#c75ae8" },
            { fg = "#f65866" }, -- this fg is used to highlight wrong chunk
          },
        },
        blank = {
          enable = true,
          chars = { " " },
        },
        line_num = { enable = false },
      })
    end,
    event = "BufReadPre"
}

Indent-guide rendering issue on long lines, when view jumps horizontally.

Describe the bug
When the Neovim screen or view jumps horizontally, the indent-guides occasionally remain visible, even though they should not be visible.

To Reproduce
Steps to reproduce the behavior:

  1. Ensure wrap is disabled. (set nowrap)
  2. Be inside a indented scope with indent-guides and very long lines that are not completely visible on the screen.
  3. Jump to the end of line, for example by pressing $ in Normal Mode - Visual error might occur.
  4. Jump to the start of line, for example by pressing 0, and move one line up/down.
  5. Repeat steps 3 and 4 until visual indent-guide error occurs.

NOTE: It does not happen every single time, but very often.

Expected behavior
The indent-guides should not be visible in this situation.

Screenshots
Example situation:

image

Rendering error when jumping to the end of line:

image

Video Clip

indent-guide-error.mp4

Performance issue on vertical screen when displaying 140 lines

Describe the bug
Hi, This is a great plug. Everything is working fine in my environment, except it has performance issues on vertical screen when displaying 140 lines.

To Reproduce
Steps to reproduce the behavior:

  1. Find a vertical screen, and setting appropriate font size make neovim can be displaying 140 lines.
  2. Change keyboard key spacing, xset r rate 140 35
  3. install hlchunk.nvim and nvim-treesitter
  4. Open a file, and set nu and set rnu.
  5. Input the content of the additional context into the file.
  6. Moving cursor, see performance.
  7. execute command :DisableHL
  8. Moving cursor, see performance.

Expected behavior
The cursor should be able to move smoothly.

Actual behavior
The cursor movement is very slow and laggy.

Additional context
test file, A cpp file.

void test()
{
#xxxxx xxxxx_xxxx
  xxxx->xxxxxxxxx(xx_xxxx, xxxxxxx::xxxxxxxxx8xxx("testtest"), ":/xxx/xxxxx/3x.xxx", xxxxx);
  xxxx->xxxxxxxxx(xx_xxxxx_xxxx_xxx, xxxxxxx::xxxxxxxxx8xxx("xxx"), ":/xxx/xxxxx/3x.xxx", xxxxx);
  xxxx->xxxxxxxxx(xx_xxxxx_xxxx_xxxx, xxxxxxx::xxxxxxxxx8xxx("xxxx"), ":/xxx/xxxxx/3x.xxx", xxxxx);
#xxxxx
 
  xxxx->xxxxxxxxx(xx_xxxxxxx_xxxxxx, xxxxxxx::xxxxxxxxx8xxx("testtesttesttesttesttest"), xxxxx);
  xxxx->xxxxxxxxx(xx_xxxxxxxx, xxxxxxx::xxxxxxxxx8xxx("testtest"), xxxxx);
  xxxx->xxxxxxxxx(xx_3x, xxxxxxx::xxxxxxxxx8xxx("3x"), ":/xxx/xxxxx/3x.xxx", xxxx);
  xxxx->xxxxxxxxx(xx_3x_xxxxx, xxxxxxx::xxxxxxxxx8xxx("testtest"), ":/xxx/xxxxx/3x.xxx", xxxx);
  xxxx->xxxxxxxxx(xx_3x_xxxxxxx, xxxxxxx::xxxxxxxxx8xxx("testtesttest"), ":/xxx/xxxxx/3x.xxx", xxxx);
  xxxx->xxxxxxxxx(xx_3x_xxxxxxxx, xxxxxxx::xxxxxxxxx8xxx("testtesttest"), ":/xxx/xxxxx/3x.xxx", xxxx);
  xxxx->xxxxxxxxx(xx_3x_xxxxxx, xxxxxxx::xxxxxxxxx8xxx("testtest"), ":/xxx/xxxxx/3x.xxx", xxxx);
  xxxx->xxxxxxxxx(xx_3x_xxxxxx3x, xxxxxxx::xxxxxxxxx8xxx("testtest3x"), ":/xxx/xxxxx/3x.xxx", xxxx);
  xxxx->xxxxxxxxx(xx_3x_xxx, xxxxxxx::xxxxxxxxx8xxx("testtesttesttesttesttest"), ":/xxx/xxxxx/3x.xxx", xxxx);
 
  xxxx->xxxxxxxxx(xx_xxx_xxxxxxxxxxx, xxxxxxx::xxxxxxxxx8xxx("xxxtesttest"), ":/xxx/xxxxx/xxx_xxxxxxxxxxx.xxx", xxxxx);
  // xx:testtest  xxx-xxtesttest xxxx:2021/05/07
  xxxx->xxxxxxxxx(xx_xxx_xx, xxxxxxx::xxxxxxxxx8xxx("testtest"), ":/xxx/xxxxx/xxxx.xxx", xxxxx);
  // xxx
  xxxx->xxxxxxxxx(xx_xxxxxxxxxx, xxxxxxx::xxxxxxxxx8xxx("testtest"), ":/xxx/xxxxx/xxxxxxxxxx.xxx", xxxxx);
  xxxx->xxxxxxxxx(xx_xxxxxx, xxxxxxx::xxxxxxxxx8xxx("testtesttesttest"), ":/xxx/xxxxx/xxxxxx.xxx", xxxx);
  xxxx->xxxxxxxxx(xx_xxxxx_xxxxxxx, xxxxxxx::xxxxxxxxx8xxx("testtesttesttesttesttesttest"), ":/xxx/xxxxx/xxxxxx_xxxx.xxx", xxxx);
  xxxx->xxxxxxxxx(xx_xxxxxxxxx, xxxxxxx::xxxxxxxxx8xxx("testtest"), ":/xxx/xxxxx/xxxxxxxxx.xxx", xxxx);
  xxxx->xxxxxxxxx(xx_xxxxx, xxxxxxx::xxxxxxxxx8xxx("testtest"), ":/xxx/xxxxx/xxxxx.xxx", xxxx);
  xxxx->xxxxxxxxx(xx_xxxxx, xxxxxxx::xxxxxxxxx8xxx("testtest"), ":/xxx/xxxxx/xxxxx.xxx", xxxx);
  xxxx->xxxxxxxxx(xx_xxxxx, xxxxxxx::xxxxxxxxx8xxx("testtesttesttest"), ":/xxx/xxxxx/xxxxx.xxx", xxxx);
  xxxx->xxxxxxxxx(xx_xxxxxxxxx, xxxxxxx::xxxxxxxxx8xxx("testtesttest"), ":/xxx/xxxxx/xxxxxxxxx.xxx", xxxx);
  xxxx->xxxxxxxxx(xx_xxxxx_xxxxx, xxxxxxx::xxxxxxxxx8xxx("testtesttest"), ":/xxx/xxxxx/xxxxx_xxxxx.xxx", xxxx);
  xxxx->xxxxxxxxx(xx_xxxxxx2x, xxxxxxx::xxxxxxxxx8xxx("testtest"), ":/xxx/xxxxx/xxxxxx2x.xxx", xxxx);
 
  xxxx->xxxxxxxxx(xx_xxxxxx90xx, xxxxxxx::xxxxxxxxx8xxx("testtesttest90"), ":/xxx/xxxxx/xxxxxx90xx.xxx", xxxxx);
  xxxx->xxxxxxxxx(xx_xxxxxx90xxx, xxxxxxx::xxxxxxxxx8xxx("testtesttest90"), ":/xxx/xxxxx/xxxxxx90xxx.xxx", xxxxx);
  xxxx->xxxxxxxxx(xx_xxxxxx180xx, xxxxxxx::xxxxxxxxx8xxx("testtesttest180"), ":/xxx/xxxxx/xxxxxx180xx.xxx", xxxxx);
  xxxx->xxxxxxxxx(xx_xxxxxx180xxx, xxxxxxx::xxxxxxxxx8xxx("testtesttest180"), ":/xxx/xxxxx/xxxxxx180xxx.xxx", xxxxx);
  xxxx->xxxxxxxxx(xx_xxxx180x, xxxxxxx::xxxxxxxxx8xxx("testtesttesttest"), ":/xxx/xxxxx/xxxx180x.xxx", xxxxx);
  xxxx->xxxxxxxxx(xx_xxxx180x, xxxxxxx::xxxxxxxxx8xxx("testtesttesttest"), ":/xxx/xxxxx/xxxx180x.xxx", xxxxx);
  xxxx->xxxxxxxxx(xx_xxxxx, xxxxxxx::xxxxxxxxx8xxx("testtest"), ":/xxx/xxxxx/xxxxx.xxx", xxxxx);
 
  xxxx->xxxxxxxxx(xx_xxxxxx, xxxxxxx::xxxxxxxxx8xxx("testtesttesttesttesttest"), ":/xxx/xxxxx/xxxxxx.xxx", xxxx);
  xxxx->xxxxxxxxx(xx_xxxxx, xxxxxxx::xxxxxxxxx8xxx("testtesttesttesttesttest"), ":/xxx/xxxxx/xxxxx.xxx", xxxx);
  xxxx->xxxxxxxxx(xx_xxxxx, xxxxxxx::xxxxxxxxx8xxx("testtesttesttest"), ":/xxx/xxxxx/xxxxx.xxx", xxxx);
  xxxx->xxxxxxxxx(xx_xxxxxx, xxxxxxx::xxxxxxxxx8xxx("test"), ":/xxx/xxxxx/xxxxxx.xxx", xxxx);
  xxxx->xxxxxxxxx(xx_xxxxxxx, xxxxxxx::xxxxxxxxx8xxx("testtest"), ":/xxx/xxxxx/xxxxxxx.xxx", xxxx);
  xxxx->xxxxxxxxx(xx_xxxxxxxxx, xxxxxxx::xxxxxxxxx8xxx("testtesttest"), ":/xxx/xxxxx/xxxxxxx.xxx", xxxx);
  xxxx->xxxxxxxxx(xx_xxx, xxxxxxx::xxxxxxxxx8xxx("testtesttesttest"), ":/xxx/xxxxx/xxx.xxx", xxxxx);
  xxxx->xxxxxxxxx(xx_xxxxx, xxxxxxx::xxxxxxxxx8xxx("testtestxxtest"), ":/xxx/xxxxx/xxxxx.xxx", xxxx);
  xxxx->xxxxxxxxx(xx_xxx_xxxx, xxxxxxx::xxxxxxxxx8xxx("testtesttesttest"), ":/xxx/xxxxx/xxx_xxxx.xxx", xxxx);
  xxxx->xxxxxxxxx(xx_xxxxx_xxxxx, xxxxxxx::xxxxxxxxx8xxx("testtesttesttesttesttest"), ":/xxx/xxxxx/xxxxxx.xxx", xxxxx);
 
  xxxx->xxxxxxxxx(xx_xxxxxx, xxxxxxx::xxxxxxxxx8xxx("testtesttesttest"), ":/xxx/xxxxx/xxxxxx.xxx", xxxxx);
  xxxx->xxxxxxxxx(xx_xxxxxx_xxx, xxxxxxx::xxxxxxxxx8xxx("testtesttesttest"), ":/xxx/xxxxx/xxxxxx_xxx.xxx", xxxxx);
  xxxx->xxxxxxxxx(xx_xxxxxx_xxxxxx, xxxxxxx::xxxxxxxxx8xxx("testtesttesttesttest"), ":/xxx/xxxxx/xxxxxx_xxx.xxx", xxxxx);
 
  xxxx->xxxxxxxxx(xx_xxxx_x, xxxxxxx::xxxxxxxxx8xxx("testtestx"), ":/xxx/xxxxx/xxxxx.xxx", xxxx);
  xxxx->xxxxxxxxx(xx_xxxx_x, xxxxxxx::xxxxxxxxx8xxx("testtestx"), ":/xxx/xxxxx/xxxxx.xxx", xxxx);
 
  xxxx->xxxxxxxxx(xx_xxxxxx, xxxxxxx::xxxxxxxxx8xxx("testtest"), ":/xxx/xxxxx/xxxxx.xxx", xxxxx);
  xxxx->xxxxxxxxx(xx_xxxxxx_xxx, xxxxxxx::xxxxxxxxx8xxx("testtesttesttest"), ":/xxx/xxxxx/xxxxx_xxx.xxx", xxxxx);
  xxxx->xxxxxxxxx(xx_xxxxxx_xxxx, xxxxxxx::xxxxxxxxx8xxx("testtesttesttesttest"), ":/xxx/xxxxx/xxxxx_xxxxxx.xxx", xxxxx);
 
  // testtesttesttest
  xxxx->xxxxxxxxx(xx_xx_xxxx, xxxxxxx::xxxxxxxxx8xxx("xxxx"), ":/xxx/xxxxx/xx_xxxx.xxx", xxxxx, xxxx);
  xxxx->xxxxxxxxx(xx_xx_xx_xx, xxxxxxx::xxxxxxxxx8xxx("xx_xx"), ":/xxx/xxxxx/xx_xx_xx.xxx", xxxxx, xxxx);
  xxxx->xxxxxxxxx(xx_xx_xx_xxx, xxxxxxx::xxxxxxxxx8xxx("xx_xxx"), ":/xxx/xxxxx/xx_xx_xxx.xxx", xxxxx, xxxx);
  xxxx->xxxxxxxxx(xx_xx_x_xx, xxxxxxx::xxxxxxxxx8xxx("x_xx"), ":/xxx/xxxxx/xx_x_xx.xxx", xxxxx, xxxx);
  xxxx->xxxxxxxxx(xx_xx_x_xx, xxxxxxx::xxxxxxxxx8xxx("x_xx"), ":/xxx/xxxxx/xx_x_xx.xxx", xxxxx, xxxx);
  xxxx->xxxxxxxxx(xx_xx_x_xxx, xxxxxxx::xxxxxxxxx8xxx("x_xxx"), ":/xxx/xxxxx/xx_x_xxx.xxx", xxxxx, xxxx);
  xxxx->xxxxxxxxx(xx_xx_x_xxx, xxxxxxx::xxxxxxxxx8xxx("x_xxx"), ":/xxx/xxxxx/xx_x_xxx.xxx", xxxxx, xxxx);
  xxxx->xxxxxxxxx(xx_xx_xx, xxxxxxx::xxxxxxxxx8xxx("xx"), ":/xxx/xxxxx/xx_xx.xxx", xxxxx, xxxx);
  xxxx->xxxxxxxxx(xx_xx_xx, xxxxxxx::xxxxxxxxx8xxx("xx"), ":/xxx/xxxxx/xx_xx.xxx", xxxxx, xxxx);
 
  //
  xxxx->xxxxxxxxx(xx_xxxx_xxxxx, xxxxxxx::xxxxxxxxx8xxx("   testtest   "), xxxxx);
  xxxx->xxxxxxxxx(xx_xxxx_xxxx, xxxxxxx::xxxxxxxxx8xxx(""), ":/xxx/xxxxx/xxxx.xxx", xxxxx);
 
  // xxxx xxxxxxx
  xxxx->xxxxxxxxx(xx_xxxx_xxxxxx, xxxxxxx::xxxxxxxxx8xxx("testtesttesttest"), "", xxxxx);
  xxxx->xxxxxxxxx(xx_xxxx_xxxxxx, xxxxxxx::xxxxxxxxx8xxx("testtesttesttest"), "", xxxxx);
 
  xxxxxxxxxxxxxxx::xxxxxxxx()->xxxxxxxxx(xxxxxxxxxxxxxxx::xxxxxxxxxxxx, xxxx->xxxxxxxxx(xx_xxxxxx_xxxxxx));
  xxxxxxxxxxxxxxx::xxxxxxxx()->xxxxxxxxx(xxxxxxxxxxxxxxx::xxxxxxxxxxxx, xxxx->xxxxxxxxx(xx_xxxxxx_xxxxx));
  xxxxxxxxxxxxxxx::xxxxxxxx()->xxxxxxxxx(xxxxxxxxxxxxxxx::xxxxxxxxxxxx, xxxx->xxxxxxxxx(xx_xxxxxx_xxxxxx));
  xxxxxxxxxxxxxxx::xxxxxxxx()->xxxxxxxxx(xxxxxxxxxxxxxxx::xxxxxxxxxxxxx, xxxx->xxxxxxxxx(xx_xxxxxx_xxxxxx));
  xxxxxxxxxxxxxxx::xxxxxxxx()->xxxxxxxxx(xxxxxxxxxxxxxxx::xxxxxxxxxxx, xxxx->xxxxxxxxx(xx_xxxxx));
  xxxxxxxxxxxxxxx::xxxxxxxx()->xxxxxxxxx(xxxxxxxxxxxxxxx::xxxxxxxxxxxx90xx, xxxx->xxxxxxxxx(xx_xxxxxx90xx));
  xxxxxxxxxxxxxxx::xxxxxxxx()->xxxxxxxxx(xxxxxxxxxxxxxxx::xxxxxxxxxxxx90xxx, xxxx->xxxxxxxxx(xx_xxxxxx90xxx));
  xxxxxxxxxxxxxxx::xxxxxxxx()->xxxxxxxxx(xxxxxxxxxxxxxxx::xxxxxxxxxx180x, xxxx->xxxxxxxxx(xx_xxxx180x));
  xxxxxxxxxxxxxxx::xxxxxxxx()->xxxxxxxxx(xxxxxxxxxxxxxxx::xxxxxxxxxx180x, xxxx->xxxxxxxxx(xx_xxxx180x));
  xxxxxxxxxxxxxxx::xxxxxxxx()->xxxxxxxxx(xxxxxxxxxxxxxxx::xxxxxxxxxxxxxxx, xxxx->xxxxxxxxx(xx_xxxxxxxxx));
  xxxxxxxxxxxxxxx::xxxxxxxx()->xxxxxxxxx(xxxxxxxxxxxxxxx::xxxxxxxxxxx, xxxx->xxxxxxxxx(xx_xxxxx));
  xxxxxxxxxxxxxxx::xxxxxxxx()->xxxxxxxxx(xxxxxxxxxxxxxxx::xxxxxxxxxxx, xxxx->xxxxxxxxx(xx_xxxxx));
  xxxxxxxxxxxxxxx::xxxxxxxx()->xxxxxxxxx(xxxxxxxxxxxxxxx::xxxxxxxxxxxxxxxxxxxxxxxx, xxxx->xxxxxxxxx(xx_xxxxxxx_xxxxxx));
  xxxxxxxxxxxxxxx::xxxxxxxx()->xxxxxxxxx(xxxxxxxxxxxxxxx::xxxxxxxxxxx, xxxx->xxxxxxxxx(xx_xxxxx));
  xxxxxxxxxxxxxxx::xxxxxxxx()->xxxxxxxxx(xxxxxxxxxxxxxxx::xxxxxxxxxxxxxx, xxxx->xxxxxxxxx(xx_xxxxxxxx));
  xxxxxxxxxxxxxxx::xxxxxxxx()->xxxxxxxxx(xxxxxxxxxxxxxxx::xxxxxxxxxxxxx, xxxx->xxxxxxxxx(xx_xxxxx));
  xxxxxxxxxxxxxxx::xxxxxxxx()->xxxxxxxxx(xxxxxxxxxxxxxxx::xxxxxxxxxxxx, xxxx->xxxxxxxxx(xx_xxxxxx));
  xxxxxxxxxxxxxxx::xxxxxxxx()->xxxxxxxxx(xxxxxxxxxxxxxxx::xxxxxxxxxxx, xxxx->xxxxxxxxx(xx_xxxxx));
  xxxxxxxxxxxxxxx::xxxxxxxx()->xxxxxxxxx(xxxxxxxxxxxxxxx::xxxxxxxxxxx, xxxx->xxxxxxxxx(xx_xxxxx));
  xxxxxxxxxxxxxxx::xxxxxxxx()->xxxxxxxxx(xxxxxxxxxxxxxxx::xxxxxxxxxxxx, xxxx->xxxxxxxxx(xx_xxxxxx));
  xxxxxxxxxxxxxxx::xxxxxxxx()->xxxxxxxxx(xxxxxxxxxxxxxxx::xxxxxxxxxxxxx, xxxx->xxxxxxxxx(xx_xxxxxxx));
  xxxxxxxxxxxxxxx::xxxxxxxx()->xxxxxxxxx(xxxxxxxxxxxxxxx::xxxxxxxxxxxxxxx, xxxx->xxxxxxxxx(xx_xxxxxxxxx));
  xxxxxxxxxxxxxxx::xxxxxxxx()->xxxxxxxxx(xxxxxxxxxxxxxxx::xxxxxxxxx, xxxx->xxxxxxxxx(xx_xxx));
  xxxxxxxxxxxxxxx::xxxxxxxx()->xxxxxxxxx(xxxxxxxxxxxxxxx::xxxxxxxxxxxxx, xxxx->xxxxxxxxx(xx_xxx_xxxx));
  xxxxxxxxxxxxxxx::xxxxxxxx()->xxxxxxxxx(xxxxxxxxxxxxxxx::xxxxxxxxxxxxxxxx, xxxx->xxxxxxxxx(xx_xxxx_xxxxxx));
  xxxxxxxxxxxxxxx::xxxxxxxx()->xxxxxxxxx(xxxxxxxxxxxxxxx::xxxxxxxxxxxxxxxx, xxxx->xxxxxxxxx(xx_xxxx_xxxxxx));
 
  xxxxxxx::xxxxxxx(xxxx->xxxxxxxxx(xx_xxxx_xxxx_xxxxxx), xxxxxx(xxxxxxxxx()), xxxx, xxxx(xxxxxxxxxxxxxxxx()));
  xxxxxxx::xxxxxxx(xxxx->xxxxxxxxx(xx_xxxx_xxxx_xxxxxx), xxxxxx(xxxxxxxxx()), xxxx, xxxx(xxxxxxxxxxxxxxx()));
 
  xxxxxxx::xxxxxxx(xxxx->xxxxxxxxx(xx_xxxxxx_xxxxxx), xxxxxx(xxxxxxxxx()), xxxx, xxxx(xxxxxxxxxxxxxx()));
  xxxxxxx::xxxxxxx(xxxx->xxxxxxxxx(xx_xxxxxx_xxxxxx), xxxxxx(xxxxxxxxx()), xxxx, xxxx(xxxxxxxxxxxxxxxxxxxxx()));
  xxxxxxx::xxxxxxx(xxxx->xxxxxxxxx(xx_xxxxxx_xxxxxx), xxxxxx(xxxxxxxxx()), xxxx, xxxx(xxxxxxxxxxxxxxxxxxx()));
  xxxxxxx::xxxxxxx(xxxx->xxxxxxxxx(xx_xxxxxx_xxxxx), xxxxxx(xxxxxxxxx()), xxxx, xxxx(xxxxx()));
 
#xxxxx xxxxx_xxxx
  xxxxxxx::xxxxxxx(xxxx->xxxxxxxxx(xx_xxxx_xxxxxx), xxxxxx(xxxxxxxxx()), xxxx, xxxx(xxxxxxxxxxxxxxxxxx()));
#xxxxx
  xxxxxxx::xxxxxxx(xxxx->xxxxxxxxx(xx_xxxx), xxxxxx(xxxxxxxxx()), xxxx, xxxx(xxxxxxxxxxxx()));
  xxxxxxx::xxxxxxx(xxxx->xxxxxxxxx(xx_xxxx), xxxxxx(xxxxxxxxx()), xxxx, xxxx(xxxxxxxxxxxx()));
 
  xxxxxxx::xxxxxxx(xxxx->xxxxxxxxx(xx_xxxx_xxxxx_xxxx), xxxxxx(xxxxxxxxx()), xxxx, xxxx(xxxxxxxxxxxxxxxxxxxx()));
 
  xxxxxxx::xxxxxxx(xxxx->xxxxxxxxx(xx_xxxxxx), xxxxxx(xxxxxxxxx()), xxxx, xxxx(xxxxxxxxxxxxxx()));
  xxxxxxx::xxxxxxx(xxxx->xxxxxxxxx(xx_xxxxxxxxxx), xxxxxx(xxxxxxxxx()), xxxx, xxxx(xxxxxxxxxxxxxxxxxx()));
  xxxxxxx::xxxxxxx(xxxx->xxxxxxxxx(xx_xxxx_xxxxxx), xxxxxx(xxxxxxxxx()), xxxx, xxxx(xxxxxxxxxxxxxxxxxx()));
  xxxxxxx::xxxxxxx(xxxx->xxxxxxxxx(xx_xxxx_xxxx), xxxxxx(xxxxxxxxx()), xxxx, xxxx(xxxxxxxxxxxxxxxx()));
  xxxxxxx::xxxxxxx(xxxx->xxxxxxxxx(xx_xxxxxx_xxxx_xxxxx_xxxxxxx), xxxxxx(xxxxxxxxx()), xxxx,
│       ¦          xxxx(xxxxxxxxxxxxxxxxxxxxxxxxxx()));
  xxxxxxx::xxxxxxx(xxxx->xxxxxxxxx(xx_xxxxxxxx_xxxx_xxxxx_xxxxxxx), xxxxxx(xxxxxxxxx()), xxxx,
│       ¦          xxxx(xxxxxxxxxxxxxxxxxxxxxxxxxxxx()));
  xxxxxxx::xxxxxxx(xxxx->xxxxxxxxx(xx_xxxx_xxxxxxx), xxxxxx(xxxxxxxxx()), xxxx, xxxx(xxxxxxxxxxxxxxxxxxx()));
  xxxxxxx::xxxxxxx(xxxx->xxxxxxxxx(xx_xxxx_xxxx), xxxxxx(xxxxxxxxx()), xxxx, xxxx(xxxxxxxxxxxxxxxxxxxxxx()));
  xxxxxxx::xxxxxxx(xxxx->xxxxxxxxx(xx_xxxxxx_xxxx), xxxxxx(xxxxxxxxx()), xxxx, xxxx(xxxxxxxxxxxxxxxxxxxxxx()));
  xxxxxxx::xxxxxxx(xxxx->xxxxxxxxx(xx_xxxxxxxx_xxxx), xxxxxx(xxxxxxxxx()), xxxx, xxxx(xxxxxxxxxxxxxxxxxxxxxxxxx()));
  xxxxxxx::xxxxxxx(xxxx->xxxxxxxxx(xx_xxxxx_xxxx), xxxxxx(xxxxxxxxx()), xxxx, xxxx(xxxxxxxxxxxxxxxxxxxxxxxxx()));
  xxxxxxx::xxxxxxx(xxxx->xxxxxxxxx(xx_xxxxx_xxxxx_xxxx), xxxxxx(xxxxxxxxx()), xxxx, xxxx(xxxxxxxxxxxxxxxxxxxxxx()));
  xxxxxxx::xxxxxxx(xxxx->xxxxxxxxx(xx_xxxxx_xxxx_xxxx), xxxxxx(xxxxxxxxx()), xxxx, xxxx(xxxxxxxxxxxxxxxxxxxxxx()));
  xxxxxxx::xxxxxxx(xxxx->xxxxxxxxx(xx_xxxxx_xxxx_xxxxxx), xxxxxx(xxxxxxxxx()), xxxx, xxxx(xxxxxxxxxxxxxxxxxxxxxx()));
  xxxxxxx::xxxxxxx(xxxx->xxxxxxxxx(xx_xxxxx_xxxx_xxxx_xxxx), xxxxxx(xxxxxxxxx()), xxxx, xxxx(xxxxxxxxxxxxxxxxxxxxxx()));
  xxxxxxx::xxxxxxx(xxxx->xxxxxxxxx(xx_xxxxx_xxxx_xx), xxxxxx(xxxxxxxxx()), xxxx, xxxx(xxxxxxxxxxxxxxxxxxx()));
}

How to add other exclude files?

Since the exclusion files of this plugin are not comprehensive enough,
when opening files such as "Outline", "trouble", etc.,
there will be
image
How to solve this? Thanks.

Hidden text when unindented

Describe the bug
When I have unindented text (e.g., after copy-pasting code), much of the text is hidden by the indent lines.

To Reproduce
Use my config with unindented text, such as the one shown in the screenshot below. My config:

chunk = {
    enable = true,
    use_treesitter = true,
    notify = true,
    chars = {
        horizontal_line = icons.bar.horizontal_thin,
        vertical_line = icons.bar.vertical_center_thin,
        left_top = icons.bar.upper_left_corner_thin,
        left_bottom = icons.bar.lower_left_corner_thin,
        right_arrow = icons.bar.horizontal_thin,
    },
    style = {
        {
            fg = c.info_fg,
        },
    },
    exclude_filetypes = {
        qf = true,
        help = true,
        dapui_scopes = true,
        dapui_watches = true,
        dapui_stacks = true,
        dapui_breakpoints = true,
        dapui_console = true,
        ["dap-repl"] = true,
        harpoon = true,
        dropbar_menu = true,
        glow = true,
        aerial = true,
        dashboard = true,
        lspinfo = true,
        lspsagafinder = true,
        packer = true,
        checkhealth = true,
        man = true,
        mason = true,
        NvimTree = true,
        ["neo-tree"] = true,
        plugin = true,
        lazy = true,
        TelescopePrompt = true,
        [""] = true, -- because TelescopePrompt will set a empty ft, so add this.
        alpha = true,
        toggleterm = true,
        sagafinder = true,
        sagaoutline = true,
        better_term = true,
        fugitiveblame = true,
        Trouble = true,
        Outline = true,
        starter = true,
        NeogitPopup = true,
        NeogitStatus = true,
        DiffviewFiles = true,
        DiffviewFileHistory = true,
        DressingInput = true,
        spectre_panel = true,
        zsh = true,
        vuffers = true,
    },
},

indent = {
    enable = true,
    use_treesitter = true,
    chars = {
        icons.bar.vertical_center_thin,
    },
    style = {
        {
            fg = c.comment_fg,
        },
    },
},

line_num = {
    enable = false,
},

blank = {
    enable = false,
    chars = {
        " ",
    },
    style = {
        {
            bg = c.bg,
        },
        {
            bg = c.cursor_line_bg,
        },
    },
},

Expected behavior
To never have real text hidden by indent lines.

Screenshots
Screenshot 2023-11-14 at 17 17 10

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.