Skip to content

Fix DBeaver SQL Editor – Syntax Highlighting or Autocomplete Broken

DodaTech Updated 2026-06-24 3 min read

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.

Enable syntax highlighting:

  1. Window → Preferences → Editors → SQL Editor → SQL Formatting
  2. Ensure Enable syntax highlighting is ☑ checked
  3. Pick a colour theme from Appearance → Colors and Fonts → DBeaver SQL Editor

Fix autocomplete:

  1. Window → Preferences → Editors → SQL Editor → Content Assist
  2. Enable auto activation
  3. Set Auto activation delay to 200 ms
  4. Set Auto activation triggers to .
  5. Database → MetaData read preferences:
    • Read all metadata in separate job
    • Enable proposals from database metadata

Refresh metadata for a specific connection:

  1. In the Database Navigator, right‑click your connection → Tools → Refresh Object Cache
  2. 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+Space manually if auto‑activation feels sluggish — it forces an immediate proposal.

Common Mistakes with sql editor

  1. Mixing let bindings with <- bindings in do notation, producing type errors
  2. Overlapping type class instances that cause GHC to reject the program with ambiguous dispatch errors
  3. 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

**Q: Can I add custom keywords to the syntax highlighter?**

A: No — DBeaver uses a fixed SQL dialect grammar. Switch the SQL dialect dropdown in the editor toolbar if the highlighting is wrong for your flavour.

**Q: Why does autocomplete show old tables after I dropped them?**

A: Stale metadata cache — right‑click the connection → Refresh (F5).

**Q: Does the SQL editor support multiple cursors?**

A: Yes — Alt+Shift+Click adds a second cursor. DBeaver supports column‑editing like VS Code.

**Q: How do I change the font size in the editor?**

A: Window → Preferences → Appearance → Colors and Fonts → DBeaver SQL Editor → Font → Edit.


Master DBeaver's editor features with the DodaTech DBeaver Fundamentals course.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro