Closed G4Zz0L1 closed 2 years ago
Could you provide a test case to reproduce this issue?
I just have to open a .php file, and this pops up
The strange thing it's that it always have worked, for the last 4+ years, with the same identical setup
"installed_packages":
[
"1337 Color Scheme",
"Alignment",
"All Autocomplete",
"AndyPHP",
"ApacheConf",
"ApplySyntax",
"AutoFileName",
"BetterFindBuffer",
"Bootstrap 3 Snippets",
"BracketHighlighter",
"CodeFormatter",
"Color Highlighter",
"Color Scheme - Rainbow",
"ColorPicker",
"Colorsublime",
"CSS3",
"CSScomb",
"Dayle Rees Color Schemes",
"Devastate",
"DocBlockr",
"DocPHPManualer",
"EditorConfig",
"Emmet",
"ExpandRegion",
"FileDiffs",
"Git",
"GitGutter",
"GotoDocumentation",
"HTML Extended",
"HTML Head Snippets",
"HTML Snippets",
"HTML5",
"HTMLAttributes",
"HTMLBeautify",
"HTMLEntity Snippets",
"ImprovedSQL",
"Incrementor",
"INI",
"JavaScriptNext - ES6 Syntax",
"jQuery",
"jQuery Mobile 14 Snippets",
"jQuery Mobile Snippets",
"jQuery Snippets pack",
"Local History",
"Material Theme",
"Minify",
"MySQL Snippets",
"Neon Color Scheme",
"Numix Theme",
"Open-Include",
"Package Control",
"Package Syncing",
"PHP Companion",
"PHP Completions Kit",
"PHP-Twig",
"Phpcs",
"phpfmt",
"PHPIntel",
"PHPSnippets",
"Predawn",
"Predawn Monokai",
"Rainglow",
"Restart",
"SFTP",
"SideBarEnhancements",
"Smarty",
"SqlBeautifier",
"SublimeCodeIntel",
"Sublimerge 3",
"Sync View Scroll",
"Tag",
"Text Pastry",
"Theme - Asphalt",
"Theme - Augmented Reaction",
"Theme - Brogrammer",
"Theme - Cyanide",
"Theme - Flatland",
"Theme - Freesia",
"Theme - Glacier",
"Theme - itg.flat",
"Theme - Numix",
"Theme - Orchis",
"Theme - Phoenix",
"Theme - Piatto",
"Theme - Spacegray",
"Theme - Tech49",
"Theme - Watson",
"Tomorrow Color Schemes",
"Trimmer",
"WordCount"
]
Most likely one of those packages has recently been updated and is now causing this issue in your environment. It doesn't happen in a clean state.
I'll try to revert to clean asap and report
Just reporting in that I started getting the same today.
I've disabled "SublimeLinter", "SublimeLinter-php", "SublimeLinter-phpcs", "SublimeLinter-phplint" and other php related packages. So far, getting no luck.
I haven't had a chance to reset sublime on my workstation, I'll check as soon as I get to home, if it does the same.
remove CSS3 work for me
but php syntax not load
Yep, I think you found the culprit.
I just disabled that and re-enabled all the supporting php mods, such as the linter, and the error is gone. For me the syntax coloring is back for PHP and the linter is working. Of course embedded scopes such as CSS are not coloring.
I don't know enough about the environment to know what is causing the error, but here's the top part of my console output after disabling CSS3. Obviously, the Error loading scope:source.css: Unable to find syntax file for scope source.css is going to happen because I don't have anything loading for the CSS scope.
startup, version: 3176 osx x64 channel: stable
executable: /Applications/Sublime Text.app/Contents/MacOS/Sublime Text
working dir: /
packages path: /Users/username/Library/Application Support/Sublime Text 3/Packages
state path: /Users/username/Library/Application Support/Sublime Text 3/Local
zip path: /Applications/Sublime Text.app/Contents/MacOS/Packages
zip path: /Users/username/Library/Application Support/Sublime Text 3/Installed Packages
ignored_packages: ["CSS", "CSS3", "Emmet", "Emmet Css Snippets", "LiveStyle", "Markdown", "PlainTasks", "Six", "SublimeLinter-jshint", "Vintage", "Vintageous"]
Errors parsing theme:
icon_folder_loading is missing layer0.opacity, setting to 1.0 for backwards compatibility
pre session restore time: 0.942442
using gpu buffer for window
using gpu buffer for window
using gpu buffer for window
using gpu buffer for window
startup time: 1.21789
Error loading scope:source.css: Unable to find syntax file for scope source.css in Packages/PHP/PHP.sublime-syntax
scan: symlink to /Users/username/Sites/drupal/docroot/sites/www.filemakermagazine.com has been seen before, superseding (using inode) previous path: /Users/username/Sites/drupal/docroot/sites/default inode: 12711147
Packages/PHP/PHP.sublime-syntax: embed scope:source.css#rule-list-body could not be found
scan: /Users/username/Sites/drupal/docroot/sites/www.filemakermagazine.com/private has been seen before, skipping (using inode) previous path: /Users/username/Sites/drupal/docroot/files-mag-private inode: 13142668
scan: /Users/username/Sites/drupal/docroot/sites/www.filemakermagazine.com/files has been seen before, skipping (using inode) previous path: /Users/username/Sites/drupal/docroot/files-mag-public inode: 13139542
scan: /Users/username/Sites/drupal/docroot/sites/www.filemakermagazine.com/modules/o_contrib_seven has been seen before, skipping (using inode) previous path: /Users/username/Sites/drupal/docroot/o_contrib_seven inode: 13141216
environment variables loaded using: /bin/zsh -l
And... after disabling CSS3 you'll then get this for any .css file. :)
So, we have to move the culprit to css3 plugin?
Edit: it seems that the problem isn't only for php https://github.com/y0ssar1an/CSS3/issues/103 https://github.com/y0ssar1an/CSS3/issues/78
Yeah, I can confirm that reverting back on the CSS3 does not work. I uninstalled CSS3 via Package Control and pulled the repo directly into Packages then checked out previous tags. Going back 2.1.13 and trying everything up to 2.1.17 didn't fix. Don't know what is causing the issue.
I've opened an issue on that repo, let's see what they can do. I think we can close this as it's not related to this package.
Make sure to enable the default css package shipped with ST after removing or disabling css3 because it asks/requires you to ignore it when installed.
I did notice this oddball highlight in a .css file. The last paren and semi colon?
Just throwing out a guess here, but looking at the commit history would this one be a potential cause?
https://github.com/sublimehq/Packages/pull/1562 More precise php-end-tag scoping 9f14041368019396f4993eedabf99aaca9efe0cc
I'm not in Sublime on a daily basis so I don't have an exact start date/time for when the issue started for me. But maybe this introduced the conflict with CSS3.
I'm getting this with Markdown now.
Disabling the CSS3 package was the solution for me.
It seems fixed from the CSS3 part, with the https://github.com/y0ssar1an/CSS3/pull/108, I think we can close this
Personal just to reinforce, here was also with this same problem and I decided to remove this same package "CSS3".
In my case, the https://github.com/borela/naomi package was causing this issue and there were two ways to fix it:
The bug issue is here: https://github.com/borela/naomi/issues/183
I don't have the CSS3 package installed and I got this error on Sublime Merge here ...
@thomashermant , not sure why, but I remove the package Naomi and PHP code was highlighted properly. I was having the issue too and I don't have the CSS3 package installed. If you probably have Naomi installed too, you can remove it and restart Sublime.
Not sure why people prefer that BIG syntax bundle. But if you are using ST 4, the built-in PHP syntax should've caught up all PHP 8 syntax. JSX/TS syntax is now built-in (I am not much a frontend guy but I assumed the JSCustom
plugin should have provide good syntax for frontend JS/TX related things). And CSS is always good I assume...
Update: Well, PHP devs decide to change the @@
annotation syntax to another one (either #[]
or @[]
). Now voting.
On sublime 3.1.1 build 3176
Without changing, or adding any plugin, suddenly sublime starts complaining this:
Error loading syntax file "Packages/PHP/PHP.sublime-syntax": Apparent recursion within a with_prototype action: 25000 context sanity limit hit