Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v.fmt not working #523

Open
esimov opened this issue Feb 28, 2023 · 7 comments
Open

v.fmt not working #523

esimov opened this issue Feb 28, 2023 · 7 comments

Comments

@esimov
Copy link

esimov commented Feb 28, 2023

I have installed Vlang together with the vscode plugin on my Windows environment, but it looks like that none of the supported commands are working. For example when I'm trying to run v.fmt by pressing CTRL+SHIFT+P I'm getting the following error:

@esimov
Copy link
Author

esimov commented Mar 1, 2023

I figured it out, that v ls wasn't installed and this was the reason that I was getting the above error. Maybe it would help the future developers who want to try out the language somewhere to be mentioned that v ls should be installed in order to use the VsCode plugin.

@JalonSolov
Copy link

The plugin used to ask if you wanted to install vls. Perhaps this is a regression.

@esimov
Copy link
Author

esimov commented Mar 1, 2023

It didn't asked me.

@esimov
Copy link
Author

esimov commented Mar 1, 2023

It's not related to the original question, but how can I enable the autoformat function on file save? Is it possible or only by using the CTRL-SHIFT-P + V: Format current file command?

@JalonSolov
Copy link

Did you enable vls in the options?

I don't use vscode, so not sure, but most editors have a way to set up "do this when saving a file" operations.

@esimov
Copy link
Author

esimov commented Mar 1, 2023

Yes, I did. Also "editor.formatOnSave" is set as true globally, but for V is not working unfortunately.

@robvanmieghem
Copy link

v.fmt is not called by vscode to format files on save. There is no explicit languageformatter registered for v, formatting is done through the language server.
"editor.formatOnSave" does work for me though when vls is enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants