mirror of
https://github.com/prabirshrestha/vim-lsp.git
synced 2025-12-14 20:35:59 +01:00
* More secure minimal.vimrc Make minimal.vimrc not execute arbitrary code from Internet or local processes. - Do not skip TLS checks. GitHub should have valid TLS certificate. - Save plug.vim to home directory. /tmp is writeable by all local processes. * miminal.vimrc: Make plug directory home local too
36 lines
1.1 KiB
Plaintext
36 lines
1.1 KiB
Plaintext
" install: curl https://raw.githubusercontent.com/prabirshrestha/vim-lsp/master/minimal.vimrc -o /tmp/minimal.vimrc
|
|
" uninstall: rm /tmp/plug.vim && rm -rf /tmp/plugged
|
|
" run vim/neovim with minimal.vimrc
|
|
" vim -u minimal.vimrc
|
|
" :PlugInstall
|
|
|
|
set nocompatible hidden laststatus=2
|
|
|
|
if !filereadable(expand('~/plug.vim'))
|
|
silent !curl -fLo ~/plug.vim
|
|
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
endif
|
|
|
|
source ~/plug.vim
|
|
|
|
call plug#begin('~/.vim.plugged')
|
|
Plug 'prabirshrestha/asyncomplete.vim'
|
|
Plug 'prabirshrestha/vim-lsp'
|
|
Plug 'prabirshrestha/asyncomplete-lsp.vim'
|
|
call plug#end()
|
|
|
|
imap <c-space> <Plug>(asyncomplete_force_refresh)
|
|
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
|
|
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
|
|
inoremap <expr> <cr> pumvisible() ? "\<C-y>\<cr>" : "\<cr>"
|
|
autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif
|
|
|
|
if executable('pyls')
|
|
" pip install python-language-server
|
|
au User lsp_setup call lsp#register_server({
|
|
\ 'name': 'pyls',
|
|
\ 'cmd': {server_info->['pyls']},
|
|
\ 'allowlist': ['python'],
|
|
\ })
|
|
endif
|