file detection

This commit is contained in:
Vanessa McHale 2017-10-02 22:05:17 -05:00
parent ce57d02c88
commit cf412ea04e
5 changed files with 26 additions and 23 deletions

11
LICENSE Normal file
View File

@ -0,0 +1,11 @@
Copyright Vanessa McHale (c) 2017
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

5
README
View File

@ -1,5 +0,0 @@
This is a mirror of http://www.vim.org/scripts/script.php?script_id=2693
A (rather incomplete) syntax highlighting for ATS (see http://www.ats-lang.org)
Future improvements are planned.

9
README.md Normal file
View File

@ -0,0 +1,9 @@
# ats-vim
This provides detection and syntax highlighting for ATS programs.
## Installation
```vim
Plug 'vmchale/ats-vim'
```

1
ftdetect/ats.vim Normal file
View File

@ -0,0 +1 @@
autocmd BufNewFile,BufRead *.ats,*.dats*,*.cats,*.hats set filetype=ats

View File

@ -1,21 +1,3 @@
" Vim syntax file
" Language: ATS
" Filenames: *.dats *.sats *.cats *.hats
" Maintainer: Artyom Shalkhakov <artyom.shalkhakov@gmail.com>
" Last Change: Jun 27, 2009
" Version: 1
" URL: http://artyoms.idhost.kz
"
" Huge thanks to maintainers of c.vim, haskell.vim, d.vim,
" html.vim.
"
" TODO:
" - make assignment of syntax groups more specific
" (see sml.vim for let/local/begin/etc.)
" - highlight viewt@ype, etc. as keywords
" - report errors on mismatching braces/parens/brackets
" - highlight @ as a StorageClass?
if !exists("main_syntax")
if version < 600
syntax clear
@ -25,6 +7,8 @@ if !exists("main_syntax")
let main_syntax = 'ats'
endif
syn region atsIncludes start='#include' end='\v$'
"
" lexical
"
@ -125,6 +109,9 @@ syn region atsPreProc matchgroup=atsPreCondit start="^\s*\(%:\|#\)\s*\(pragma\>
" don't use standard HiLink, it won't work with included syntax files
command! -nargs=+ AtsHiLink hi def link <args>
" includes
AtsHiLink atsIncludes Special
" comments
AtsHiLink atsCommentStart atsComment
AtsHiLink atsNestedComment Comment