reason-repacked icon indicating copy to clipboard operation
reason-repacked copied to clipboard

Using reason-repacked with reason-language-server

Open TheSpyder opened this issue 4 years ago • 4 comments

I'm looking into using this, and very quickly realised reason-language-server was still using bsrefmt instead of refmt. There is a "reason_language_server.refmt" configuration setting, however it looks like I need to include the full path to refmt in there? Does that means I need to install this globally, or is there some other trick to getting it working?

TheSpyder avatar Aug 21 '20 11:08 TheSpyder

Are you sure you can't use the path ./node_modules/.bin/refmt as follows: custom refmt

This has been working for me locally (though you need to do a VSCode restart after setting it)

Mathspy avatar Aug 21 '20 13:08 Mathspy

nope, that gives me

Message: Failed to refmt './node_modules/.bin/refmt' --print binary --recoverable --parse re > '/Users/spyder/work/test/node_modules/.lsp/Test.ast'
/bin/sh: ./node_modules/.bin/refmt: No such file or directory

TheSpyder avatar Aug 22 '20 12:08 TheSpyder

Interesting, I will look into it more and possibly get in touch with @jaredly

Thank you for report!

Mathspy avatar Aug 24 '20 14:08 Mathspy

I might look into it more as well, create a sample project so I can post the full LSP log and see if that offers some clues as to where the command is run (it can't be the project root given the error message). If there's no easy fix this should probably be logged against RLS instead 🤔

TheSpyder avatar Aug 24 '20 20:08 TheSpyder