From 2be37d4c4b06568e42addd2685055184249fc26a Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Sun, 30 Jan 2022 01:18:46 +0100 Subject: [PATCH] [nvim] Add syntax/ftdetect for dream files --- nvim/ftdetect/dotfiles.vim | 2 ++ nvim/syntax/dream.vim | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 nvim/syntax/dream.vim diff --git a/nvim/ftdetect/dotfiles.vim b/nvim/ftdetect/dotfiles.vim index ff8ab5e..ff733e1 100644 --- a/nvim/ftdetect/dotfiles.vim +++ b/nvim/ftdetect/dotfiles.vim @@ -4,4 +4,6 @@ endfunction augroup dotfilesftdetect autocmd BufWritePost PKGBUILD :call s:genSrcInfo() + + autocmd BufNewFile,BufRead *.dream setf dream augroup END diff --git a/nvim/syntax/dream.vim b/nvim/syntax/dream.vim new file mode 100644 index 0000000..7b3b374 --- /dev/null +++ b/nvim/syntax/dream.vim @@ -0,0 +1,10 @@ +" Syntax highlighting for .dream files. +syntax match dreamGrime '\v\d' +syntax match dreamComments '\v^\^(.*)$' +syntax match dreamCommands '\v^\^ (tags|title|secret|align|curtains|grimes|colour) \^ (.*) \^$' +syntax match dreamIllegal '\v^\^ (justify|color) \^ (.*) \^$' + +hi def link dreamGrime Identifier +hi def link dreamComments Comment +hi def link dreamCommands Statement +hi def link dreamIllegal Error