-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Bug] Code validation (syntax error) does not work for php language #4781
Comments
@SteelManITA Monaco does not support validating PHP syntax. |
@rcjsuen I don't understand... Why then on the page https://microsoft.github.io/monaco-editor is there actually an example in PHP that refers to validation? In any case, is there currently no way to have even basic validation of PHP syntax? |
Which example are you referring to?
I doubt it personally but I don't work for Microsoft. You'd probably need to hook it up with a language server. |
@rcjsuen I refer to the example that appears when selecting php on the homepage (screnshot below) |
I agree it's kind of a strange design choice but unfortunately the reality is that it does not have PHP syntax validation out-of-the-box. |
Ok, thanks for clarifying. Do you know any packages I can use to achieve my
goal?
Il mar 17 dic 2024, 12:34 Remy Suen ***@***.***> ha scritto:
… @rcjsuen <https://github.com/rcjsuen> I refer to the example that appears
when selecting php on the homepage (screnshot below)
I agree it's kind of a strange design choice but unfortunately the reality
is that it does not have PHP syntax validation out-of-the-box.
—
Reply to this email directly, view it on GitHub
<#4781 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEDUJDYGDMPJPYJ4RSINUZ32GAD5XAVCNFSM6AAAAABTP35N2GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNBYGIZDANZWGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
You should read up on the language server protocol and then look at TypeFox/monaco-languageclient. They have examples that integrate with Java and Python language servers that you can reference. |
Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Link
No response
Monaco Editor Playground Code
Reproduction Steps
Write a syntax error, like missing condition in if statement or missing a ;
Actual (Problematic) Behavior
Code validation (syntax error) does not work for php language
It does not work in demo either (microsoft.github.io/monaco-editor)
If you select PHP language, the first comment is "the next line contains a syntax error". But the "next line" (which has a syntax error) is not highlighted
Expected Behavior
Code validation works
Additional Context
No response
The text was updated successfully, but these errors were encountered: