Skip to content

Server is Very Slow to Load #876

@buggedbeatle998

Description

@buggedbeatle998

The server consistently takes ~17s to load regardless of the file size.

Image

vimrc:

set encoding=utf-8
set number
set relativenumber
set nowrap
set colorcolumn=101
set expandtab
set tabstop=4
set shiftwidth=4
set cindent
set clipboard="unnamedplus"
set scrolloff=999
set sidescrolloff=10
set virtualedit="block"
set termguicolors

set updatetime=300
set signcolumn=yes
hi SignColumn guibg=NONE
hi CocFloating guibg=#303340
hi CocMenuSel guibg=#424557

syntax enable

let mapleader=' '
vnoremap Y :w !xclip -i -sel c<CR><CR>

function! Surr()
    let chars = strpart(getline('.'), col('.')-2, 2, 1)
    return chars == "()" || chars == "[]" || chars == "{}"
endfunction

inoremap <nowait><silent><expr> <Enter> Surr() ? '<Enter><Enter><Up><Tab>' : '<Enter>'
inoremap <silent> ( ()<Left>
inoremap <silent> [ []<Left>
inoremap <silent> { {}<Left>
inoremap <silent> " ""<Left>
inoremap <silent> ' ''<Left>

call plug#begin()
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'OmniSharp/omnisharp-vim'
Plug 'dense-analysis/ale'
call plug#end()

" ...
" Use tab for trigger completion with characters ahead and navigate
" NOTE: There's always complete item selected by default, you may want to enable
" no select by `"suggest.noselect": true` in your configuration file
" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
" other plugin before putting this into your config
inoremap <silent><expr> <TAB>
      \ coc#pum#visible() ? coc#pum#next(1) :
      \ CheckBackspace() ? "\<Tab>" :
      \ coc#refresh()
inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"

inoremap <expr> <Up> pumvisible() ? "\<C-y>\<Up>" : "\<Up>"
inoremap <expr> <Down> pumvisible() ? "\<C-y>\<Down>" : "\<Down>"

" Make <CR> to accept selected completion item or notify coc.nvim to format
" <C-g>u breaks current undo, please make your own choice
function! CheckBackspace() abort
  let col = col('.') - 1
  return !col || getline('.')[col - 1]  =~# '\s'
endfunction

" Use <c-space> to trigger completion
inoremap <silent><expr> <c-@> coc#refresh()
" ...
" GoTo code navigation
nmap <silent> gd <Plug>(coc-definition)
" ...
" Symbol renaming
nmap <leader>rn <Plug>(coc-rename)

" Unity
let g:OmniSharp_server_use_mono = 1
let g:ale_linters = { 'cs': ['OmniSharp'] }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions