ocaml-lsp icon indicating copy to clipboard operation
ocaml-lsp copied to clipboard

Code actions for "Unbound module ..." error

Open ulugbekna opened this issue 3 years ago • 2 comments

When we have Unbound module M-like diagnostic, we can offer user to fix the error by

  • creating file m.ml (most useful quickfix because we replace several user actions with one)
  • creating module M somewhere (before the current binding, outside current module, or put the module in clipboard (but that should happen on explicit user's consent to not overwrite other important info in the clipboard))

Other suggestions?

If you want to work on this, please comment on this issue, preferably with ETA.

ulugbekna avatar Aug 24 '21 10:08 ulugbekna

I usually get this diagnostic when I've forgotten to open something. I'm not sure how helpful it would be to offer to create the missing module. Finding the appropriate module to open would be pretty neat though.

jfeser avatar Aug 27 '21 16:08 jfeser

@jfeser thanks for your input! I guess we can offer various quickfixes for this problem

ulugbekna avatar Aug 27 '21 18:08 ulugbekna