How to setup SublimeLinter for mac
Asked Answered
C

1

6

I've been trying to setup SublimeLinter (Mac) but something must be going wrong as the php lint simply doesn't work. I've installed and removed the package many times, tried to add/remove support for php following different tutorials I've found but none worked. I thought Sublime packages were straight forward as installing and using. Am I missing something?

Chromolithography answered 16/3, 2013 at 16:55 Comment(6)
Are there any errors in the console (open console with ctrl + backquote) Is it just PHP linter that isn't working or is it all of them? I believe the Python one is built in, so you may want to try that. You can at least narrow down if it is the linter itself, or if it is php specific.Loaiasis
I believe its linter as I've tried Javascript (which I believe is also built in and I don't know a thing of Python) and it doesn't seem to work either.Chromolithography
I know JS doesn't work on my machine, but I don't have node.js or something similar installed (which the linter uses). Try restarting sublime, then open the console. It should list all of the plugins being loaded. One of which, will be SublimeLinter. See if there are any errors when plugins are loaded.Loaiasis
I've followed your advice and it seems that the only linter available are css and html. Here's the message from console: SublimeLinter: css enabled (using JavaScriptCore) SublimeLinter: html disabled (tidy is not ready for HTML5) and nothing else. Any ideas on how to enable for js and php?Chromolithography
For JavaScript, you need to install either node.js or JavaScriptCore. As for php, I believe it uses the php command you would run from terminal. So if you can run php -l from the terminal, I believe the linter should work also.Loaiasis
Surprised I forgot to say this before, but you may want to check their github page (link) if you are still having issues. It also has some instructions, with respect to configurations.Loaiasis
P
1

I believe Sublime sets the syntax of PHP to HTML by default. Change the syntax to PHP if you want it to lint as PHP.

Palpitate answered 21/5, 2013 at 0:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.