huy-hng / anyline.nvim

Neovim Indentation Line with Animations
68 stars 1 forks source link

It seems that those indentation lines are not immediately shown after calling `setup`. #2

Open nyngwang opened 1 year ago

nyngwang commented 1 year ago

Hi, really cool plugin(I love animation, lol)! While I would expect that a plugin will get enabled after calling its setup.


I just tested again with the following specs according to your comment on Reddit:

{
  'huy-hng/anyline.nvim', lazy = true, -- enable lazy-loading.
  dependencies = { 'nvim-treesitter/nvim-treesitter' },
  config = function ()
    require('anyline').setup()
    vim.keymap.set('n', '<Leader>ai', function () require('anyline').setup() end)
  end
}

update: I found that these steps always work to show the indentation lines:

  1. Enable lazy = true.
  2. After starting Neovim, call require('anyline').setup() manually.
  3. Then press G. (as DEMO)

Without step 3. I cannot find a way to show those lines.

DEMO

https://user-images.githubusercontent.com/24765272/221699679-49dff9d2-d492-4970-8356-cfdd66caf07b.mov

huy-hng commented 1 year ago

Thank you for putting in so much work to help me out! I use the 'VeryLazy' event in lazy practically everywhere which causes plugins to load after most other stuff. As a quick dirty hack this will make stuff work like intended. I think your issue points me to the reason of the issue, thanks again!

{
        'huy-hng/anyline.nvim',
        dependencies = { 'nvim-treesitter/nvim-treesitter' }
        event = 'VeryLazy',
}
huy-hng commented 1 year ago

Unfortunately, I cannot reproduce your setup :/ I've tried a completely clean setup and that seems to work fine. It could be a clash with your plugins? when you use lazy = true you'll need to set an event or another trigger in order to load the config (I think) otherwise it will have to be called manually.

If you do find the issue, please do let me know, I'll try to find a work around so others don't experience the same issue :)

itzaeon commented 1 year ago

Completely unrelated, but @nyngwang - what colorscheme and font are you using? I can't seem to find them on your Github. Thanks!

nyngwang commented 1 year ago

To @itzaeon:

what colorscheme and font are you using?

I can't seem to find them on your Github. Thanks!

Sorry about that but some personal info. involves so I haven't released it.

nyngwang commented 1 year ago

@itzaeon Since you have got the answer, we should hide our comments as these are unrelated to the OP