Update configuration to use neovim's internal language server support
This commit is contained in:
parent
b356636de7
commit
6c8524d0e7
|
@ -1,8 +1,7 @@
|
||||||
call plug#begin('~/.config/nvim/plugged')
|
call plug#begin('~/.config/nvim/plugged')
|
||||||
" Language Tools
|
" Language Tools
|
||||||
Plug 'roxma/nvim-yarp' " For language client
|
Plug 'hrsh7th/nvim-compe'
|
||||||
Plug 'ncm2/ncm2' " For language client
|
Plug 'neovim/nvim-lspconfig'
|
||||||
Plug 'autozimu/LanguageClient-neovim', {'branch': '0.1.159', 'do': 'bash install.sh' }
|
|
||||||
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --bin' }
|
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --bin' }
|
||||||
Plug 'junegunn/fzf.vim'
|
Plug 'junegunn/fzf.vim'
|
||||||
Plug 'SirVer/ultisnips'
|
Plug 'SirVer/ultisnips'
|
||||||
|
@ -10,6 +9,7 @@ Plug 'luochen1990/rainbow'
|
||||||
" Plug 'enomsg/vim-haskellConcealPlus' " This one isn't always good.
|
" Plug 'enomsg/vim-haskellConcealPlus' " This one isn't always good.
|
||||||
|
|
||||||
" Languages
|
" Languages
|
||||||
|
Plug 'evanleck/vim-svelte'
|
||||||
Plug 'LnL7/vim-nix'
|
Plug 'LnL7/vim-nix'
|
||||||
Plug 'whonore/Coqtail'
|
Plug 'whonore/Coqtail'
|
||||||
Plug 'wlangstroth/vim-racket'
|
Plug 'wlangstroth/vim-racket'
|
||||||
|
@ -36,8 +36,11 @@ Plug 'junegunn/goyo.vim'
|
||||||
Plug 'iamcco/markdown-preview.vim'
|
Plug 'iamcco/markdown-preview.vim'
|
||||||
Plug 'junegunn/limelight.vim'
|
Plug 'junegunn/limelight.vim'
|
||||||
Plug 'luochen1990/rainbow'
|
Plug 'luochen1990/rainbow'
|
||||||
|
Plug 'simrat39/symbols-outline.nvim'
|
||||||
|
Plug 'folke/todo-comments.nvim'
|
||||||
|
|
||||||
" Misc
|
" Misc
|
||||||
|
Plug 'nvim-lua/plenary.nvim'
|
||||||
Plug 'airblade/vim-gitgutter'
|
Plug 'airblade/vim-gitgutter'
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
|
@ -47,17 +50,14 @@ set expandtab " Expand tabs into spaces
|
||||||
set number " Set line numbers
|
set number " Set line numbers
|
||||||
set mouse=a " Allow mouse
|
set mouse=a " Allow mouse
|
||||||
set signcolumn=yes " Always show extra column
|
set signcolumn=yes " Always show extra column
|
||||||
set guifont=Iosevka " Use Ioeska in frontends.
|
set guifont=Iosevka:h35 " Use Ioeska in frontends.
|
||||||
set hidden
|
set hidden
|
||||||
|
|
||||||
autocmd BufEnter * call ncm2#enable_for_buffer() " Enable ncm2 for all buffers
|
|
||||||
autocmd BufRead,BufNewFile *.v set filetype=coq " Coq is not Verilog
|
autocmd BufRead,BufNewFile *.v set filetype=coq " Coq is not Verilog
|
||||||
autocmd BufNewFile,BufRead *.cir set filetype=spice " LTSpice is Spice
|
autocmd BufNewFile,BufRead *.cir set filetype=spice " LTSpice is Spice
|
||||||
autocmd BufRead,BufNewFile *.dl set filetype=dl " Datalog is Datalog
|
autocmd BufRead,BufNewFile *.dl set filetype=dl " Datalog is Datalog
|
||||||
autocmd FileType crystal setlocal shiftwidth=2 " Crystal likes 2-wide indent
|
autocmd FileType crystal setlocal shiftwidth=2 " Crystal likes 2-wide indent
|
||||||
|
|
||||||
set completeopt=noinsert,menuone
|
|
||||||
|
|
||||||
" Settings for Rainbow
|
" Settings for Rainbow
|
||||||
let g:rainbow_active = 1
|
let g:rainbow_active = 1
|
||||||
|
|
||||||
|
@ -66,9 +66,9 @@ let g:limelight_conceal_ctermfg = 8
|
||||||
|
|
||||||
" Settings for Vim's LaTeX plugin
|
" Settings for Vim's LaTeX plugin
|
||||||
let g:tex_flavor = 'latex'
|
let g:tex_flavor = 'latex'
|
||||||
|
let g:vimtex_quickfix_open_on_warning = 0
|
||||||
" Settings for deoplete
|
let g:vimtex_view_general_viewer = 'okular'
|
||||||
let g:deoplete#enable_at_startup = 1
|
let g:vimtex_view_general_options = '--unique file:@pdf\#src:@line@tex'
|
||||||
|
|
||||||
" Settings for UltiSnips
|
" Settings for UltiSnips
|
||||||
let g:UltiSnipsExpandTrigger="<tab>"
|
let g:UltiSnipsExpandTrigger="<tab>"
|
||||||
|
@ -83,36 +83,30 @@ let g:neovide_cursor_vfx_mode="ripple"
|
||||||
|
|
||||||
colorscheme nord
|
colorscheme nord
|
||||||
|
|
||||||
" Language Client settings
|
lua require('lspconfig').hls.setup{}
|
||||||
let g:LanguageClient_selectionUI = "fzf"
|
lua require('lspconfig').rls.setup{}
|
||||||
let g:LanguageClient_hasSnippetSupport = 0
|
lua require('lspconfig').clangd.setup{}
|
||||||
let g:LanguageClient_serverCommands = {
|
lua require('lspconfig').tsserver.setup{}
|
||||||
\ 'haskell': ['haskell-language-server-wrapper', '--lsp'],
|
lua require('lspconfig').elmls.setup{}
|
||||||
\ 'rust': ['rls'],
|
lua require('lspconfig').pylsp.setup{}
|
||||||
\ 'c': ['clangd'],
|
|
||||||
\ 'crystal': ['/home/vanilla/software/crystalline/crystalline'],
|
|
||||||
\ 'cpp': ['clangd'],
|
|
||||||
\ 'javascript': ['typescript-language-server', '--stdio'],
|
|
||||||
\ 'typescript': ['typescript-language-server', '--stdio'],
|
|
||||||
\ 'elm': ['elm-language-server', '--stdio'],
|
|
||||||
\ 'python': ['python', '-m', 'pyls'],
|
|
||||||
\ 'elixir': ['/home/vanilla/software/elixir-ls/language_server.sh']
|
|
||||||
\ }
|
|
||||||
let g:LanguageClient_diagnosticsDisplay = {
|
|
||||||
\ 1: {"name": "Error","texthl": "ALEError","signText": ">>","signTexthl": "ALEErrorSign",},
|
|
||||||
\ 2: {"name": "Warning","texthl": "ALEWarning","signText": ">>","signTexthl": "ALEWarningSign",},
|
|
||||||
\ 3: {"name": "Information","texthl": "ALEInfo","signText": ">>","signTexthl": "ALEInfoSign",},
|
|
||||||
\ 4: {"name": "Hint","texthl": "ALEInfo","signText": ">>","signTexthl": "ALEInfoSign",},}
|
|
||||||
let g:LanguageClient_rootMarkers = {
|
|
||||||
\ 'haskell': ['.git'],
|
|
||||||
\ 'crystal': ['.git'],
|
|
||||||
\ 'elm': ['elm.json'],
|
|
||||||
\ }
|
|
||||||
|
|
||||||
|
" nmap <silent>K <Plug>(lcn-menu)
|
||||||
|
nmap <silent>M <cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>
|
||||||
|
nmap <silent>? <cmd>lua vim.lsp.buf.hover()<CR>
|
||||||
|
nmap <silent>K <cmd>lua vim.lsp.buf.rename()<CR>
|
||||||
|
|
||||||
|
" Ctrl-e to open file in new tab (or jump to it)
|
||||||
nmap <c-e> :Files<CR>
|
nmap <c-e> :Files<CR>
|
||||||
nmap <silent>K <Plug>(lcn-menu)
|
|
||||||
nmap <silent>M <Plug>(lcn-explain-error)
|
" Autocompletion
|
||||||
nmap <silent>? <Plug>(lcn-hover)
|
set completeopt=menuone,noselect
|
||||||
|
let g:compe = {}
|
||||||
|
let g:compe.enabled = v:true
|
||||||
|
let g:compe.source = {
|
||||||
|
\ 'path': v:true,
|
||||||
|
\ 'buffer': v:true,
|
||||||
|
\ 'nvim_lsp': v:true,
|
||||||
|
\ }
|
||||||
|
|
||||||
" Racket settings
|
" Racket settings
|
||||||
au BufReadPost *.rkt,*.rktl set filetype=racket
|
au BufReadPost *.rkt,*.rktl set filetype=racket
|
||||||
|
@ -124,3 +118,9 @@ function! g:CoqtailHighlight()
|
||||||
hi default link CoqtailChecked Visual
|
hi default link CoqtailChecked Visual
|
||||||
hi default link CoqtailSent PmenuSel
|
hi default link CoqtailSent PmenuSel
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
lua << EOF
|
||||||
|
require("todo-comments").setup {
|
||||||
|
search = { command = "ag", },
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
Loading…
Reference in New Issue
Block a user