summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-09-10 14:49:00 -0400
committerJune McEnroe <june@causal.agency>2018-09-10 14:49:00 -0400
commit5ca08433216edae5e160a3764d2200d565fcd565 (patch)
tree1f0f2cf5d78b0a11abc1da1a63c7ff46211708c7
parentFix Nm usage in multi-name man pages (diff)
downloadsrc-5ca08433216edae5e160a3764d2200d565fcd565.tar.gz
src-5ca08433216edae5e160a3764d2200d565fcd565.zip
Add mdoc syntax file
-rw-r--r--home/.config/nvim/ftdetect/mdoc.vim1
-rw-r--r--home/.config/nvim/syntax/mdoc.vim12
2 files changed, 13 insertions, 0 deletions
diff --git a/home/.config/nvim/ftdetect/mdoc.vim b/home/.config/nvim/ftdetect/mdoc.vim
new file mode 100644
index 00000000..b845fee6
--- /dev/null
+++ b/home/.config/nvim/ftdetect/mdoc.vim
@@ -0,0 +1 @@
+autocmd BufRead,BufNewFile *.[1-9] set filetype=mdoc
diff --git a/home/.config/nvim/syntax/mdoc.vim b/home/.config/nvim/syntax/mdoc.vim
new file mode 100644
index 00000000..d9d587f5
--- /dev/null
+++ b/home/.config/nvim/syntax/mdoc.vim
@@ -0,0 +1,12 @@
+if exists("b:current_syntax")
+	finish
+endif
+
+runtime! syntax/nroff.vim
+unlet! b:current_syntax
+
+setlocal sections+=ShSs
+syntax match mdocBlank /^\.$/ conceal
+setlocal conceallevel=2
+
+let b:current_syntax = "mdoc"