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

php syntax suggestion not working in blade.php file #130

Open
edenzul opened this issue Mar 16, 2021 · 1 comment
Open

php syntax suggestion not working in blade.php file #130

edenzul opened this issue Mar 16, 2021 · 1 comment

Comments

@edenzul
Copy link

edenzul commented Mar 16, 2021

Hi all,

need some help here. my goal is to have syntax auto-suggestion & auto formating works for both php file and blade file.

when I enable "Laravel Blade Snippets", the syntax suggestion function in blade.php suddenly not working.
But when I disable the "Laravel Blade Snippets", the php syntax suggestion is working again for blade.php.
I tried to make it works by reinstall, restart and modify the editor.defaultformater, it seems still unsuccessful.
is that behavior is expected ? are there conflicting with the extensions?
kindly please share your experience how to resolve this issue.

current extensions & vscode in use:

  1. Laravel Blade Snippets v1.25.0 by Winnie Lin
  2. PHP Intelephense v1.6.3 by Ben Mewburn
  3. w3.css.autocomplete v0.0.3 by SuvamRox
  4. vscode v1.54.3

thanks a lot for your supports.

@cpoftea
Copy link
Contributor

cpoftea commented Nov 22, 2021

@edenzul as much as I know, by default VS Code doesn't have a language server for php. There's an extension PHP Intelliphense with powerful server language associated with .php files, but here's the thing...

This "blade" extension defines a new php language with different id instead of extending existing one. So .blade.php files associated with this language to provide syntax highlight, snippets etc - everything from this extension. But files cannot be associated with two languages simultaneously. So you have to switch associated language back and forth to get what you need - blade syntax, snippets, format, or php suggestions

At least for now, that is how it works

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

2 participants