How to use the new `dfx ide` command

did anyone manage to find out how to use the above mentioned new sub command?from the description it seems like this is a language server but i can’t wrap my head around how to actually use it with vscode for example.

at first i thought if the command is running and you modify the code it’ll show you errors and so on, i also tried typing code in it like an interpreter. no success either :frowning:

i would appreciate if someone could point me to the right direction.

thanks!

5 Likes

I personally run dfx ide

Then I press “ENTER”

And I get this

dp$ dfx ide

The Motoko Language Server returned an error:
Fatal error: exception (Invalid_argument "String.sub / Bytes.sub")
Raised at file "pervasives.ml", line 33, characters 20-45
Called from file "string.ml" (inlined), line 47, characters 2-23
Called from file "languageServer/languageServer.ml", line 125, characters 11-112
Called from file "exes/mo_ide.ml", line 37, characters 5-35
2 Likes

The same error so far

1 Like

I would also appreciate more info on how to use this functionality as well.

3 Likes

i’ll tag some members for visibility
@stanley.jones @PaulLiu @alexa.smith

Thanks for looping us in here. Just wanted to let you know we’re in the process of updating error messages and docs to help with this. Stay tuned!

3 Likes

there has just been a new release that states that there is a topic in the documentation for the now called dfx _language-service command!

2 Likes

this is the link:
https://sdk.dfinity.org/developers-guide/lang-service-ide.html

3 Likes

didn’t really help me though, did anyone make it work? @hansl can you give me a hint? i guess i would need to write a VSCode extension for example? the docs out there show how to write a LS extension, but i don’t get how to make it work with binaries :face_with_monocle: is there a simple way to invoke this with VSCode?

1 Like

There’s nothing more to say currently. This is an experimental feature

2 Likes

I wrote a little vscode extension!

2 Likes