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
628 stars 31 forks source link

Indent style is not working and chunk never indents into the nested sections #92

Closed NeckBeardPrince closed 4 months ago

NeckBeardPrince commented 6 months ago

Describe the bug I'm attempting to replicate the rainbow indent style here. Except the style does not seem to work. And with chunk when selecting indented text it never indents in like you see in this gif.

❯ nvim --version
NVIM v0.10.0-dev-2039+g583c1de17-Homebrew
Build type: Release
LuaJIT 2.1.1710088188
Run "nvim -V1 -v" for more info

Screenshots vid

Additional context

return {
  "shellRaining/hlchunk.nvim",
  enabled = true,
  opts = {
    indent = {
      enable = true,
      style = {
        "#FF0000",
        "#FF7F00",
        "#FFFF00",
        "#00FF00",
        "#00FFFF",
        "#0000FF",
        "#8B00FF",
      },
    },
    blank = {
      enable = false,
    },
    chunk = {
      enable = true,
      use_treesitter = true,
      chunk = {
        chars = {
          horizontal_line = "─",
          vertical_line = "│",
          left_top = "╭",
          left_bottom = "╰",
          right_arrow = ">",
        },
        style = "#00ffff",
      },
    },
    line_num = {
      enable = true,
    },
    exclude_filetype = {
      aerial = true,
      NvimTree = true,
      help = true,
      alpha = true,
      dashboard = true,
      Trouble = true,
      trouble = true,
      lazy = true,
      mason = true,
      notify = true,
      toggleterm = true,
      lazyterm = true,
    },
  },
  event = { "UIEnter" },
  config = function()
    require("hlchunk").setup({})
  end,
}
shellRaining commented 4 months ago

rainbow indent seems work properly... chunk does has some bug, I will fix it

NeckBeardPrince commented 4 months ago

Edit: I figured out my issue.

return {
  "shellRaining/hlchunk.nvim",
  enabled = true,
  branch = "main",
  event = { "UIEnter" },
  config = function()
    require("hlchunk").setup({
      indent = {
        enable = true,
        style = {
          "#FF0000",
          "#FF7F00",
          "#FFFF00",
          "#00FF00",
          "#00FFFF",
          "#0000FF",
          "#8B00FF",
        },
      },
      blank = {
        enable = false,
      },
      chunk = {
        enable = true,
        use_treesitter = true,
        chunk = {
          chars = {
            horizontal_line = "─",
            vertical_line = "│",
            left_top = "╭",
            left_bottom = "╰",
            right_arrow = ">",
          },
          style = {
            "#FF0000",
            "#FF7F00",
            "#FFFF00",
            "#00FF00",
            "#00FFFF",
            "#0000FF",
            "#8B00FF",
          },
        },
      },
      line_num = {
        enable = true,
      },
      exclude_filetype = {
        aerial = true,
        NvimTree = true,
        help = true,
        alpha = true,
        dashboard = true,
        Trouble = true,
        trouble = true,
        lazy = true,
        mason = true,
        notify = true,
        toggleterm = true,
        lazyterm = true,
      },
    })
  end,
}
shellRaining commented 4 months ago

fixed in latest commit~