Browse Source

added minimal vimrc to work with the vim-lsp plugin

VHDL Tool 1 year ago
parent
commit
3634c41ecd
1 changed files with 22 additions and 0 deletions
  1. 22 0
      minimal-vim-lsp.vim

+ 22 - 0
minimal-vim-lsp.vim

@@ -0,0 +1,22 @@
1
+call plug#begin('~/.vim/plugged')
2
+
3
+Plug 'Lokaltog/vim-distinguished'
4
+
5
+Plug 'prabirshrestha/async.vim'
6
+Plug 'prabirshrestha/vim-lsp'
7
+
8
+call plug#end()
9
+
10
+syntax on
11
+
12
+if executable('vhdl-tool')
13
+    au User lsp_setup call lsp#register_server({
14
+        \ 'name': 'vhdl-tool',
15
+        \ 'cmd': {server_info->['vhdl-tool', 'lsp']},
16
+        \ 'whitelist': ['vhdl'],
17
+        \ 'root_uri':{server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), 'vhdltool-config.yaml'))},
18
+        \ })
19
+endif
20
+
21
+autocmd FileType vhdl setlocal omnifunc=lsp#complete
22
+