leonardssh / vscord

😎 Fully customizable VS Code extension to get Discord Rich Presence integration.
https://marketplace.visualstudio.com/items?itemName=LeonardSSH.vscord
MIT License
501 stars 102 forks source link

Rework the config system. #151

Open xhayper opened 1 year ago

xhayper commented 1 year ago

Currently, the system is very messy due to we :cough: having too much customization option, we need to design a better system to reduce the complexity and confusion.

leonardssh commented 1 year ago

I agree

xhayper commented 1 year ago

and i though the first rework makes it less complicate... it doesn't...

xhayper commented 1 year ago

@nick22985 calling you in because you are very active contributor.

nick22985 commented 1 year ago

I agree lol, time to make it more less messy xD

xhayper commented 1 year ago

I was thinking of a small scrippting lang so we can merge tons of stuff and provide all customization.

nick22985 commented 1 year ago

oooo sounds cool

xhayper commented 1 year ago

but the problem is, me, you and leonard don't know how to make AST / parser / lexer xD.

xhayper commented 1 year ago
if in workspace then
   if git is active then
      // TODO: decide how to provide variable
      // maybe {{}} ? or just treat it like js, var
      // global.gitLink
      set button.one.url to 
      set button.one.text to "View repository"
   end
end
nick22985 commented 1 year ago

but the problem is, me, you and leonard don't know how to make AST / parser / lexer xD.

yea

xhayper commented 1 year ago

It's a really hard thing to do.

nick22985 commented 1 year ago

Yea it doesn't seem very easy. I wouldn't even know where we would put the config file.

We probably could cut down a bit on the config options by making some of their tables with enums (if enums work I haven't really tested it) Something like this(https://gyazo.com/14fdbd556a6ae8981d80334d9936fced) for each section that has state makes an object which is usable and can easily be changed in the extension without a massive refactor https://gyazo.com/3aad601a80d78c079db63b97e325363a