mirror of https://github.com/mitchell/dotfiles.git
Replace ALE lsp support with LanguageClient-neovim
This commit is contained in:
parent
b750c3a466
commit
029020324a
111
.vimrc
111
.vimrc
|
@ -14,6 +14,13 @@ Plug 'edkolev/tmuxline.vim'
|
||||||
Plug 'airblade/vim-gitgutter'
|
Plug 'airblade/vim-gitgutter'
|
||||||
Plug 'vimwiki/vimwiki'
|
Plug 'vimwiki/vimwiki'
|
||||||
Plug 'junegunn/goyo.vim'
|
Plug 'junegunn/goyo.vim'
|
||||||
|
Plug 'junegunn/fzf'
|
||||||
|
Plug 'autozimu/LanguageClient-neovim', {
|
||||||
|
\ 'branch': 'next',
|
||||||
|
\ 'do': 'bash install.sh',
|
||||||
|
\ }
|
||||||
|
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
|
||||||
|
|
||||||
|
|
||||||
" Conditionally loaded plugins
|
" Conditionally loaded plugins
|
||||||
Plug 'tpope/vim-fugitive', { 'on': ['G', 'Git'], 'for': 'gitcommit' }
|
Plug 'tpope/vim-fugitive', { 'on': ['G', 'Git'], 'for': 'gitcommit' }
|
||||||
|
@ -21,7 +28,6 @@ Plug 'mileszs/ack.vim', { 'on': 'Ack' }
|
||||||
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
|
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
|
||||||
Plug 'reedes/vim-pencil', { 'on': ['HardPencil', 'SoftPencil'] }
|
Plug 'reedes/vim-pencil', { 'on': ['HardPencil', 'SoftPencil'] }
|
||||||
Plug 'junegunn/limelight.vim', { 'on': 'Limelight' }
|
Plug 'junegunn/limelight.vim', { 'on': 'Limelight' }
|
||||||
Plug 'junegunn/fzf', { 'on': 'FZF' }
|
|
||||||
|
|
||||||
" Language specific plugins
|
" Language specific plugins
|
||||||
Plug 'dart-lang/dart-vim-plugin'
|
Plug 'dart-lang/dart-vim-plugin'
|
||||||
|
@ -35,7 +41,7 @@ Plug 'cespare/vim-toml'
|
||||||
Plug 'OmniSharp/omnisharp-vim'
|
Plug 'OmniSharp/omnisharp-vim'
|
||||||
Plug 'HerringtonDarkholme/yats.vim'
|
Plug 'HerringtonDarkholme/yats.vim'
|
||||||
Plug 'MaxMEllon/vim-jsx-pretty'
|
Plug 'MaxMEllon/vim-jsx-pretty'
|
||||||
Plug 'fsharp/vim-fsharp', { 'do': './make' }
|
Plug 'ionide/Ionide-vim'
|
||||||
Plug 'b4b4r07/vim-hcl'
|
Plug 'b4b4r07/vim-hcl'
|
||||||
Plug 'hashivim/vim-terraform'
|
Plug 'hashivim/vim-terraform'
|
||||||
Plug 'PProvost/vim-ps1'
|
Plug 'PProvost/vim-ps1'
|
||||||
|
@ -64,12 +70,16 @@ let mapleader = 'j'
|
||||||
inoremap <leader>j <Esc>
|
inoremap <leader>j <Esc>
|
||||||
|
|
||||||
let mapleader = ','
|
let mapleader = ','
|
||||||
|
nmap <leader>g <Plug>(lcn-definition)
|
||||||
|
nmap <leader>r <Plug>(lcn-references)
|
||||||
|
nmap <leader>m <Plug>(lcn-menu)
|
||||||
|
nmap <leader>h <Plug>(lcn-hover)
|
||||||
|
nmap <leader>c <Plug>(lcn-code-lens-action)
|
||||||
|
nmap <leader>d <Plug>(lcn-explain-error)
|
||||||
|
nnoremap <leader>ls :LanguageClientStop<cr>
|
||||||
|
nnoremap <leader>ll :LanguageClientStart<cr>
|
||||||
nnoremap <leader>n :NERDTreeToggle<cr>
|
nnoremap <leader>n :NERDTreeToggle<cr>
|
||||||
nnoremap <leader>p :FZF<cr>
|
nnoremap <leader>p :FZF<cr>
|
||||||
nnoremap <leader>g :ALEGoToDefinition<cr>
|
|
||||||
nnoremap <leader>r :ALEFindReferences<cr>
|
|
||||||
nnoremap <leader>d :ALEDetail<cr>
|
|
||||||
nnoremap <leader>h :ALEHover<cr>
|
|
||||||
nnoremap <leader>a :Ack<cr>
|
nnoremap <leader>a :Ack<cr>
|
||||||
nnoremap <leader>we :VimwikiAll2HTML<cr>
|
nnoremap <leader>we :VimwikiAll2HTML<cr>
|
||||||
nnoremap <leader>wz :VimwikiIndex<cr> :Goyo<cr>
|
nnoremap <leader>wz :VimwikiIndex<cr> :Goyo<cr>
|
||||||
|
@ -87,52 +97,63 @@ colorscheme gruvbox
|
||||||
|
|
||||||
highlight Normal ctermbg=None
|
highlight Normal ctermbg=None
|
||||||
|
|
||||||
|
let g:deoplete#enable_at_startup = 1
|
||||||
|
|
||||||
|
let g:LanguageClient_serverCommands = {
|
||||||
|
\ 'javascript': ['typescript-language-server', '--stdio'],
|
||||||
|
\ 'javascript.jsx': ['typescript-language-server', '--stdio'],
|
||||||
|
\ 'typescript': ['typescript-language-server', '--stdio'],
|
||||||
|
\ 'typescript.tsx': ['typescript-language-server', '--stdio'],
|
||||||
|
\ 'elixir': ['~/code/elixir-lsp/elixir-ls/bin/language_server.sh'],
|
||||||
|
\ 'go': ['gopls'],
|
||||||
|
\ 'fsharp': ['dotnet', '~/code/fsprojects/fsharp-language-server/bin/FSharpLanguageServer.dll'],
|
||||||
|
\ }
|
||||||
|
|
||||||
|
|
||||||
let g:ackprg = 'ag --nogroup --nocolor --column'
|
let g:ackprg = 'ag --nogroup --nocolor --column'
|
||||||
|
|
||||||
let g:lightline = {
|
let g:lightline = {
|
||||||
\ 'colorscheme': 'gruvbox',
|
\ 'colorscheme': 'gruvbox',
|
||||||
\}
|
\ }
|
||||||
|
|
||||||
let g:ale_linters = {
|
let g:ale_linters = {
|
||||||
\ 'javascript': ['tsserver', 'eslint', 'stylelint'],
|
\ 'javascript': ['eslint', 'stylelint'],
|
||||||
\ 'go': ['golint', 'go vet', 'gopls'],
|
\ 'go': ['golint', 'go vet'],
|
||||||
\ 'typescript': ['eslint', 'tsserver', 'stylelint'],
|
\ 'typescript': ['eslint', 'stylelint'],
|
||||||
\ 'make': ['checkmake'],
|
\ 'make': ['checkmake'],
|
||||||
\ 'proto': ['protoc-gen-lint'],
|
\ 'proto': ['protoc-gen-lint'],
|
||||||
\ 'dockerfile': ['hadolint'],
|
\ 'dockerfile': ['hadolint'],
|
||||||
\ 'dart': ['language_server', 'dartanalyzer'],
|
\ 'dart': ['dartanalyzer'],
|
||||||
\ 'fish': ['fish'],
|
\ 'fish': ['fish'],
|
||||||
\ 'vim': ['vint'],
|
\ 'vim': ['vint'],
|
||||||
\ 'elixir': ['credo', 'elixir-ls'],
|
\ 'elixir': ['credo'],
|
||||||
\ 'cs': ['OmniSharp'],
|
\ 'cs': ['OmniSharp'],
|
||||||
\ 'terraform': ['terraform', 'tflint'],
|
\ 'terraform': ['tflint'],
|
||||||
\ 'ruby': ['rubocop', 'solargraph'],
|
\ 'ruby': ['rubocop'],
|
||||||
\ 'css': ['stylelint'],
|
\ 'css': ['stylelint'],
|
||||||
\ 'sh': ['shellcheck'],
|
\ 'sh': ['shellcheck'],
|
||||||
\}
|
\ }
|
||||||
|
|
||||||
|
|
||||||
let g:ale_fixers = {
|
let g:ale_fixers = {
|
||||||
\ 'go': ['goimports', 'remove_trailing_lines', 'trim_whitespace'],
|
\ 'go': ['goimports', 'remove_trailing_lines', 'trim_whitespace'],
|
||||||
\ 'graphql': ['prettier'],
|
\ 'graphql': ['prettier'],
|
||||||
\ 'javascript': ['eslint', 'prettier'],
|
\ 'javascript': ['eslint', 'prettier'],
|
||||||
\ 'typescript': ['eslint', 'prettier'],
|
\ 'typescript': ['eslint', 'prettier'],
|
||||||
\ 'css': ['prettier', 'stylelint'],
|
\ 'css': ['prettier', 'stylelint'],
|
||||||
\ 'yaml': ['prettier'],
|
\ 'yaml': ['prettier'],
|
||||||
\ 'json': ['prettier'],
|
\ 'json': ['prettier'],
|
||||||
\ 'dart': ['dartfmt'],
|
\ 'dart': ['dartfmt'],
|
||||||
\ 'html': ['prettier'],
|
\ 'html': ['prettier'],
|
||||||
\ 'make': ['remove_trailing_lines', 'trim_whitespace'],
|
\ 'make': ['remove_trailing_lines', 'trim_whitespace'],
|
||||||
\ 'elixir': ['mix_format'],
|
\ 'elixir': ['mix_format'],
|
||||||
\ 'terraform': ['terraform'],
|
\ 'terraform': ['terraform'],
|
||||||
\ 'ruby': ['rubocop'],
|
\ 'ruby': ['rubocop'],
|
||||||
\}
|
\ }
|
||||||
|
|
||||||
let g:ale_fix_on_save = 1
|
let g:ale_fix_on_save = 1
|
||||||
let g:ale_linters_explicit = 1
|
let g:ale_linters_explicit = 1
|
||||||
let g:ale_completion_enabled = 1
|
let g:ale_completion_enabled = 0
|
||||||
let g:ale_completion_delay = 100
|
|
||||||
let g:ale_elixir_elixir_ls_release = expand('~/code/elixir-lsp/elixir-ls/bin/')
|
|
||||||
|
|
||||||
let g:OmniSharp_server_stdio = 1
|
let g:OmniSharp_server_stdio = 1
|
||||||
|
|
||||||
|
@ -156,6 +177,14 @@ augroup ft_fish
|
||||||
autocmd FileType fish set tabstop=4
|
autocmd FileType fish set tabstop=4
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
|
augroup ft_cs
|
||||||
|
au!
|
||||||
|
autocmd FileType cs nmap <leader>g <Plug>(omnisharp_go_to_definition)
|
||||||
|
autocmd FileType cs nmap <leader>r <Plug>(omnisharp_find_usages)
|
||||||
|
autocmd FileType cs nmap <leader>h <Plug>(omnisharp_preview_definition)
|
||||||
|
autocmd FileType cs nmap <leader>c <Plug>(omnisharp_code_actions)
|
||||||
|
augroup END
|
||||||
|
|
||||||
if exists('$TMUX')
|
if exists('$TMUX')
|
||||||
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\"
|
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\"
|
||||||
let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\"
|
let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\"
|
||||||
|
|
Loading…
Reference in New Issue