Weird behavior when indenting code in sublime text 3
Asked Answered
C

1

7

I have this code:

Route::group(['prefix' => 'somthing'], function () {
    Route::group(['middleware' => ['something']], function () {
        Route::group(['prefix' => 'somethingelse'], function () {
            Route::group(['prefix' => 'someotherthing'], function () {
                Route::get('something', ['uses' => 'SomethingController@something'); // Here color scheme doesn't show up properly
            });
        });
    });
});

In the middle there (where Route::get is called), The color scheme doesn't show up properly:

enter image description here

Anything from that point forward showing in white in default color scheme (doesn't work on other color schemes as well).

enter image description here

ST3 3114 build, 64bit. OS windows 8.1. Screenshot 2 material theme lighter.

Caddis answered 14/8, 2016 at 16:6 Comment(3)
I appear to have a similar problem with a different color scheme. Is this a Sublime syntax problem? Maybe you should consider searching the Sublime forums on this or open a new thread about it.Pamilapammi
@Caddis at your third line you have an extra closing square bracket ]], it might be the problem causing it?Newmint
@HL96 Removing it doesn't help. And look closely it's not a syntax error.Caddis
F
2

You have a syntax error on line 5 that may be affecting the highlighting:

Route::get('something', ['uses' => 'SomethingController@something');

is missing a closing square bracket ]:

Route::get('something', ['uses' => 'SomethingController@something']);

Using the Neon Color Scheme (full disclosure: I'm the author), your original code looks like this:

no closing bracket

(note the green closing parentheses ) and curly brackets }). With the offending closing square bracket added, it looks like this:

with closing bracket

You don't indicate which color scheme you're using, so I couldn't compare my results with it, but hopefully adding the missing bracket will help.

Falcate answered 17/8, 2016 at 16:49 Comment(3)
Thanks, But unfortunately the syntax errors have nothing to do with it in my case, Those were introduced when I was removing my original code and just adding an example. Also, I tried this piece of code with various color schemes all have the same effect so far (one way or another) (tried neon too by the way).Caddis
@Caddis what version and build of Sublime Text are you using?Falcate
ST3 3114 build, 64bit. OS windows 8.1.Caddis

© 2022 - 2024 — McMap. All rights reserved.