Closed tony-hmi closed 1 week ago
Hey @tony-hmi, First off, thanks for the PR and for contributing! Couple of comments.
dev
branch? The development flow is to merge to dev
and then when I do a merge to main
it will automatically publish / deploy to vscode marketplace via CI/CD. This results in a cleaner main
branch and allows me to more concretely control the CHANGELOG.md
and README.md
.pygls
, I looked into automating the python dependencies stuff (albeit not as in depth as it seems you have). I ended up backing off after finding a number of threads like this.I'll take a look at this more closely and shoot back some more comments.
Okay, changing base was not a good idea, I'll fork dev, make the updates there and make a new PR.
As far as the user experience, this is just an improvement.
Current workflow. User installs extension and in worse case gets just syntax highlighting. They install the python extension, and then worse case they get errors about bad pygls import.
This workflow. The user installs the extension, and there are prompts that guide to indicate a python executable. If one is located, it's suggested to the user. Then do there's no dependency issue, it actually uses the indicated Python to create a virtual environment then installs any dependency in the requirements.txt.
The fact a user picks a python version and has to install pygls is unchanged. It's just smoother.
This PR adds a configuration option for the python interpreter and logic in the extension.ts script to use that configured python or hunt from a few likely paths for a python, prompt the user if they'd like to use it, then use it to create a virtual environment.
Been dabbling in language servers myself lately using this approach and thought this would reduce some user burden on this tool too.