nvim: init.vim: Add Scala LSP support using metals
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
parent
198e20a898
commit
38fd4dbec1
1 changed files with 10 additions and 2 deletions
|
@ -57,6 +57,8 @@ Plug 'zchee/deoplete-jedi'
|
||||||
" Autocomplete for Rust
|
" Autocomplete for Rust
|
||||||
Plug 'sebastianmarkow/deoplete-rust'
|
Plug 'sebastianmarkow/deoplete-rust'
|
||||||
Plug 'rust-lang/rust.vim'
|
Plug 'rust-lang/rust.vim'
|
||||||
|
" For Scala
|
||||||
|
Plug 'derekwyatt/vim-scala'
|
||||||
" Miscellaneous
|
" Miscellaneous
|
||||||
Plug 'tpope/vim-surround'
|
Plug 'tpope/vim-surround'
|
||||||
Plug 'editorconfig/editorconfig-vim'
|
Plug 'editorconfig/editorconfig-vim'
|
||||||
|
@ -183,8 +185,11 @@ let g:echodoc#type = 'signature'
|
||||||
|
|
||||||
let g:LanguageClient_autoStart = 0
|
let g:LanguageClient_autoStart = 0
|
||||||
let g:LanguageClient_loggingFile = expand('$HOME/LC.log')
|
let g:LanguageClient_loggingFile = expand('$HOME/LC.log')
|
||||||
let g:LanguageClient_rootMarkers = ['stack.yaml']
|
let g:LanguageClient_rootMarkers = ['stack.yaml', 'build.sbt']
|
||||||
let g:LanguageClient_serverCommands = { 'haskell': ['$HOME/.local/bin/hie-wrapper'] }
|
let g:LanguageClient_serverCommands = {
|
||||||
|
\ 'haskell': ['$HOME/.local/bin/hie-wrapper'],
|
||||||
|
\ 'scala': ['metals-vim'],
|
||||||
|
\ }
|
||||||
|
|
||||||
nnoremap <leader>ld :call LanguageClient#textDocument_definition()<CR>
|
nnoremap <leader>ld :call LanguageClient#textDocument_definition()<CR>
|
||||||
nnoremap <leader>lr :call LanguageClient#textDocument_rename()<CR>
|
nnoremap <leader>lr :call LanguageClient#textDocument_rename()<CR>
|
||||||
|
@ -295,3 +300,6 @@ let g:loaded_gentags#ctags = 1
|
||||||
|
|
||||||
" Let vim-gitgutter do its thing on large files
|
" Let vim-gitgutter do its thing on large files
|
||||||
let g:gitgutter_max_signs=10000
|
let g:gitgutter_max_signs=10000
|
||||||
|
|
||||||
|
" For vim-scala
|
||||||
|
au BufRead,BufNewFile *.sbt set filetype=scala
|
||||||
|
|
Loading…
Reference in a new issue