TodoTreeView icon indicating copy to clipboard operation
TodoTreeView copied to clipboard

[BUG]: `treeview_size`

Open PerilousBooklet opened this issue 1 year ago • 5 comments

treeview_size override in init.lua works only when manually saving init.lua .

PerilousBooklet avatar Jul 14 '24 10:07 PerilousBooklet

Thanks for the report, need some extra information to simplify testing:

  • Are you using the original lite or lite-xl?
  • Which operative system do you use?

drmargarido avatar Jul 14 '24 21:07 drmargarido

I'm using Lite XL 2.1.5 on Arch Linux. But I had the same problem on previous Lite XL versions (2.1.2, 2.1.3, 2.1.4) in the last 6 months (more or less).

PerilousBooklet avatar Jul 15 '24 02:07 PerilousBooklet

I was thinking that maybe it has to do with the fact that you don't use the common.merge() way to manage config options. What do you think ?

PerilousBooklet avatar Jul 15 '24 08:07 PerilousBooklet

Yes, it's probably related to that. I created this plugin to work with the original Lite. Then added some support for LiteXL but never changed the settings. I'm a bit occupied this week, do you want to try to implement a fix and send a PR? Otherwise I can test it and implement a fix when I have some free time.

drmargarido avatar Jul 15 '24 17:07 drmargarido

I've already been trying to convert the config options to use common.merge(), but it still doesn't work so I'll need some more time to understand why. I'll open a PR as soon as I have it working.

PerilousBooklet avatar Jul 15 '24 18:07 PerilousBooklet

I got some time now and tried to reproduce the issue. I edited the init.lua file and it worked as expected. How you are changing that value without editing the file? How can I reproduce the issue?

drmargarido avatar Aug 08 '24 12:08 drmargarido

I did the following: Run this: lpm run todotreeview Add config.treeview_size = 600 * SCALE to the user init.lua Do core:quit Re-run lpm run todotreeview The width that you see should be back to 200, even though in the user init.lua it's 600

PerilousBooklet avatar Aug 09 '24 08:08 PerilousBooklet

The issue here will be that lpm will always pick the version set in it's configuration file for the plugin so if even you change stuff it will still pick the old version. Still have to test some more but I think it mostly should be working now. Will then need to update the version to be used by lpm in the lite-xl-plugins repository

drmargarido avatar Aug 09 '24 12:08 drmargarido

Issue should be fixed in this commit https://github.com/drmargarido/TodoTreeView/commit/0b3937a0f0d761843df9b71cfea35884e839348b. You will need to use config.plugins.todotreeview instead of just config when changing configs in the init.lua file from now on.

I still have to make a PR on the lite-xl-plugins repo for lpm to pick the most recent version.

drmargarido avatar Aug 09 '24 16:08 drmargarido

I'll try right away, thanks.

PerilousBooklet avatar Aug 09 '24 16:08 PerilousBooklet

It seems to be working perfectly now! Btw, thanks for making this plugin! It's become an important part of my workflow and a very useful addition for Lite XL IDE.

PerilousBooklet avatar Aug 09 '24 16:08 PerilousBooklet

Nice, glad it's working and it's useful for you :+1: In the meantime I created a PR in the lite-xl-plugins repository to update the version they pick there https://github.com/lite-xl/lite-xl-plugins/pull/474

drmargarido avatar Aug 09 '24 17:08 drmargarido

PR was now merged to LiteXL so if people download it with lpm it should pick the most recent version.

drmargarido avatar Oct 01 '24 20:10 drmargarido