如何禁用DataGrip中的紫色代码高亮线功能?
Hey there! I totally get how frustrating it is to have all your code surrounded by those purple lines—let’s fix that right away. Here are the most common solutions depending on exactly what kind of purple highlighting you’re seeing:
Fix 1: Disable Spelling Check Purple Wavy Lines
If the purple lines are wavy (like a spelling error marker), this is almost certainly DataGrip’s built-in spelling check:
- Open DataGrip’s settings: press
Ctrl+Alt+S(Windows/Linux) orCmd+,(Mac) - Navigate to
Editor | Inspections - In the top search bar, type
Spelling - Uncheck the main
Spellingbox (or uncheck specific sub-options if you still want some spelling checks enabled) - Hit
ApplythenOK—the purple lines should disappear immediately.
Fix 2: Turn Off Code Block/Highlighted Border Lines
If it’s a solid purple border surrounding entire code blocks, this is likely a color scheme or code highlighting setting:
- Open settings and go to
Editor | Color Scheme | General - Use the search bar here to look for terms like
Code Block,Block Highlighting, orSelection - Find the option assigned the purple color, either set its color to transparent or uncheck the "Enabled" box (depending on your theme)
- Save changes with
ApplyandOK.
Fix 3: Disable the Right Margin Purple Line
If the purple line is a single vertical line on the right side of the editor (the "right margin" marker):
- Go to
Editor | General | Appearancein settings - Uncheck the box labeled
Show right margin - If you just want to change its color instead of removing it, head to
Editor | Color Scheme | Generaland adjust theRight Margincolor to something less distracting.
Bonus Trick: Directly Inspect the Highlight
If none of the above works, right-click directly on one of the purple lines and select Inspect. This will take you straight to the exact setting that’s causing the highlighting, so you can disable it with one click.
内容的提问来源于stack exchange,提问作者Diego Victor de Jesus

