elijah-potter / harper

The Grammar Checker for Developers
https://writewithharper.com
Apache License 2.0
1.93k stars 36 forks source link

Passing config via command line args #205

Open DaveTJones opened 1 month ago

DaveTJones commented 1 month ago

I'm attempting to customise Harper alongside Helix editor, and can't figure out how to pass a config file. For reference, my languages.toml looks like this:

` [[language]] name = "markdown" scope = "source.md" file-types = ["md"] language-servers = [ "harper-ls" ]

[language-server.harper-ls] command = "harper-ls" args=["--stdio"]

`

Looking at the source I can't see any other command line arguments that allow for a config file to be specified, and I haven't been able to spot a default file path. Is there something I'm missing or is specifying config not yet possible when using with Helix?

elijah-potter commented 1 month ago

Harper (along with all other spec-compliant language servers) are configured at runtime via the language server protocol. That means configuration differs on a per-editor basis. I'm not the most familiar with Helix, but I believe this may answer your question.

DaveTJones commented 1 month ago

Thanks for the prompt reply. I'll look into adding this to the Helix lsp docs tomorrow.