nette-intellij/intellij-latte

[PHPStorm 2021.3.3] Displaying a variable causing problems

Fabrn opened this issue · 0 comments

Fabrn commented

Hello there !

Just discovered Latte this afternoon, looks really great ! Sadly, I'm having some trouble using it with PHPStorm. After searching and trying things for hours, there I am to ask for some help !

Bug description

Expected behavior

Using {$var} in .latte file should not display any error

What's happening

{$var} causes PHPStorm to misbehave

Environment

  • PhpStorm 2021.3.3 (also tried downgrading to v2021.2.4, didn't work)
  • Plugin v1.1.5

To Reproduce
Steps to reproduce the behavior (or attach video):

  1. Upgrade to PHPStorm 2021.3.3
  2. Install Latte plugin using PHPStorm Marketplace
  3. Reboot PHPStorm (even though it doesn't seem needed)
  4. Create a file with extension .latte
  5. Try to display some variable using {$var} synthax
  6. You should see the error then

Example code

<!DOCTYPE html>
<html lang="fr">
<head>
    <title>{block title}{/block}</title>
</head>
<body>
    {block body}{/block}
    <p>{$var}</p>
</body>
</html>

Screenshots

Example 1 in a block :
latteExample1

Example 2 standalone :
latteExample2

Additional context

Already tried :

  • Downgrading PHPStorm
  • Uninstalling plugin
  • Making sure file are correctly recognized as latte files (guess yes since completion for loops etc works as intended)
  • Also had some Java errors with the IDE saying "Range Overlap". Sadly I could not understand when and why it was hapenning so I'm not concentrating too much on it right now