jaredly / jaredly/reason-language-server
adding [@@bs.val] to an external breaks the ocaml syntax highlighting
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 649
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
I just copied this code, but moved the lines around from the Bucklescript docs: https://bucklescript.github.io/docs/en/function (Object method)
type document (* abstract type for a document object *)
external doc: document = "document" [@@bs.val]
external getElementById: document -> string -> Dom.element = "getElementById" [@@bs.send]
The lines after [@@bs.val] (2nd line) aren't being highlighted correctly.

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the example from the BuckleScript function documentation and compare highlighting before and after [@@bs.val]. Trace the syntax-highlighting entry point for OCaml attributes, then verify that the following external declaration and its types are highlighted correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100