Fix DBeaver SQL Editor – Syntax Highlighting or Autocomplete Broken
In this tutorial, you'll learn about Fix DBeaver SQL Editor. We cover key concepts, practical examples, and best practices.
You open a new SQL editor in DBeaver, type SELECT * FROM use, and expect autocomplete to suggest users. Nothing appears. The text is all one colour — no keyword highlighting. The editor feels like a plain notepad.
Wrong ❌
select * from users where id = 1
Every word is the same monochrome black. Alt+/ (shortcut for autocomplete) does nothing. You check if the connection is active — it is. You restart DBeaver — still broken.
You poke around preferences but can't find where syntax highlighting is controlled.
Right ✅
Enable syntax highlighting:
- Window → Preferences → Editors → SQL Editor → SQL Formatting
- Ensure Enable syntax highlighting is ☑ checked
- Pick a colour theme from Appearance → Colors and Fonts → DBeaver SQL Editor
Fix autocomplete:
- Window → Preferences → Editors → SQL Editor → Content Assist
- ☑ Enable auto activation
- Set Auto activation delay to
200ms - Set Auto activation triggers to
. - Database → MetaData read preferences:
- ☑ Read all metadata in separate job
- ☑ Enable proposals from database metadata
Refresh metadata for a specific connection:
- In the Database Navigator, right‑click your connection → Tools → Refresh Object Cache
- Wait for the Metadata read job to finish (check the bottom‑right progress bar)
Now type:
SELECT * FROM use
-- DBeaver suggests: users, user_roles, user_settings
Press Enter to accept → code completed instantly
Syntax highlighting kicks in immediately: SELECT and FROM turn blue, users stays black, numbers turn purple.
Root Cause
DBeaver lazy‑loads metadata to speed up startup. Until the metadata is fully read, autocomplete has no schema to propose from. Syntax highlighting can be disabled by a workspace preference import or a DBeaver upgrade that resets the theme.
Prevention
- Leave Read all metadata in separate job enabled to prefetch on connect.
- Save your editor preferences as a workspace
.epf(File → Export → Preferences) for team consistency. - After adding new tables or columns, refresh the metadata cache before relying on autocomplete.
- Use
Ctrl+Spacemanually if auto‑activation feels sluggish — it forces an immediate proposal.
Common Mistakes with sql editor
- Mixing let bindings with <- bindings in do notation, producing type errors
- Overlapping type class instances that cause GHC to reject the program with ambiguous dispatch errors
- Non-exhaustive pattern matches that compile with warnings then crash at runtime
These mistakes appear frequently in real-world DBEAVER code. DodaTech's contributors have identified these patterns through analysis of open-source projects and production systems.
Practice Exercise
Write a pure function that safely divides two integers using Maybe, then test it with edge cases like division by zero and negative numbers.
This exercise reinforces the concepts covered in this guide. Try implementing it before checking online solutions.
FAQ
Master DBeaver's editor features with the DodaTech DBeaver Fundamentals course.
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro