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 is not enabled. #119

Closed iokira closed 3 months ago

iokira commented 3 months ago

Thanks for all the great plugins. I am reporting that since commit 44ee797, the indent feature is not enabled.

I started nvim with the following command and loaded the plugin using lazy.nvim, but the indent feature was not enabled. Screenshot 2024-06-23 at 20 45 32

nvim -u init.lua init.lua

init.lua

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
    vim.fn.system({
        "git",
        "clone",
        "--filter=blob:none",
        "https://github.com/folke/lazy.nvim.git",
        "--branch=stable",
        lazypath,
    })
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup({
    {
        "shellRaining/hlchunk.nvim",
        lazy = true,
        event = { "BufReadPre", "BufAdd", "BufNewFile" },
        config = function()
            require("hlchunk").setup({
                indent = {
                    enable = true,
                },
            })
        end,
    },
})

Before commit f4e8e1a, the indent feature was enabled successfully. Screenshot 2024-06-23 at 20 45 07

This is my first bug report, so sorry if there are any poor or missing parts.

shellRaining commented 3 months ago

thanks for your detail report first!

but for sorry I can't reproduce this bug, I touch a file repro.lua first, and paste the code you provide, and run nvim -u repro.lua init.lua, it render properly

image

and what version or branch are you using now, I'm testing in dev branch

iokira commented 3 months ago

Thanks for the quick response. The version of nvim I am using was 0.9.5. I updated to 0.10.0 ASAP and the indent function works fine. I will try again using the plugin with nvim version 0.9.5 and see if I can reproduce the bug!

shellRaining commented 3 months ago

glad that issue resolved, but what confuses me is that I did not use the API of Neovim 0.10.0, maybe there exist some other bug...

iokira commented 3 months ago

At any rate, I am glad the problem is solved. I will close the issue as I don't see anyone else experiencing the same bug. If I find the cause of the problem, I will contact you again. Thanks for your valuable time!