How to default to given OpenHandler

Hi,

I added an OpenHandler to my extension following TypeFox’s instructions:

It works as expected when right clicking a file and using “Open With”.

However, I would like to open all JSON files (in my case) with the custom editor by default. If I double click a JSON file, it opens in the regular Monaco editor. I do return 100 in my implementation of canHandle.

Did I miss something?

Thanks!

Try to increase it. The default Code editor open handler uses 100.

1 Like

101 did the trick!

Is the default value defined as a constant somewhere? I’d like to retrieve it and add 1 in order to be more explicit.

No, it isn’t.

1 Like