-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VS Code Support #200
VS Code Support #200
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, I think this is really great work. I'd like to hold back on the publish workflow (see my comments), but otherwise I think it's very close to being ready to merge.
Once we do merge it, I'll add you as a collaborator to the repo.
| ------------------------------- | ------------------------------- | ------------------- | | ||
| Harper: Restart Language Server | `harper.languageserver.restart` | Restart `harper-ls` | | ||
|
||
### Settings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to include linter descriptions in the README? I would imagine they should be self-explanatory enough to stand alone in the settings page. I'm not a huge fan of the duplication with package.json
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand. I'd also prefer not to duplicate them, but I just thought it might help people who find out about Harper from the VS Code Marketplace first to get an overview of what exactly it checks for. However, I can remove it if you think it is unnecessary.
I would like to test this out on a couple systems other than my own. @lukasmwerner can you confirm that this works on ARM Mac? Make sure you remove your existing |
Confirmed working on M1 running Sonoma 14.0! Loads the bundled Once I have time later today I'll test on my Alpine Linux install. |
I've done some testing and it looks like our current CI setup for Windows is broken. See #208. I'd like to get this fixed before merging. |
Sorry this has takes so long to get through. I'm going to merge it and cut a release as soon as possible. Thank you so much for all you work. |
Hi, I finally got around to finishing things and making this PR. You may have already seen some of these changes since I saw that you starred my fork a few days ago, but here's a breakdown of what I've done and some notes about them.
Extension
harper-ls
to be bundled with it.harper-ls
if they want.harper-ls
is now automatically restarted so those changes are reflected right away.Tests
I've added some integration tests, mostly to serve as a smoke test to ensure that the extension works with the current state of
harper-ls
. In the process, I removed unused scripts and dependencies inpackage.json
and cleaned up the files in.vscode
a bit.justfile
test-vscode
recipe.package-vscode
recipe, mostly so it can be used by the workflow discussed below.test-vscode
instead ofpackage-vscode
in bothprecommit
, because it's a better gauge if the extension is working properly, andsetup
, because testing downloads extra resources that packaging doesn't.Docs
CHANGELOG.md
for the extension changes I've done.README.md
for the Marketplace. I intentionally left the "Installation" section empty for when you're ready to release or have released the extension as people might be misled when they get an error trying to installelijah-potter.harper
and get an error.development-guide.md
to make it easier for those who want to contribute.Publishing Workflow
I created a workflow to assist in publishing the extension, basing on
build_harper_ls.yml
, it compilesharper-ls
for every platform currently supported, packages it with the extension, then publishes the extension for each platform. It can be triggered by pushing a tag prefixed withharper-vscode
or manually in the GitHub Actions UI. For the workflow to work, you need to create theelijah-potter
publisher, get a Personal Access Token (PAT), and create a secret namedVSCE_PAT
set to the value of the PAT you previously obtained.My idea with this is that the extension would have the same version as
harper-ls
so it's easy for users (and us if they file an issue) to know that extension version X is alsoharper-ls
version X. So when publishing with this workflow, the main manual work that needs to be done before running it is to update theversion
inpackage.json
and maybe change the "Unreleased" section inCHANGELOG.md
, if there is any, to the new version. That said, I'm open to other ideas, maybe you prefer a different way of publishing the extension or you want to reduce the manual steps or maybe you want to test the extension first before it's packaged to be sure it works.Note, you may notice that I added
"endOfLine": "auto"
to.prettierrc
and that's because Prettier throws a fit in Windows without this. Here's an example of a run where everything is okay with macOS and Linux but not Windows.Closes #116