zed icon indicating copy to clipboard operation
zed copied to clipboard

Add OCaml support

Open huwaireb opened this issue 1 year ago • 7 comments

👋

This pull request implements support for the OCaml Language.

Additions

Bug Fixes

  • [x] Improper parsing of LSP headers.

Missing [will file a separate issue]

  • Documentation on completionItem, requires: completionItem/resolve with support for documentation as a provider.

Screenshots

Zed Screenshot 2024-02-01 at 03 33 20

Release Notes:

  • Added OCaml Support (#5316).

[!NOTE] Partially completes #5316 To complete #5316:

  1. addition of a reason tree-sitter grammar.
  2. opam/esy integration, however it may be better as it's own plugin.

huwaireb avatar Jan 28 '24 13:01 huwaireb

We require contributors to sign our Contributor License Agreement, and we don't have @huwaireb on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

cla-bot[bot] avatar Jan 28 '24 13:01 cla-bot[bot]

@cla-bot check

huwaireb avatar Jan 28 '24 13:01 huwaireb

The cla-bot has been summoned, and re-checked this pull request!

cla-bot[bot] avatar Jan 28 '24 13:01 cla-bot[bot]

I've pushed a commit to handle Content-Type, the change felt too small for a new PR. The LSP should work fine now.

huwaireb avatar Jan 30 '24 10:01 huwaireb

Hello, could you also add a docs entry please, into the https://github.com/zed-industries/zed/tree/main/docs/src/languages list.

SomeoneToIgnore avatar Jan 30 '24 15:01 SomeoneToIgnore

rebased, should be ready now 🪷

huwaireb avatar Jan 31 '24 23:01 huwaireb

I'm curious if it's fine for me to document use instructions across different package managers (nix/esy/opam) in thedocs/src/languages/ocaml.md?

The lack of direct support for the officially supported package manager (opam) would require a similar workflow to using Nix with any other language. That is, opening Zed from a terminal where your active project sandbox (switch) is activated with ocamllsp installed.

I would've loved to implement it into Zed to make it more seamless, but I guess that would set precedent for other "obscure" languages that it's fine, as opposed to going through the soon to be plugin route.

huwaireb avatar Feb 01 '24 16:02 huwaireb

Go test started to fail after a different commit in main and I'll check that, but this PR has nothing to do with it, optimistically merging.

Thank you for the fixes!

SomeoneToIgnore avatar Feb 02 '24 14:02 SomeoneToIgnore