Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

Help with the VSCode formatter?

$
0
0

Thanks Florian!

So it is using v12, I’m on v1.70.0 of the plugin, and I did create the project using:

npm create rescript-app@latest.

I just tried a couple fresh installs using both the “Vite” and “Basic” templates. I got the same result: “format on save” doesn’t work, but running:

./node_modules/.bin/rescript format

… works just fine!

Here’s everything relating to ReScript in my vscode default settings:

{
	// Defines a default folding range provider that takes precedence over all other folding range providers. Must be the identifier of an extension contributing a folding range provider.
	//  - chenglou92.rescript-vscode: ReScript language support (official)
	// Defines a default notebook formatter which takes precedence over all other formatter settings. Must be the identifier of an extension contributing a formatter.
	//  - chenglou92.rescript-vscode: ReScript language support (official)
	// ReScript
	// Whether you want the extension to prompt for autostarting a ReScript build if a project is opened with no build running.
	"rescript.settings.askToStartBuild": true,

	// Path to the directory where cross-platform ReScript binaries are. You can use it if you haven't or don't want to use the installed ReScript from node_modules in your project.
	"rescript.settings.binaryPath": null,

	// Enable project config caching. Can speed up latency dramatically.
	"rescript.settings.cache.projectConfig.enable": true,

	// Enable (experimental) code lens for function definitions.
	"rescript.settings.codeLens": false,

	// Show compile status in the status bar (compiling/errors/warnings/success).
	"rescript.settings.compileStatus.enable": true,

	// (beta/experimental) Enable incremental type checking across files, so that unsaved file A gets access to unsaved file B.
	"rescript.settings.incrementalTypechecking.acrossFiles": false,

	// (debug) Enable debug logging (ends up in the extension output).
	"rescript.settings.incrementalTypechecking.debugLogging": false,

	// Enable incremental type checking.
	"rescript.settings.incrementalTypechecking.enable": true,

	// Enable (experimental) inlay hints.
	"rescript.settings.inlayHints.enable": false,

	// Maximum length of character for inlay hints. Set to null to have an unlimited length. Inlay hints that exceed the maximum length will not be shown.
	"rescript.settings.inlayHints.maxLength": 25,

	// Path to the directory where platform-specific ReScript binaries are. You can use it if you haven't or don't want to use the installed ReScript from node_modules in your project.
	"rescript.settings.platformPath": null,

	// Optional path to the directory containing the @rescript/runtime package. Set this if your tooling is unable to automatically locate the package in your project.
	"rescript.settings.runtimePath": null,

	// Enable signature help for function calls.
	"rescript.settings.signatureHelp.enabled": true,

	// Enable signature help for variant constructor payloads.
	"rescript.settings.signatureHelp.forConstructorPayloads": true,
}

And then here is what I have in the workspace settings:

{
  "editor.defaultFormatter": "chenglou92.rescript-vscode",
  "editor.formatOnSave": true
}

Not sure if there are any clues in there? If that all looks ok then I must have some other conflict somewhere.

~Eileen


Viewing all articles
Browse latest Browse all 2592

Trending Articles