Skip to content

Associate entry with toplevel comment and module comment #1421

@vch9

Description

@vch9

Hello, this is more likely a request for help than an actual issue.

I am working with @rgrinberg fork vendored (similarly to ocaml-lsp), and I'm trying to work with
documented/undocumented entries in a OCaml program.

Using Merlin I can for now detect entries in a program (types, values, modules etc.) and with odoc determine whether they are documented or not. It is currently working fine except for two specific cases:

  1. Toplevel documentation with a license header:
(*******************************)
(* This is a wonderful license *)
(*******************************)

(** Toplevel documentation *)

type t = ...
...
  1. Module documentation inside module:
module Foo = struct
  (** Foo documentation *)

end

In the first Merlin does not seem to be capable to find the toplevel documentation. However, in the second case merlin-document on Foo succeeds to find the documentation. But, I was not able to manually reproduce merlin-document using odoc.

I created a "minimal" repository with my actual use of the merlin.analysis.

There are the two only corner-cases I've found so far. Would you have any ideas on why they can not find the associated comments ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions