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.
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