I noticed there is no library listed in melpa
for highlighting and working with Apache Avro IDL schemata. Is there any, or else how people who work with Avro have set up their configuration to ease their work?

- 392
- 4
- 21
1 Answers
I couldn't find anything, so I made it myself.
;;; avro-mode.el -- major mode for editing Avro IDL files. -*- coding: utf-8; lexical-binding: t; -*-
;;; Copyright © by Daniel Vianna
;;; Version: 0.0.1
;;; Created: 19 Aug 2021
;;; Keywords: languages
;;; This file is not part of GNU Emacs.
;;; License:
;;; You can redistribute this program and/or modify it under the terms of the GNU General Public License version 2.
;;; Package --- summary
;;; Commentary:
;;;
;;; Avro interface description language mode (.avdl)
;;; Code:
(require 'generic-x)
(define-generic-mode
'avro-mode
'("//") ;; comments
'("protocol" "namespace") ;; reserved words
'(("\<[[:alnum:]]+\>" (0 font-lock-builtin-face) ("\<[[:alnum:]]+\>;?\( {\)?" nil nil (0 nil))) ;; type
("\<\(?:namespace\|protocol\)\>" . font-lock-keyword-face)
("{\\|}\\|;\\|<\\|>" . font-lock-constant-face)) ;; separators
'("\.avdl$") ;; file extension
nil
"Major mode for editing Avro IDL files."
)
(provide 'avro-mode)
;;; avro-mode.el ends here

- 392
- 4
- 21
avro
is. I googled it and the first hit says: " It uses JSON for defining data types and protocols...", so does a JSON library satisfy your requirements? If so, there should be plenty to choose from. – NickD Aug 09 '21 at 13:35