Closed cameronr closed 2 months ago
Hey @cameronr sorry, been a bit busy with work lately. Yes, I've been wanting to streamline the configs for sometime now. Something that particularly bothers me is that the LSP gets confused as to what options are available to use. And yes the vimscript configs need to be supported as legacy but certainly shouldn't be the default checks. Maybe a more streamlined implementation in a config.lua
file like you mentioned could transparently handle whether the configs come from vimscript or the lua config.
I think the goal on a revamp like this should be to make the configs easily discoverable by the LSP, with proper docstring documentation for each field.
No worries, this is just a background idea. Good point to make sure whatever we do works well with the lua ls. I'm still ruminating on this one. I'd like to do it at some point but may take some time.
@rmagatti it's not done yet (still have to do readme, maybe unify autocmds), but i made a bunch of progress on the config cleanup. can see some of it here if you want to take an early look:
https://github.com/cameronr/auto-session/blob/config-overhaul/lua/auto-session/config.lua
it's working nicely with lua_ls (when using a config function, sadly lazy opts tables don't get the same treatment):
Nice, that looks awesome!
ooh, i figured out how to enable it for opts as well:
Closed in #359
I'm thinking about trying to revamp the config to something like:
I would plan to make the Lua config the default in the docs but I'd support the existing vimscript args. I think I'd add a
config.lua
file and do everything there but that's still just a thought.@rmagatti What do you think? Are there other changes you'd make?