* Multi-mode editing with semantic
@ 2020-03-10 6:56 Anand Tamariya
0 siblings, 0 replies; only message in thread
From: Anand Tamariya @ 2020-03-10 6:56 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 1018 bytes --]
Hi,
Glad to announce my enhancements to semantic which allows multi-mode
editing in a single buffer. Demo video demonstrates the same for HTML with
CSS and JS sections and includes. Jump to definition shortcut works for
includes and definitions. JS and HTML uses company-semantic backend for
auto-suggest whereas CSS uses company-capf. JS uses wisent based parsing,
HTML uses libxml based parsing and CSS uses regex based parsing.
https://youtu.be/FkOYUPjdID8
*Usage *
- Define a pre-command hook in major-mode
(add-hook 'pre-command-hook #'(lambda()
(setq mode-local-active-mode
(semantic-get-cache-data 'mode
(point)))
(activate-mode-local-bindings))
-1 t)
- Mark sections using (semantic-cache-data-to-buffer) while parsing major
mode.
- Collect tags using (semantic-parse-region start end)
- Override (semantic-ctxt-current-class-list) to return tag class allowed
at a point
Regards,
Anand
[-- Attachment #2: Type: text/html, Size: 1362 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-03-10 6:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-10 6:56 Multi-mode editing with semantic Anand Tamariya
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).