Skip to content

docs: update integrations section #755

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

Merged
merged 21 commits into from
Mar 6, 2025

Conversation

mcecode
Copy link
Collaborator

@mcecode mcecode commented Feb 23, 2025

Issues

Not an issue, but a discussion on #710.

Description

  • Rearrange integrations section's navigation (language server which powers editor integrations > editors with official plugins > editors that directly integrate with harper-ls > editors with third-party/community plugins)
  • Transfer VS Code readme info to official docs
  • Transfer VS Code development guide to official docs
  • Remove non-Neovim specific installation methods in the Neovim page
  • Transfer the configuration section explanations from the Neovim page to a new configuration section in the language server page
  • Add link to language server installation instructions and sample config in the Helix page
  • Add link to language server installation instructions and sample config in the Emacs page
  • Add code actions section in language server page

Note: I removed the "Copy Default Config to Clipboard" button in the Neovim page for now, but I'll try to bring it back in another PR so this one can focus on the docs' contents rather than functionality.

How Has This Been Tested?

  • Using Harper in VS Code
  • Using just dev-web and viewing the results in my browser

Checklist

  • I have performed a self-review of my own code
  • I have added tests to cover my changes

@elijah-potter
Copy link
Collaborator

Note: I removed the "Copy Default Config to Clipboard" button in the Neovim page for now, but I'll try to bring it back in another PR so this one can focus on the docs' contents rather than functionality.

That button only existed because SveltePress couldn't render code at runtime. I believe their upcoming release will be able to. If that happens before you're done with this PR, it might be worth swapping the button over to a rendered view.

@mcecode
Copy link
Collaborator Author

mcecode commented Mar 2, 2025

I think this is ready for review. I'd like to get some feedback in case I made a mistake or if there's something I missed.

  • @elijah-potter, for everything but especially the harper-ls and Neovim pages
  • @hippietrail, for the VS Code pages and also for the overall grammar and such
  • @ficcdaf, for the Helix page
  • @anarcat, for the Emacs page, sorry for the tag out of nowhere but the info you provided in emacs configuration? #150 really helped me write this page, so I'd like your feedback, especially when it comes to the example configs I provided since I don't know anything about Emacs or Lisp. You can just view the Markdown here so you don't have to clone or build anything.

@mcecode mcecode marked this pull request as ready for review March 2, 2025 13:27
@mcecode mcecode requested a review from elijah-potter March 2, 2025 13:28
@elijah-potter
Copy link
Collaborator

This is some truly gorgeous work @mcecode. Everything looks good to me. I'll wait until some others have a chance to review it before merging.

Copy link
Contributor

@ficcdaf ficcdaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Helix integration:

I think it would be better to get rid of the Installation section and instead begin with a Required Setup section. This section should say you need harper-ls available on your system path, show how to create the harper-ls language server inside languages.toml (you have these already), but also mention that you need to explicitly enable harper for any languages/filetypes you want it to run on, with an example of how to do that.

I expand on what I mean by this in comments on the file itself. Please let me know if you're unclear about it.

What's left of the configuration section, in my opinion you could rename to Optional Configuration. This way, it's immediately clear to the user what's required in order for harper to work, and what's optional for them to tweak to their liking.

@ficcdaf
Copy link
Contributor

ficcdaf commented Mar 4, 2025

It looks great! The Helix page is much, much clearer now. Your explanation is very good!

@mcecode
Copy link
Collaborator Author

mcecode commented Mar 4, 2025

It looks great! The Helix page is much, much clearer now. Your explanation is very good!

Thanks for the help @ficcdaf! Your suggestions also helped me improve the Neovim and Emacs pages in using "Required Setup" and "Optional Configuration" sections rather than "Installation" and "Configuration" sections.

Co-authored-by: ficcdaf <[email protected]>
@ficcdaf
Copy link
Contributor

ficcdaf commented Mar 4, 2025

Glad to help :) I have no more comments, it all looks good from my end. But I've only checked the Helix page. Thanks for the work! I think this will help people a lot in getting started with harper.

I saw [this comment](Automattic#722 (comment)), which indicated this was missing.
@mcecode
Copy link
Collaborator Author

mcecode commented Mar 6, 2025

Hi @elijah-potter, I think this can merged now since some time has passed since I asked for feedback and at least you and Daniel have approved the updates. If needed, we can just add further clarifications in subsequent PRs. It'd also be nice to have the docs updated for the new release yesterday.

Copy link
Contributor

@anarcat anarcat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, in general, but since you asked for my advice, i have suggestions :)

```elisp title=init.el
(with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs
'(major-mode . ("harper-ls" "--stdio"))))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

major-mode is weird here, just use an actual mode:

Suggested change
'(major-mode . ("harper-ls" "--stdio"))))
'(text-mode . ("harper-ls" "--stdio"))))

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edited.

@ficcdaf
Copy link
Contributor

ficcdaf commented Mar 6, 2025

lgtm, in general, but since you asked for my advice, i have suggestions :)

I can't comment on the Lisp since I've never used emacs myself, but in general I agree that it's better to include a shorter example that still communicates the gist of how to configure things, with less risk of the example being outdated. My biggest pet peeve is when examples are outdated and I can't copy paste them. So good catch 🙂

@ficcdaf
Copy link
Contributor

ficcdaf commented Mar 6, 2025

lgtm, in general, but since you asked for my advice, i have suggestions :)

Sorry what does igtm mean?

@anarcat
Copy link
Contributor

anarcat commented Mar 6, 2025

Sorry what does igtm mean?

oh, sorry for the acronym, it means "Looks Good To Me"

Co-authored-by: anarcat <[email protected]>
@elijah-potter elijah-potter merged commit c9a2efd into Automattic:master Mar 6, 2025
18 checks passed
@mcecode
Copy link
Collaborator Author

mcecode commented Mar 7, 2025

Sorry I wasn't online when you gave your suggestions @anarcat. Thanks for the review! I'm glad I didn't make many mistakes, especially in my Lisp syntax :)

Just to chime in about the sample config possibly becoming outdated that you and Daniel pointed out, I don't think any of the configs shown there will be removed nor will their defaults change any time soon. Harper has been moving quite fast with new integrations and linters being added often, but those have stayed the way they are since they were added. So I think users will be safe to copy paste it without it bit-rotting for quite a while.


Edit: I need to correct myself since it totally slipped my mind that we just had a breaking change on config keys last week with 0.23.0. So my statement that "those have stayed the way they are since they were added" is wrong. However, I stand by my statement that they likely won't be changing any time soon because that breaking change was to standardize key casing not to remove anything or change defaults, and since they've been standardized, it's likely these keys will stay the way they are.

@mcecode mcecode deleted the integration-docs branch March 7, 2025 02:57
@ficcdaf
Copy link
Contributor

ficcdaf commented Mar 7, 2025

Funny enough, my PR adding a default Harper configuration to Helix just got merged. However Helix only does a release like a couple times a year so I don't think we need to update these docs anytime soon 😜

tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Mar 24, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [Automattic/harper/harper-ls](https://github.com/Automattic/harper) | minor | `v0.24.0` -> `v0.26.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>Automattic/harper (Automattic/harper/harper-ls)</summary>

### [`v0.26.0`](https://github.com/Automattic/harper/releases/tag/v0.26.0)

[Compare Source](Automattic/harper@v0.25.1...v0.26.0)

#### What's Changed

-   docs: fix user dictionary by [@&#8203;kit494way](https://github.com/kit494way) in Automattic/harper#893
-   feat: mask out comments beginning with spellchecker:ignore by [@&#8203;grantlemons](https://github.com/grantlemons) in Automattic/harper#861
-   feat(harper.js): export both binary and inlinedBinary for different runtimes by [@&#8203;Asuka109](https://github.com/Asuka109) in Automattic/harper#607
-   feat: linter for "as far back as" to replace "as early back as" by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#889
-   feat: flag "explanation mark/point" instead of "exclamation" by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#895
-   feat: correct "in anyway" to "in any way" by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#894
-   build(deps): bump [@&#8203;babel/helpers](https://github.com/babel/helpers) from 7.26.9 to 7.26.10 in /packages by [@&#8203;dependabot](https://github.com/dependabot) in Automattic/harper#899
-   fix: two spelling mistakes based on homophones by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#886
-   feat: allow blank lines and comments in `dictionary.dict` by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#756
-   docs: fix typo [#&#8203;906](Automattic/harper#906) by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#912
-   hotfix(core): properly store spans in `PatternLinter` cache by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#926
-   Dictionary curation 2025 03 12 by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#902
-   Dialect prototyping by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#925
-   feat: insert newline automatically in `just addnoun` by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#931
-   docs: fix 3 grammar mistakes by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#933
-   feat: linter for "each and everyone" by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#923
-   feat: expand the "get rid off" lint to cover "get ride of" by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#900
-   fix(vscode-plugin): ignore non-existent ".git" files, support untitled/unsaved files on VS Code by [@&#8203;kiding](https://github.com/kiding) in Automattic/harper#927
-   feat(core): improve assertion to allow overlapping suggestions by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#935
-   build(deps): bump [@&#8203;wordpress/editor](https://github.com/wordpress/editor) from 14.19.0 to 14.20.0 in /packages by [@&#8203;dependabot](https://github.com/dependabot) in Automattic/harper#915
-   build(deps): bump indexmap from 2.7.1 to 2.8.0 by [@&#8203;dependabot](https://github.com/dependabot) in Automattic/harper#921
-   build(deps): bump tokio from 1.43.0 to 1.44.1 by [@&#8203;dependabot](https://github.com/dependabot) in Automattic/harper#919
-   build(deps-dev): bump [@&#8203;types/node](https://github.com/types/node) from 22.13.9 to 22.13.10 in /packages by [@&#8203;dependabot](https://github.com/dependabot) in Automattic/harper#913
-   build(deps): bump foldhash from 0.1.4 to 0.1.5 by [@&#8203;dependabot](https://github.com/dependabot) in Automattic/harper#917
-   feat: correct "along time" to "a long time" by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#910
-   Add -able affix to open (openable) by [@&#8203;claydugo](https://github.com/claydugo) in Automattic/harper#930
-   docs: mention hidden library dependencies by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#943
-   feat(core): create new test assertion for `nth` suggestion results by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#942
-   build: migrate to pnpm workspace & biome by [@&#8203;Asuka109](https://github.com/Asuka109) in Automattic/harper#924
-   build(deps): bump serde from 1.0.218 to 1.0.219 by [@&#8203;dependabot](https://github.com/dependabot) in Automattic/harper#920
-   build(deps): bump clap from 4.5.31 to 4.5.32 by [@&#8203;dependabot](https://github.com/dependabot) in Automattic/harper#946
-   Web improvements by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#944
-   feat: ignore shebang lines by [@&#8203;holmanb](https://github.com/holmanb) in Automattic/harper#947
-   feat(web): add mask-image to header by [@&#8203;Asuka109](https://github.com/Asuka109) in Automattic/harper#951
-   fix(core): reduce ambiguity for `AvoidContraction` by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#941
-   chore: add comments describing major sections by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#952

#### New Contributors

-   [@&#8203;kit494way](https://github.com/kit494way) made their first contribution in Automattic/harper#893
-   [@&#8203;holmanb](https://github.com/holmanb) made their first contribution in Automattic/harper#947

**Full Changelog**: Automattic/harper@v0.25.1...v0.26.0

### [`v0.25.1`](https://github.com/Automattic/harper/releases/tag/v0.25.1)

[Compare Source](Automattic/harper@v0.25.0...v0.25.1)

#### What's Changed

-   docs(ls): give example config that disables `sentence_capitalization` by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#879
-   fix(core): indexing problem in Regexish work by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#883
-   Just getforms improvements by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#862
-   Dictionary curation 2025 03 11 by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#884
-   fix(core): insert paragraph breaks after code blocks by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#882

**Full Changelog**: Automattic/harper@v0.25.0...v0.25.1

### [`v0.25.0`](https://github.com/Automattic/harper/releases/tag/v0.25.0)

[Compare Source](Automattic/harper@v0.24.0...v0.25.0)

#### What's Changed

-   docs: update integrations section by [@&#8203;mcecode](https://github.com/mcecode) in Automattic/harper#755
-   Typst Corrections by [@&#8203;grantlemons](https://github.com/grantlemons) in Automattic/harper#442
-   refactor: add comments to `just addnoun` and tweak logic by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#605
-   feat: implements [#&#8203;841](Automattic/harper#841) by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#842
-   Add WordPress Plugin Documentation and Demo by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#838
-   feat: add `just newest-dict-changes` by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#701
-   Spellcheck improvements by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#844
-   fix: add missing "gotten rid off" to other "rid off" by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#840
-   Rules page improvements by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#843
-   build(deps): bump axios from 1.8.1 to 1.8.2 in /packages by [@&#8203;dependabot](https://github.com/dependabot) in Automattic/harper#845
-   Regexish by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#669
-   fix: fall back to `grep` when `rg` is not available by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#848
-   feat: flag "monumentous" and offer "momentous" and "monumental" by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#864
-   build(deps-dev): bump svelte-check from 4.1.4 to 4.1.5 in /packages by [@&#8203;dependabot](https://github.com/dependabot) in Automattic/harper#874
-   build(deps): bump typst-syntax from 0.13.0 to 0.13.1 by [@&#8203;dependabot](https://github.com/dependabot) in Automattic/harper#867
-   build(deps-dev): bump typescript from 5.7.3 to 5.8.2 in /packages by [@&#8203;dependabot](https://github.com/dependabot) in Automattic/harper#871
-   build(deps-dev): bump autoprefixer from 10.4.20 to 10.4.21 in /packages by [@&#8203;dependabot](https://github.com/dependabot) in Automattic/harper#873
-   Dictionary curation 2025 03 08 by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#860
-   feat: add many variants of "change of tact"->"tack" by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#852
-   feat: implement [#&#8203;525](Automattic/harper#525) (worse/worst confusion) by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#856
-   build(deps): bump cached from 0.54.0 to 0.55.1 by [@&#8203;dependabot](https://github.com/dependabot) in Automattic/harper#868
-   build(deps): bump anyhow from 1.0.96 to 1.0.97 by [@&#8203;dependabot](https://github.com/dependabot) in Automattic/harper#865
-   Build against an older GLIBC version by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#877
-   Cache busting by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#876
-   build(deps): bump thiserror from 2.0.11 to 2.0.12 by [@&#8203;dependabot](https://github.com/dependabot) in Automattic/harper#866
-   build(deps): bump serde_json from 1.0.139 to 1.0.140 by [@&#8203;dependabot](https://github.com/dependabot) in Automattic/harper#869
-   feat: add a lint to correct "in of itself" to "in and of itself" by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#863
-   feat: implement "ticking time clock" by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#851
-   feat: implements [#&#8203;746](Automattic/harper#746) by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#855
-   feat(dict): added words to dictionary by [@&#8203;ficcdaf](https://github.com/ficcdaf) in Automattic/harper#847
-   fix: Ignore hex codes inside rgb function calls by [@&#8203;grantlemons](https://github.com/grantlemons) in Automattic/harper#857
-   feat: Added Linux musl compilations by [@&#8203;kiding](https://github.com/kiding) in Automattic/harper#878

#### New Contributors

-   [@&#8203;kiding](https://github.com/kiding) made their first contribution in Automattic/harper#878

**Full Changelog**: Automattic/harper@v0.24.0...v0.25.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xOTIuMCIsInVwZGF0ZWRJblZlciI6IjM5LjIxMC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants