harper_zed icon indicating copy to clipboard operation
harper_zed copied to clipboard

Pass settings (global & folder-local) to the LSP server

Open tv42 opened this issue 1 year ago • 2 comments

Right now, when Zed's settings are edited, harper-ls always gets sent "workspace/didChangeConfiguration","params":{"settings":{}}}, regardless of what's in Zed settings for "lsp": {"harper-ls": ...}, so harper-ls cannot be configured to e.g. use a local (project-specific) dictionary.

As far as I understand Zed, this extension should implement the language_server_initialization_options and language_server_workspace_configuration methods: https://github.com/zed-industries/zed/blob/c83690ff140da4a42ba9cb9f4691799e81d0664a/crates/extension_api/src/extension_api.rs#L77-L93 and in those, extract the useful config from.. I don't actually know where. https://github.com/zed-industries/zed/blob/main/crates/collab/src/db.rs#L761 is the unparsed content, but surely they don't think it's sane for everyone to parse settings over and over.

See also https://github.com/elijah-potter/harper/issues/147

tv42 avatar Oct 07 '24 17:10 tv42

Hey sorry for the late reply. I understand the problem you are running into but I'm not planning to fix this myself as of this moment, I'm also not entirely sure how to implement it, the docs are still a bit rough around the edges as I'm sure you've noticed.

As always, PR's are welcome! 😊

Stef16Robbe avatar Nov 13 '24 18:11 Stef16Robbe

Will look into this, since i already started doing a small part of it locally, because i needed it.

nuIIpointerexception avatar Nov 21 '24 19:11 nuIIpointerexception

Fixed in #10

Stef16Robbe avatar Jul 10 '25 17:07 Stef16Robbe