PlumaでAsciiDocのsyntax highlightを

ちょっと探したらこういうものがあった

$ git clone https://github.com/edusantana/asciidoc-highlight
$ cd ./asciidoc-highlight/gedit
$ ./install.sh
$ ls -lA ~/.local/share/gtksourceview-2.0/language-specs/asciidoc.lang
lrwxrwxrwx 1 mk mk 26  7月 16 02:40 /home/mk/.local/share/gtksourceview-2.0/language-specs/asciidoc.lang -> /home/mk/src/asciid
oc.lang
$ ls -lA ~/.local/share/gtksourceview-3.0/language-specs/asciidoc.lang
lrwxrwxrwx 1 mk mk 26  7月 16 02:40 /home/mk/.local/share/gtksourceview-3.0/language-specs/asciidoc.lang -> /home/mk/src/asciidoc.lang

シンボリックリンクが作られていた.scriptもこれだけ.

$ cat ./asciidoc-highlight/gedit/install.sh
#!/bin/sh
SRC=$PWD
mkdir -p ~/.local/share/gtksourceview-3.0/language-specs/
cd ~/.local/share/gtksourceview-3.0/language-specs/
ln -s $SRC/asciidoc.lang
mkdir -p ~/.local/share/gtksourceview-2.0/language-specs/
cd ~/.local/share/gtksourceview-2.0/language-specs/
ln -s $SRC/asciidoc.lang

一旦消してfileをcpしておいた.

$ rm ~/.local/share/gtksourceview-2.0/language-specs/asciidoc.lang ~/.local/share/gtksourceview-3.0/language-specs/asciidoc.lang
$ cp asciidoc-highlight/gedit/asciidoc.lang ~/.local/share/gtksourceview-3.0/language-specs/
$ ln -s ~/.local/share/gtksourceview-3.0/language-specs/asciidoc.lang ~/.local/share/gtksourceview-2.0/language-specs/
$ ls -lA ~/.local/share/gtksourceview-2.0/language-specs/asciidoc.lang                                                 lrwxrwxrwx 1 mk mk 68  7月 16 02:43 /home/mk/.local/share/gtksourceview-2.0/language-specs/asciidoc.lang -> /home/mk/.local/share/gtksourceview-3.0/language-specs/asciidoc.lang
$ ls -lA ~/.local/share/gtksourceview-3.0/language-specs/asciidoc.lang                                                 -rw-rw-r-- 1 mk mk 18731  7月 16 02:43 /home/mk/.local/share/gtksourceview-3.0/language-specs/asciidoc.lang

この後Plumaを起動すると,[表示]→[強調表示モード]→[マークアップ]→[AsciiDoc]が出てくる.
*.adocをopenすると自動的にsyntax highlightが有効になる.新規ファイルの場合*.adocとして保存しても効かない.要手動設定.

環境

$ dpkg-query -W pluma
pluma   1.18.2-0ubuntu1
$ neofetch
            .-/+oossssoo+/-.              mk@x200
        `:+ssssssssssssssssss+:`          -------
      -+ssssssssssssssssssyyssss+-        Model: 74574PJ ThinkPad X200
    .ossssssssssssssssssdMMMNysssso.      OS: Ubuntu Artful Aardvark (development branch) x86_64
   /ssssssssssshdmmNNmmyNMMMMhssssss/     Kernel: 4.11.0-10-generic
  +ssssssssshmydMMMMMMMNddddyssssssss+    Uptime: 3 days, 1 hour, 19 minutes
 /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/   Packages: 4211
.ssssssssdMMMNhsssssssssshNMMMdssssssss.  Shell: bash 4.4.12
+sssshhhyNMMNyssssssssssssyNMMMysssssss+  Resolution: 1280x800
ossyNMMMNyMMhsssssssssssssshmmmhssssssso  WM: awesome
ossyNMMMNyMMhsssssssssssssshmmmhssssssso  Theme: Ambiance [GTK3]
+sssshhhyNMMNyssssssssssssyNMMMysssssss+  Icons: Ubuntu-mono-dark [GTK3]
.ssssssssdMMMNhsssssssssshNMMMdssssssss.  CPU: Intel 2 Duo P8400 (2) @ 2.267GHz
 /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/   GPU: Intel® GM45 Express Chipset
  +sssssssssdmydMMMMMMMMddddyssssssss+    GPU: Intel® GM45 Express Chipset
   /ssssssssssshdmNNNNmyNMMMMhssssss/     Memory: 7239MiB / 7878MiB
    .ossssssssssssssssssdMMMNysssso.
      -+sssssssssssssssssyyyssss+-
        `:+ssssssssssssssssss+:`
            .-/+oossssoo+/-.