How to activate color-coding and intellisense in new PyCharm project? - intellij-idea

I created a new project in PyCharm, however, color coding is not carrying over. Intellisense seems to not work either.
I have already tried switching themes and messing with the source directory, but nothing changes.
Example
I would expect the above screenshot to be color coded based on the theme I am using, darcula in this case. Also, boto3 is not installed, so I would expect an error outside of a typo.

Solution was main.py was seen as a text file even though *.py is seens as python. Weird, don't know how that happened, but I went to File -> Settings -> Editor -> File Types, deleted that association and it worked.

Related

PhpStorm Search Everywhere is not working, do you know the solution?

I don't know this is off topic or not, I'm using general channels. Is there a solution for Search Anywhere in PhpStorm. I work with Laravel but when I use the feature I can't find the file even though it exists.
Looking at your screenshot: based on the fact that ALL files in the project tree have that sort of "dirty yellow" background color... it looks like ALL of your files are considered excluded / outside of the project for some reason.
Most likely a user error of some kind. E.g. you may have opened it from a different path (i.e. when symlink is involved), may have c=misconfigured it later somehow (marked folder as Excluded by mistake or whatnot) or maybe even some sort of config file corruption (pretty unlikely).
Anyway, please do this:
Close your project
Go to the project root folder and delete your .idea subfolder (that's where your project settings are stored).
If you have that project still visible in the IDE (Recent Projects on the Welcome screen) -- you may remove it there as well (to avoid any possible confusion).
Now create a new project in PhpStorm from scratch using existing files: just use "Open" and point to the folder with your project.
Please check filter option. If you are doing file search then click on Files tab.

UI Text not rendering properly with Intellij IDEA and MacType

I wanted to make Intellij IDEA on windows look like the one on OS X Because in
my opinion it looks much better, so I installed MacType, I was able to get the
editor font render correctly, but when I change the UI font to match OS X's UI
font, The text gets cut off in some places. The font I am trying to use is
Lucida Grande size 15. You can see it for yourself in the picture
below:
Intellij UI Text getting cut: https://i.stack.imgur.com/4jnda.png
But if I remove disable MacType rendering, everything works fine, but it looks bad.
Intellij UI Text without MacType rendering: https://i.stack.imgur.com/AJEUl.png
I've tried changing MacType's settings, but nothing works!
I am on Windows 10 Creators Update with Intellij IDEA 2017.2
Any help would be appreciated.
I found the answer myself! Apparently if you open the mactype profile you are using with notepad, and paste the following text at the end of the file:
[Experimental#idea64.exe]
ClipBoxFix=1
Then all the fonts will render correctly. Note, this does not only work for Intellij IDEA, but also all other java applications and a few others. To achieve this, all you have to do is replace "idea64.exe" with the name of the app executable. An example is for the 32-bit version of Intellij, you would replace "idea64.exe" with "idea.exe".
More information can be found here: https://github.com/snowie2000/mactype/wiki/ClipBoxFix

Unable to change some files in RubyMine project

Currently I'm having an issue where I cannot make any changes to some files in my project. When hitting the return or space bar key it will only select text and not create new lines or spaces respectively.
I'm fairly certain it has something to do with the VCS features but cannot seem to find any settings to correct the Read-Only issue I'm running into.
This issue did raise it head after installing the Dash plugin. Not sure if this is coincidental or related.
Thanks!
update: After further test it looks like some files go into a sort of preview mode. Return and Space bar keys will let you scan the file and hitting any other keys will wake up the edit function. Strange?
IdealVim caused this for me. Definitely plugin related.

Intellij failed to detect file type

I have intellij 13.1.3 Ultimate and have been using it for my PHP projects. All my files.php are nicely hightlighted for php.
This morning I had to create a new file called "report.php". At first I create it with right click > new > file, but this gave me no hightlighting. So I deleted it and tried again with a right click > new > php file with same result. Now what ever the way I create it, it thinks the file is txt (it seems so) and there is no code highlighting. It's pretty frustrating.
I have tested the creation of a new file with a different name "reports.php" but this time with right click> new > PHP file, and it came nicely highlighted. i tried to rename the file to "report.php" but it came back to no highlighting!!
It seems Intellij is stuck with the name report.php being a type text.
I tried to delete the file, restart the IDEA, recreate it the right way, no luck.
I tried power save mode on, and off. No luck.
I tried File > invalidate cache/restart, ... no luck.
I'm out of options here...
Is there a way to FORCE intellij to interpret a file? Is the name "report" a reserved word?!?!?
How can it be so stupid...
edit: I also tried the suggestion in : IntelliJ: how to force editor to treat a file as javascript? but php is not in the list of the Template data language
Also in settings > file types, I saw two Php file entries. One with no extention, and one properly configured. I deleted the bad one but it reappears after a restart of the IDEA!
Please go to Settings | Editor | File Types and remove the association of "report.php" with the text file type. (The erroneous association was created because of a bug in IntelliJ IDEA, but unfortunately we don't currently have specific steps to reproduce for it.)

Why is the font in the new IntelliJ IDEA 14.1 not rendering properly?

I've just upgraded IntelliJ IDEA (ultimate) to Version 14.1 and the font used in the Project View, Menus and Dialogs seems not to be rendering correctly. I exported the same settings from my 14.0.3 version just in case, although they seem identical, but it still remained the same. I didn't do any changes to the JDK or anything, and if I run the old version the font changes back to the nice and crisp one. I am using Ubuntu 14.04. This problem does not happen on Windows 7.
Under IntelliJ IDEA 14.0.3:
Under IntelliJ IDEA 14.1:
In the new one the font seems to be a bit larger (even though in both cases I they are set to Font Size 22, and I imported the settings from the previous IntelliJ IDEA installation). Notice how for example the 'g' is cut off underneath. There are also other problems where the text is misaligned on the buttons, or not fully visible in dialog boxes.
Usually this doesn't happen when I upgrade. Is there some way to make the font look like before? Did something changed in this latest version and I need to do some JVM switch in the startup script or something?
Update: 5/11/2015
Just updated to IntelliJ 15, and the problem is still there.
Attached new screenshot. Notice how the text is cut out at the bottom where there are letters like p and y, and the button text is offset.
Seconding an earlier response to this question, I have also have had great luck fixing font rendering issues on IntelliJ using tuxjdk. Tuxjdk is a JDK for the IDE, while any applications you're coding on runs in their own project configured JDK such as Oracle or OpenJDK. Here are the instructions:
The following fetches, unpacks, and moves the version you need to /usr/lib, then cleans up the archive. Modify /usr/lib to wherever you like to keep your JDKs.
wget http://urshulyak.com:85/jdk-8u5-tuxjdk-b08.tar.gz
tar -zxvf jdk-8u5-tuxjdk-b08.tar.gz
sudo mv jdk-8u5-tuxjdk-b08 /usr/lib
rm jdk-8u5-tuxjdk-b08.tar.gz
Open up idea.sh in your IntelliJ application folder /idea-IU-141.*/bin. Change the following line at the bottom of the script from
LD_LIBRARY_PATH="$IDE_BIN_HOME:$LD_LIBRARY_PATH" "$JDK/bin/java" \
to
LD_LIBRARY_PATH="$IDE_BIN_HOME:$LD_LIBRARY_PATH" "/usr/lib/jdk-8u5-tuxjdk-b08/bin/java" \
That's it. This made huge font improvements for me in Ubuntu 14.04.
UPDATE (by OP)
This solution is the best so far (until JetBrains decide to fix it properly).
I would just add the line: IDEA_JDK="/usr/lib/jdk-8u25-tuxjdk/" to the top of idea.sh, which the script checks before resorting to JDK_HOME etc. (so is probably the recommended way) rather than messing with the LD_LIBRARY_PATH.
In my case I got nicely rendered but huge fonts with this solution. In order to fix it I had to do an extra fix from Appearance & Behaviour -> Appearance
I chose the 'not recommended' option to Override default fonts by Arial size 12. This was the best effect I got so far.
I am using OSX. It may not help.
Double tap shift and search for 'Switch IDE boot JDK'. Try different JDKs if there are.
This might not be the answer you are looking for - but ever since I've started using tuxjdk, I haven't had problems any more with font rendering & intellij on ubuntu. Maybe give it a try?
If you're willing to use the IntelliJ 15 EAP, there is an option for antialiasing (default is checked for me) that appears to match how it was rendered in 14. The option is under Appearance & Behavior -> Appearance:
I have tried all of the command-line arguments to try to get this behavior in 14.1, but was unsuccessful.