emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GNU Emacs as a lightweight SQL IDE


From: Anand Tamariya
Subject: GNU Emacs as a lightweight SQL IDE
Date: Sat, 28 Mar 2020 14:31:41 +0700


Here's my next installment of "GNU Emacs as a lightweight IDE" series for editing SQL. These enhancements to Semantic and sql-mode allows SQL code-completion for most common use-cases.
Hope this will aid your productivity while using SQL in Emacs.


Config (.emacs):
(global-ede-mode 1)
(semantic-mode 1)
(srecode-minor-mode 1)
;; Install company for inline completion with dropdown
(require 'company)
(global-company-mode)

Demo:

Implementation notes:
The SQL specific implementation is confined to three files - sql.wy, sql.el and company-semantic.el. Most of the heavy lifting is done by the semantic and company framework.
- sql.wy - This is the language grammar file. You compile this (run make in emacs/lisp directory) to generate language parser sql-tags-wy.el.
- semantic/sql.el - Overrides some semantic functions
- company-semantic.el - Deals with auto-completion using semantic
- progmodes/sql.el - JDBC product definition and supporting functions
- H2 web console supports "@tables" meta commands. My customization makes them available to CLI console as well.

Regards,
Anand

reply via email to

[Prev in Thread] Current Thread [Next in Thread]