Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Indentation and syntax borked in Laravel 5.5 #66

Open
superDuperCyberTechno opened this issue Nov 8, 2017 · 3 comments
Open

Indentation and syntax borked in Laravel 5.5 #66

superDuperCyberTechno opened this issue Nov 8, 2017 · 3 comments

Comments

@superDuperCyberTechno
Copy link

superDuperCyberTechno commented Nov 8, 2017

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.

@superDuperCyberTechno superDuperCyberTechno changed the title Indentation borked in Laravel 5.5 Indentation and syntax borked in Laravel 5.5 Nov 8, 2017
@superDuperCyberTechno
Copy link
Author

superDuperCyberTechno commented Nov 8, 2017

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?

@adriaanzon
Copy link
Collaborator

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?

@superDuperCyberTechno
Copy link
Author

superDuperCyberTechno commented Nov 8, 2017

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants