Browse Source

nvim lsp init

VHDL Tool 2 years ago
parent
commit
f2d1f8cc58
1 changed files with 51 additions and 0 deletions
  1. 51 0
      lsp-init.vim

+ 51 - 0
lsp-init.vim

@@ -0,0 +1,51 @@
1
+call plug#begin('~/.config/nvim/plugged')
2
+
3
+Plug 'Lokaltog/vim-distinguished'
4
+Plug 'autozimu/LanguageClient-neovim', { 'do': ':UpdateRemotePlugins' }
5
+"
6
+" (Optional) Multi-entry selection UI.
7
+" Plug 'junegunn/fzf'
8
+" (Optional) Multi-entry selection UI.
9
+Plug 'Shougo/denite.nvim'
10
+
11
+" (Optional) Completion integration with deoplete.
12
+Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
13
+" (Optional) Completion integration with nvim-completion-manager.
14
+"Plug 'roxma/nvim-completion-manager'
15
+
16
+" (Optional) Showing function signature and inline doc.
17
+Plug 'Shougo/echodoc.vim'
18
+
19
+call plug#end()
20
+
21
+" Begin LSP configuration
22
+
23
+" Required for operations modifying multiple buffers like rename.
24
+set hidden
25
+
26
+let g:LanguageClient_serverCommands = {
27
+	\ 'vhdl': ['vhdl-tool', 'lsp']
28
+    \ }
29
+
30
+nnoremap <silent> K :call LanguageClient_textDocument_hover()<CR>
31
+nnoremap <silent> gd :call LanguageClient_textDocument_definition()<CR>
32
+
33
+autocmd BufReadPost *.vhd LanguageClientStart
34
+autocmd BufReadPost *.vhdl LanguageClientStart
35
+
36
+au! CursorHold *.vhd  execute ":call LanguageClient_textDocument_hover()"
37
+au! CursorHold *.vhdl execute ":call LanguageClient_textDocument_hover()"
38
+" End LSP configuration
39
+
40
+" Deoplete configuration
41
+let g:deoplete#enable_at_startup = 1
42
+autocmd CompleteDone * pclose!
43
+" End Deoplete configuration
44
+
45
+"General settings
46
+syntax on        " syntax highlighting
47
+
48
+" Color scheme settings
49
+set background=dark
50
+colorscheme distinguished
51
+