Problems in getting SublimeLinter to work - sublimetext2

I need help getting the SublimeLinter to work.
I have installed the SublimeLinter using the package installer. However I cant see the lint working in my js files. Also when I do command + shift + P (linux) I only see the following command for linter 'Sublime Linter : Extract Annotations'.
I don't see the other commands for running the linter.
Any Ideas what is wrong?
Thanks,
Murtaza

You have to install nodejs from the repos.
If nodejs isn't installed in /usr/local/bin/node you have to set a symbolic link to this place:
touch /usr/local/bin/node
ln -s /usr/bin/nodejs /usr/local/bin/node
The above worked for me on debian/crunchbang
Alternatively you can change the sublime user settings for linter(ps haven't tested this option)
"sublimelinter_executable_map":
{
"javascript": "/usr/bin/nodejs"
}

Some tips:
Be sure your files are using the Javascript syntax.
The linter runs automatically (check the package settings).
Open the console to see any errors.
Check the documentation to configure Javascript linters

Related

What exactly needs to be included in a RubyMine custom Ruby configuration, esp. for debugging?

I usually use rvm, but also need to work with a custom Ruby build. I understand that when I go to the RubyMine "Settings", "Languages & Frameworks", "Ruby SDK and Gems" dialog, I need to press "+" and select "New Local with Custom Configurator".
On that dialog, the Ruby interpreter path is self explanatory, but I don't know which environment variables I need to specify in the "Custom Configurator" session. What information needs to go there?
I am using RubyMine 2021.1 on both Mac OS and Linux. I need to be able to debug, which means that when RubyMine installs the debug support gems, they need to go to the right location, and be found from that location.
It turned out that all I needed to specify there was my GEM_HOME:
env GEM_HOME=/opt/my-custom-ruby/gems/2.7.0
I was surprised that I didn't also need to explicitly set the path to the directory containing the Ruby interpreter (for commands other than ruby, such as bundle), but I guess RubyMine does that for me. Or, maybe it doesn't, and I just haven't encountered an error yet.
Edit: It turns out I did have an issue with a gem not being found. I added to that env command and the problem went away, but I'm not really sure yet if that was the issue or if adding both GEM_PATH and PATH were necessary. Here is what I wound up with:
env GEM_HOME=/opt/my-custom-ruby/gems/2.7.0 GEM_PATH=/opt/my-custom-ruby/gems/2.7.0 PATH=/opt/my-custom-ruby/bin/ruby:$PATH
EDIT 2021-12-24
I just tried this again on a new installation and the above did not work. I was getting build errors saying that I needed to install the development tools. It turned out that when specifying the path in the
Custom Configurator field I needed to include the path for the gcc compiler. I just put most of the paths in my login PATH value there, and the gem installation succeeded.

Cross-compile Qt5 (Mingw) with MySQL driver issue

I tried a lot of things I read on documentations or tutorials... But I still can't cross-compile Qt with the MySQL library driver. Story begins:
I have to cross-compile Qt from Linux to Windows (32bits) using MinGW (i686-w64-mingw32- prefix to be precise). I downloaded qtbase-opensource-src-5.9.4 and started to work like that:
$ ./configure -prefix [...]/qt-5.9.4 -xplatform win32-g++ -device-option CROSS_COMPILE=/usr/bin/i686-w64-mingw32- -opengl desktop -no-sql-odbc -sql-sqlite -enable-shared -nomake examples -nomake tests -release
And it worked. Then, make and make install worked too. But I figured out that there was only the SQLite ".dll" in the plugins/sqldrivers repository. So I tried to compile the MySQL driver and... How can I do that?? If I add -sql-mysql to my ./configure ... call, I have to following error:
ERROR: Feature 'sql-mysql' was enabled, but the pre-condition 'libs.mysql' failed.
I downloaded MySQL library from the official website to get mysql-5.7.21-win32.zip. But how to link it with qtbase sources? Adding MYSQL_INCDIR=[...]/mysql-5.7.21-win32/include and MYSQL_LIBDIR=[...]/mysql-5.7.21-win32/lib or just MYSQL_PREFIX=[...]/mysql-5.7.21-win32 to my ./configure ... command results to the same error message.
Any idea please?
EDIT:
I tried to compile the driver like that (with the qmake I built previously):
$ cd qtbase-opensource-src-5.9.4/src/plugins/sqldrivers/mysql
$ [/*prefix of my previous build*/]/qt-5.9.4/bin/qmake .
And the result is:
Project ERROR: Library 'mysql' is not defined.
Ok everyone, I found the solution: do a clean checkout or add -recheck-all to the ./configure command when you want to add a lib like MySQL in my case. Easy isn't it? To make it clear, here is the command I used:
./configure -prefix [...] -xplatform win32-g++ -device-option CROSS_COMPILE=/usr/bin/i686-w64-mingw32- -opengl desktop -no-sql-odbc -sql-sqlite -plugin-sql-mysql MYSQL_PREFIX=[...] -enable-shared -nomake examples -nomake tests -release -recheck-all
That was just a refresh problem, but I prefer to let this answer because it's pretty hard to realize.
Instead of what you tried in your EDIT, should I think be:
$ cd qtbase-opensource-src-5.9.4/src/plugins/sqldrivers
qmake -- MYSQL_PREFIX= [...]/mysql-5.7.21-win32/include

htmltidy linter does not have a file in directory usr/local/bin

So I recently installed a few linters for sublimelinter and so far all work except htmltidy. I installed as directed using terminal (I'm running OSX) in the following way:
sudo npm install -g htmltidy
This worked for CSSLint, JSHint etc. but not htmltidy. i checked usr/local/bin and it turns out that there is no .js file for htmltidy. How could I fix this?
Run whereis htmltidy. If that does not return anything close out of terminal and open it back up. The installer might of added something to your path but didn't resource it.
If that doesn't work run sudo find -name htmltidy /

phpstorm cannot find class ZMQContext

Hi I'm creating project according to Tutorial on Ratchet website.
I installed zeromq version 0.3.0 through composer in phpstorm.(I checked if I installed right zeromq with phpinfo() and also with php-m in terminal)
In file post.php I cannot create new object of class ZMQContext(). - php storm cannot find this class.
I found the same issue on stackoverflow but solution is for linux.I'm using win.
When I want to use this in code: use React\ZMQ. - I don't see there class ZMQContext
Thanks for answer.
You can get PHPStorm to auto-complete code that uses the ZMQ PHP extension.
Save this stub file: https://gist.github.com/Mikulas/c22e44a918c7af5de5e6
I saved it (on OSX) under /Applications/PhpStorm EAP.app/Contents/plugins/php/lib/extensions/zmq.php
Then go to PHPStorm > Preferences > Languages & Frameworks > PHP > include path and add that extensions folder.
Now go back to your file and you'll see PHPStorm auto-completing stuff from the ZMQ extension.
Have fun! I hope you'll find this useful.
It looks like you've installed the PHP PECL extension. You also need to install the ZeroMQ library on your system that ext-zmq will use. If you're an a Debian based system try sudo apt-get install libzmq-dev or a RH based system sudo yum install zeromq zeromq-devel.

Sublime Linter not working in Windows

As the title says.
The linter doesnt seem to work at all for me in Windows. I have tried it with javascript and php files with the correct syntax set.
Im following Jeffery Ways tutorial here -> https://tutsplus.com/lesson/sublime-linter/
I have installed package control,
SublimeLinter and nothing, removed it
installed sublimelinter beta and nothing too.
Any help please
From SublimeLinter's github page:
"If you plan to edit files that use a Javascript-based linter (Javascript, CSS), your system must have a Javascript engine installed... On Windows, you must install the Javascript engine Node.js, which can be downloaded from the Node.js site."
Node.js
Install it like a normal Windows application. Close Sublime and restart. Linting should be working.
You need to point the SublimeLinter to your PHP executable file in the SublimeLinter.sublime-settings.
Change this option:
"sublimelinter_executable_map":
{
"php": "C:\\wamp\\bin\\php\\php5.3.13\\php.exe"
},
Edit:
See this link for more help
http://fuzzytolerance.info/blog/2012/05/14/2012-05-15-getting-sublimelinter-running-on-windows/
In order to get SublimeLint linting js files, I had to follow the instructions here and install this additional plugin:
(I didn't need to follow the 'Linter configuration' step)
https://github.com/SublimeLinter/SublimeLinter-jshint#linter-installation