Browse Source

Initial Syntastic interface

VHDL Tool 5 years ago
commit
bd70a94917
2 changed files with 40 additions and 0 deletions
  1. 10 0
      README.md
  2. 30 0
      syntax_checkers/vhdl/vhdl-tool.vim

+ 10 - 0
README.md

@@ -0,0 +1,10 @@
1
+# Syntastic-VHDL-Tool
2
+
3
+Syntastic interface to vhdl-tool
4
+
5
+# Installation
6
+
7
+With [Vim-Plug](https://github.com/junegunn/vim-plug), add the following line to your vimrc:
8
+
9
+Plug 'http://git.vhdltool.com/vhdl-tool/syntastic-vhdl-tool.git'
10
+

+ 30 - 0
syntax_checkers/vhdl/vhdl-tool.vim

@@ -0,0 +1,30 @@
1
+" Begin syntastic vhdl config
2
+
3
+if exists('g:loaded_syntastic_vhdl_tool_checker')
4
+    finish
5
+endif
6
+let g:loaded_syntastic_vhdl_tool_checker = 1
7
+
8
+let s:save_cpo = &cpo
9
+set cpo&vim
10
+
11
+"function! SyntaxCheckers_vhdl_tool_IsAvailable() dict
12
+"    return executable(self.getExec())
13
+"endfunction
14
+
15
+function! SyntaxCheckers_vhdl_vhdltool_GetLocList() dict
16
+    let makeprg = self.makeprgBuild({ 'args': 'client lint --compact'})
17
+
18
+    let errorformat = '%f:%l:%c:%t:%m'
19
+
20
+    return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat})
21
+endfunction
22
+
23
+call g:SyntasticRegistry.CreateAndRegisterChecker({
24
+            \ 'filetype': 'vhdl',
25
+            \ 'name': 'vhdltool',
26
+            \ 'exec': 'vhdl-tool' })
27
+
28
+let &cpo = s:save_cpo
29
+unlet s:save_cpo
30
+