Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to highlight SQL in PyCharm

So I've been messing around with Python using PyCharm (Community Edition), and trying to make something using a database. For this I am using SQLite3.

The program runs just fine, and does what it's supposed to do, but in a lot of tutorials I see the syntax highlighted in colors just as "Def" and "Import" is. Whenever I write something like """CREATE TABLE""" it does not highlight it even though it runs just fine.

Been trying to figure it out for a while now but can't find an answer.

Tried installing the Database Navigator, which seemed to do nothing for this.

Tried messing around with the settings for PL/SQL (DBN) and SQL (DBN) in the settings under Color Scheme, also nothing.

Tried looking into language injection, but all I could find was people injecting from a list. But my langue injection list is empty and cant find anything on how to populate it. Now it does not even show me the option to inject when I press alt+enter either.

So I'm out of ideas as to what to search for, anyone able to help?

like image 366
Rattja Avatar asked Oct 11 '18 08:10

Rattja


People also ask

How do you highlight in PyCharm?

Enable semantic highlightingPress Ctrl+Alt+S to open the IDE settings and select Editor | Color Scheme | Language Defaults | Semantic highlighting. Select the Semantic highlighting checkbox and customize the color ranges if necessary.

Does SQL work on PyCharm?

Database tools and SQLThe database management functionality in PyCharm is supported by the Database tools and SQL plugin.


1 Answers

Support for SQL features (highlighting, running SQL from IDE, etc.) is present in (paid) PyCharm Professional Edition only. So you won't be able to have SQL highlighting in PyCHarm Community.

See here for feature comparision: https://www.jetbrains.com/pycharm/features/editions_comparison_matrix.html .

like image 85
jb. Avatar answered Nov 04 '22 12:11

jb.