Basic configuration in hackwaly's OCaml extension on Visual Studio Code

I’ve just installed Visual Studio Code on my Mac with hackwaly’s OCaml extension (at https://marketplace.visualstudio.com/items?itemName=hackwaly.ocaml),
and started using it.
But I have trouble with the initial configuration step.

When I open the settings.json file and go to the line that I need to change,
I see a pencil left to the line, and the line gets highlighted when I click on the pencil, all of this heavily suggests editing :

But it turns out I cannot edit the line. Anything I type has no effect whatsoever
on the line and the settings.json file remains unchanged.

I also tried the other settings.json file next to it, but I get an error message
as follows :

When you click on the pencil and select to copy to settings, it is suppose to add a line on the right part of the window, in a json object.

You can’t edit the left part of the window. It contains the default configuration values. All the configuration you do will be on the right part.

Then you can replace the "ocp-indent" part by what you want. But keep in mind that the user settings file should contain a valid json object.

Note that if ocp-indent is in your shell PATH, you shouldn’t need to add it’s full path in your configuration.

1 Like

Got it, thanks. I suspected as much, but I wasn’t sure

It seems that what I typed below is invalid, but I can’t see why (especially as I copy-pasted it from another user’s suggestion here)

Your setting is supposed to be in an object:

But I don’t think you need this configuration. I have tested with a simple file in a clean editor with only this extension installed and it seems to be detected correctly. You can check the language mode at the bottom right of your editor, next to the little smiley face, it writes which language mode is currently active. And you can change it by clicking on it.