Question on PureScript ide / vscode


Apologies for the silly question in advance, as it’s more a VSCode question than a PS one

I installed the PureScript IDE support in VSCode

I have a PureScript file in my current project (a python/flask/purescript web app) but syntax highlight and features won’t work.

On opening VSCode throws error: It doesn’t look like the workspace root is a PureScript project. The PureScript project should be opened as a root workspace folder.

How do I fix this / configure VSCode /root so IDE support works in other projects that are not 100% PureScript?


When you created the project, did you use a tool like spago to create the initial project structure? It might not be working because it only triggers such things when a project has that expected structure.

However, I don’t use VSCode, so I can’t say myself.

Thanks @JordanMartinez , I htink is something to do with my VScode config, which I am not an expert either. If I solve this I’ll post in case anybody has the same issue

i don’t have exactly the same situation but i have VS Code / Purescript IDE working for our project which has a non-standard structure, i don’t remember what yak-shaving it took for me to get it to work but i looked at the Preferences and i see that i’m explicitly telling it the command for building and the directory that the source is in. Also it gets it’s sources from spago so that accounts for all the Purescript code from libraries.

sorry if this isn’t much help

Thanks @afc

Could you be more explicit and screenshot where in the preferences? Thanks again!

this is the setting to use spago sources as it appears in my VS Code preferences


and here’s the preference for the build command


Thanks @afc, brilliant!