tlaplus / vscode-tlaplus

TLA+ language support for Visual Studio Code
MIT License
357 stars 33 forks source link

Invoke `parse_module` command on each save/modify action #163

Open magniff opened 4 years ago

magniff commented 4 years ago

Repeatedly hitting this "parse_module" command is a bit annoying, why not automate?

alygin commented 4 years ago

@magniff, there's an article in the project's Wiki that describes how to configure VS Code to parse modules automatically: Automatic Module Parsing.

Unfortunately, the VS Code API doesn't allow an extension to set such a setting programmatically or via a contribution point. At least, I didn't find how to do that.

So, if the setting, described in the article, works for you, I'm inclined to close this issue.

magniff commented 4 years ago

Thanks for your response! Basically I'm asking whether we can make it true by default, I guess it is set somewhere around that line?

alygin commented 4 years ago

@magniff, you're right, this is the place where we could define the default value for the setting. Moreover, in some very early versions, it was set to true, but then I removed it because most popular extensions didn't do such things, it was a common practice to provide only basic functionality by default and let the user decide what features he or she really needs and switch them on manually.

But it looks like things have changed since then, and now most extensions perform various actions on file save by default. So, yeah, it looks reasonable to make it true by default again.