Skip to content

Assorted feedback #2

@purcell

Description

@purcell

Just been test-driving this — great job! Enjoying more detailed font lock and better indentation than with ocaml-ts-mode.

Wanted to share a few thoughts I had along the way:

  • let* ... in should affect indentation the same as let ... in, e.g. when you let (let*) = Lwt.bind and then subsequently write let* foo = Bar.baz in .... (I wonder if there are test cases for something like ocp-indent so you could try to achieve the same general layout without needing to write lots yourself.)
  • The regular and -interface modes feel like they only really differ in terms of the grammar: would it make things easier for key bindings and lsp setup etc. to make the -interface mode inherit from the regular mode?
  • It might be worth deliberately separating the grammars to some extent, e.g. ensuring that .ml-only constructs get no font-lock/indent support in .mli files, to strongly indicate what's valid and what's not?
  • Perhaps consider making the repl switch reversible, so that C-c C-z from .ml takes you to the repl, and then C-c C-z in the repl pops you back. You can save the calling buffer as a local var in the repl to make this easy. Quite a few repl modes have this.
  • utop as an alternate neocaml-repl-program doesn't work super well, as the point isn't after the # prompt: probably due to terminal cleverness. Might be worth not suggesting it for now!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions