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

Doesn't work in php #95

Closed mostafaqanbaryan closed 4 months ago

mostafaqanbaryan commented 5 months ago

Describe the bug So I recently installed hlchunk and It's beautiful.

But something I came across is that it doesn't work well with php.

If you have a large file and move between lines, it's obvious that the chunk line is stuck on some other place.

To Reproduce Save the code as php and move between methods.

chunk should easily move between class and its methods

(If it's didn't happen, I would upload an screencast)

<?php

class test{
    function a(){
        echo 'test a';
    }

    function b(){
        echo 'test b';
    }
}

Expected behavior As shown in screenshot, I've moved to function b, but chunk stuck on function a

Screenshots image

Additional context Tested with lua and js, but those work fine

shellRaining commented 4 months ago

sorry for late reply, I can't reproduce this bug, can you switch to dev branch and have a try again?

mostafaqanbaryan commented 4 months ago

sorry for late reply, I can't reproduce this bug, can you switch to dev branch and have a try again?

I don't know if it was nvim 9 or hlchunk's previous commits, but it's now fixed on nvim 10. Thank you!