VSLilyPond icon indicating copy to clipboard operation
VSLilyPond copied to clipboard

Error "\maininput not allowed outside init files" when starting the extension

Open pfmoore opened this issue 2 years ago • 4 comments

I get the following error (in the "Problems" tab) when I try to edit a lilypond file:

[{
	"resource": "/C:/Users/Gustav/scoop/apps/lilypond/current/share/lilypond/2.24.3/ly/init.ly",
	"owner": "_generated_diagnostic_collection_name_#2",
	"severity": 8,
	"message": "Guile signaled an error for the expression beginning here",
	"startLineNumber": 65,
	"startColumn": 1,
	"endLineNumber": 65,
	"endColumn": 2
}]

[{
	"resource": "/C:/Users/Gustav/scoop/apps/lilypond/current/share/lilypond/2.24.3/ly/init.ly",
	"owner": "_generated_diagnostic_collection_name_#0",
	"severity": 8,
	"message": "\\maininput not allowed outside init files",
	"startLineNumber": 46,
	"startColumn": 1,
	"endLineNumber": 46,
	"endColumn": 1
}]

The lilypond command works fine from the command line. This is a copy of lilypond installed using the scoop package manager, if it matters (not that I can see why it should).

pfmoore avatar Nov 20 '23 11:11 pfmoore

The extension appears to work with lilypond 2.20, but not with 2.24.3, which is the latest version (and the one I have installed).

pfmoore avatar Nov 21 '23 15:11 pfmoore

where did you get the version you have that is working? i'm having the same problem with 2.24.3 and am looking for a temporary solution until this is fixed

mjsyts avatar Dec 06 '23 18:12 mjsyts

I think I installed it using scoop's explicit version syntax - scoop install [email protected]

pfmoore avatar Dec 06 '23 23:12 pfmoore

Thanks, but 2.20 won't actually run on my machine. This might be helpful though: 2.24.3 works when I disable VSLilyPond: Intellisense. This is going to be a struggle for me since I'm new to Lilypond, but better than it not working at all...

mjsyts avatar Dec 07 '23 13:12 mjsyts