jwalton512/vim-blade

Indentation and syntax borked in Laravel 5.5

superDuperCyberTechno opened this issue · 3 comments

I just pulled a fresh installation of Laravel and took a look in the default welcome.blade.php file.

Hit gg V G = and ended up with the following results.

Before:
image

After:
image

Clearly, the indentation is all wrong and the syntax highlighting doesn't seem to recognize the new custom if-conditionals (@auth and its closing tag @endauth) - the latter seemingly being the root of the problem.

Alright, the problem is with an outdated version in vim-polyglot, not this repo.
I ran vim-polyglot's ./build (~/.local/share/nvim/plugged/vim-polyglot/build, running Neovim on Ubuntu) and that fixed the indentation, but not the syntax. - Bug or feature?

On a related note, will vim-blade ever be able to parse user-specified custom if-conditionals?

The @auth directive only got added to the indent file. Some time ago I started working on an autoload file for specifying all directives in one place, to make it easier to add new directives. I haven't come around to finish it, though.

You can add your own directives via g:blade_custom_directives and g:blade_custom_directives_pairs, as explained in the readme, is that what you meant?

I was thinking autonomously, detecting directives without having the user adding them manually. Not sure if it's possible, though...?