VHDL Tool 3 years ago
commit
eac3e1ee8c
3 changed files with 234 additions and 0 deletions
  1. 39 0
      emacs
  2. 124 0
      init.vim
  3. 71 0
      minimal-init.vim

+ 39 - 0
emacs

@@ -0,0 +1,39 @@
1
+(require 'package) 
2
+(add-to-list 'package-archives
3
+             '("melpa" . "https://melpa.org/packages/"))
4
+(when (< emacs-major-version 24)
5
+  ;; For important compatibility libraries like cl-lib
6
+  (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
7
+(package-initialize) 
8
+
9
+(custom-set-variables
10
+ ;; custom-set-variables was added by Custom.
11
+ ;; If you edit it by hand, you could mess it up, so be careful.
12
+ ;; Your init file should contain only one such instance.
13
+ ;; If there is more than one, they won't work right.
14
+ '(inhibit-startup-screen t)
15
+ '(package-selected-packages (quote (flycheck use-package))))
16
+(custom-set-faces
17
+ ;; custom-set-faces was added by Custom.
18
+ ;; If you edit it by hand, you could mess it up, so be careful.
19
+ ;; Your init file should contain only one such instance.
20
+ ;; If there is more than one, they won't work right.
21
+ )
22
+
23
+(use-package flycheck
24
+  :ensure t
25
+  :init (global-flycheck-mode))
26
+
27
+(flycheck-define-checker vhdl-tool
28
+  "A VHDL syntax checker, type checker and linter using VHDL-Tool.
29
+
30
+See URL `http://vhdltool.com'."
31
+  :command ("vhdl-tool" "client" "lint" "--compact" "--stdin" "-f" source
32
+            )
33
+  :standard-input t
34
+  :error-patterns
35
+  ((warning line-start (file-name) ":" line ":" column ":w:" (message) line-end)
36
+   (error line-start (file-name) ":" line ":" column ":e:" (message) line-end))
37
+  :modes (vhdl-mode))
38
+  
39
+(add-to-list 'flycheck-checkers 'vhdl-tool)

+ 124 - 0
init.vim

@@ -0,0 +1,124 @@
1
+call plug#begin('~/.config/nvim/plugged')
2
+
3
+Plug 'bufkill.vim'            " dont close the window when killing a buffer
4
+Plug 'airblade/vim-gitgutter' " display modified lines
5
+Plug 'kien/ctrlp.vim'         " ctrl-p opens a fuzzy file opener
6
+"Plug 'scrooloose/syntastic'   " syntax checking
7
+Plug 'neomake/neomake'     
8
+Plug 'sjl/gundo.vim'          " graphical undo tree
9
+Plug 'bling/vim-airline'      " fancy status line
10
+Plug 'Lokaltog/vim-distinguished'
11
+Plug 'majutsushi/tagbar'
12
+Plug 'scrooloose/nerdtree'
13
+Plug 'wellle/targets.vim'
14
+"Plug 'http://git.vhdltool.com/vhdl-tool/syntastic-vhdl-tool.git'
15
+Plug 'SirVer/ultisnips'
16
+Plug 'honza/vim-snippets'
17
+Plug 'junegunn/vim-easy-align'
18
+Plug 'Yggdroot/indentLine'
19
+Plug 'tpope/vim-fugitive'
20
+
21
+call plug#end()
22
+
23
+syntax on        " syntax highlighting
24
+map ; :
25
+
26
+set backspace=2  " nvim, by default, doesn't backspace over lines, fix this
27
+set tabstop=4    " a tab is 4 columns
28
+set shiftwidth=4 " the number of spaces inserted for TAB
29
+set expandtab    " convert tabs to spaces
30
+set number       " line numbers
31
+set incsearch    " incremental search
32
+set ignorecase   " ignore case when searching (see smartcase)
33
+set smartcase    " do not ignore case if pattern has mixed case (see ignorecase)
34
+set hid          " do not ask to save the current buffer when opening/switching to another buffer
35
+set scrolloff=3  " show at least 3 lines either side of the cursor
36
+set laststatus=2 " display a status line
37
+
38
+"CtrlP configuration
39
+let g:ctrlp_map = '<c-p>'
40
+let g:ctrlp_cmd = 'CtrlPMixed'
41
+nnoremap <c-b> :CtrlPBuffer<CR>
42
+
43
+"recommended Gundo configuration
44
+nnoremap <F5> :GundoToggle<CR>
45
+
46
+" Airline
47
+let g:airline#extensions#tabline#enabled=1
48
+
49
+" Color scheme settings
50
+set background=dark
51
+colorscheme distinguished
52
+
53
+let g:tagbar_type_vhdl = {
54
+    \ 'ctagsbin': 'vhdl-tool',
55
+    \ 'ctagsargs': 'ctags -o -',
56
+    \ 'ctagstype': 'vhdl',
57
+    \ 'kinds' : [
58
+        \'d:prototypes',
59
+        \'b:package bodies',
60
+        \'e:entities',
61
+        \'a:architectures',
62
+        \'t:types',
63
+        \'p:processes',
64
+        \'f:functions',
65
+        \'r:procedures',
66
+        \'c:constants',
67
+        \'T:subtypes',
68
+        \'r:records',
69
+        \'C:components',
70
+        \'P:packages',
71
+        \'l:locals',
72
+        \'i:instantiations',
73
+        \'s:signals',
74
+        \'v:variables:1:0'
75
+    \ ],
76
+    \ 'sro' : '::',
77
+    \ 'kind2scope' : {
78
+         \ 'a' : 'architecture',
79
+         \ 'b' : 'packagebody',
80
+         \ 'P' : 'package',
81
+         \ 'p' : 'process'
82
+    \ },
83
+    \ 'scope2kinds' : {
84
+         \ 'architecture' : 'a',
85
+         \ 'packagebody'  : 'b',
86
+         \ 'package'      : 'P',
87
+         \ 'process'      : 'p'
88
+    \ }
89
+\}
90
+
91
+" Recommended syntastic configuration
92
+"set statusline+=%#warningmsg#
93
+"set statusline+=%{SyntasticStatuslineFlag()}
94
+"set statusline+=%*
95
+
96
+"let g:syntastic_always_populate_loc_list = 1
97
+"let g:syntastic_auto_loc_list = 1
98
+"let g:syntastic_check_on_open = 1
99
+"let g:syntastic_check_on_wq = 0
100
+"
101
+"let g:syntastic_vhdl_checkers = ['vhdltool']
102
+
103
+set cscopequickfix=s+,c+,d+,i+,t+,e+
104
+
105
+let g:neomake_open_list = 2
106
+autocmd! BufWritePost,BufRead * Neomake
107
+let g:neomake_vhdl_vhdltool_maker = {
108
+	\ 'exe': 'vhdl-tool',
109
+	\ 'args': ['client', 'lint'],
110
+	\ 'errorformat': '%f:%l:%c:%t:%m',
111
+	\ }
112
+let g:neomake_vhdl_enabled_makers = ['vhdltool']
113
+
114
+hi search ctermbg=LightBlue
115
+
116
+" Start interactive EasyAlign in visual mode (e.g. vipga)
117
+xmap ga <Plug>(EasyAlign)
118
+" Start interactive EasyAlign for a motion/text object (e.g. gaip)
119
+nmap ga <Plug>(EasyAlign)
120
+
121
+let g:easy_align_delimiters = {
122
+\ ':': { 'pattern': ':', 'left_margin': 1, 'right_margin': 1, 'stick_to_left': 0 },
123
+\ }
124
+

+ 71 - 0
minimal-init.vim

@@ -0,0 +1,71 @@
1
+call plug#begin('~/.config/nvim/plugged')
2
+
3
+"Plug 'scrooloose/syntastic'   " syntax checking
4
+Plug 'neomake/neomake'     
5
+Plug 'majutsushi/tagbar'
6
+"Plug 'http://git.vhdltool.com/vhdl-tool/syntastic-vhdl-tool.git'
7
+
8
+call plug#end()
9
+
10
+syntax on        " syntax highlighting
11
+
12
+" Color scheme settings
13
+let g:tagbar_type_vhdl = {
14
+    \ 'ctagsbin': 'vhdl-tool',
15
+    \ 'ctagsargs': 'ctags -o -',
16
+    \ 'ctagstype': 'vhdl',
17
+    \ 'kinds' : [
18
+        \'d:prototypes',
19
+        \'b:package bodies',
20
+        \'e:entities',
21
+        \'a:architectures',
22
+        \'t:types',
23
+        \'p:processes',
24
+        \'f:functions',
25
+        \'r:procedures',
26
+        \'c:constants',
27
+        \'T:subtypes',
28
+        \'r:records',
29
+        \'C:components',
30
+        \'P:packages',
31
+        \'l:locals',
32
+        \'i:instantiations',
33
+        \'s:signals',
34
+        \'v:variables:1:0'
35
+    \ ],
36
+    \ 'sro' : '::',
37
+    \ 'kind2scope' : {
38
+         \ 'a' : 'architecture',
39
+         \ 'b' : 'packagebody',
40
+         \ 'P' : 'package',
41
+         \ 'p' : 'process'
42
+    \ },
43
+    \ 'scope2kinds' : {
44
+         \ 'architecture' : 'a',
45
+         \ 'packagebody'  : 'b',
46
+         \ 'package'      : 'P',
47
+         \ 'process'      : 'p'
48
+    \ }
49
+\}
50
+
51
+" Recommended syntastic configuration
52
+"set statusline+=%#warningmsg#
53
+"set statusline+=%{SyntasticStatuslineFlag()}
54
+"set statusline+=%*
55
+
56
+"let g:syntastic_always_populate_loc_list = 1
57
+"let g:syntastic_auto_loc_list = 1
58
+"let g:syntastic_check_on_open = 1
59
+"let g:syntastic_check_on_wq = 0
60
+"
61
+"let g:syntastic_vhdl_checkers = ['vhdltool']
62
+
63
+let g:neomake_open_list = 2
64
+autocmd! BufWritePost,BufRead * Neomake
65
+let g:neomake_vhdl_vhdltool_maker = {
66
+	\ 'exe': 'vhdl-tool',
67
+	\ 'args': ['client', 'lint'],
68
+	\ 'errorformat': '%f:%l:%c:%t:%m',
69
+	\ }
70
+let g:neomake_vhdl_enabled_makers = ['vhdltool']
71
+