xixiaofinland / sf.nvim

22 stars 6 forks source link

Feat: Adds Ability to Select Scratch Orgs as target_org #48

Closed waltonzt closed 2 months ago

waltonzt commented 2 months ago

Starts to address #47

@xixiaofinland Here is what I have so far. The first step to allow scratch org development is to allow the selection of scratch orgs when choosing a target_org. I added a indicator in order to alert the user which orgs are scratch orgs. I also handle the scenario where an org is created without an alias. In that case it uses the username instead.

Please let me know your thoughts!

Future work: I figure this is a good start but in my workflow I will need a push/pull all. This seems like a straightforward change but I am unsure if I should put it in this pull request or create a seperate one. Let me know your thoughts. I am very new to lua so please let me know if what I wrote is terrible 😄

xixiaofinland commented 2 months ago

Thanks a lot, it works like a charm. Easy to comprehend and small size PR, really appreciate it! @waltonzt

xixiaofinland commented 2 months ago

It seems there was one line of code in the wrong order so non-aliased default (scratch) org is not auto-set. I fixed it and refactored a bit of this part :).

https://github.com/xixiaofinland/sf.nvim/blob/41cca47403925dac470655fdafc2fb1bd109b84d/lua/sf/org.lua#L84-L92