Increase support for less capable installs
This commit is contained in:
1 file changed
+95
-62
@@ -2,62 +2,20 @@ set nocompatible " be iMproved, required
|
|||||||
filetype off " required
|
filetype off " required
|
||||||
let mapleader = ";"
|
let mapleader = ";"
|
||||||
let install = 0
|
let install = 0
|
||||||
|
let libs_avail = 1
|
||||||
|
|
||||||
if empty(glob("~/.vim/autoload/plug.vim"))
|
let required_exes = ["git", "curl", "wget"]
|
||||||
silent execute '!mkdir -p ~/.vim/autoload'
|
|
||||||
silent execute '!mkdir -p ~/.vim/undodir'
|
for required_exe in required_exes
|
||||||
silent execute '!mkdir -p ~/.vim/swapdir'
|
if executable(required_exe) == 0
|
||||||
silent execute '!curl -fLo ~/.vim/autoload/plug.vim https://raw.github.com/junegunn/vim-plug/master/plug.vim'
|
echow("Failed to find " + required_exe)
|
||||||
let install = 1
|
let libs_avail = 0
|
||||||
endif
|
endif
|
||||||
|
endfor
|
||||||
|
|
||||||
call plug#begin()
|
" ===========================
|
||||||
|
" PLUGIN SUPPORT NOT REQUIRED
|
||||||
Plug 'tpope/vim-fugitive'
|
" ===========================
|
||||||
Plug 'puremourning/vimspector'
|
|
||||||
Plug 'vim-scripts/DrawIt'
|
|
||||||
Plug 'Bercio/vim-inkscape-insert'
|
|
||||||
Plug 'rstacruz/sparkup', {'rtp': 'vim/'}
|
|
||||||
|
|
||||||
Plug 'vim-pandoc/vim-pandoc'
|
|
||||||
Plug 'vim-pandoc/vim-pandoc-syntax'
|
|
||||||
|
|
||||||
Plug 'MarcWeber/vim-addon-mw-utils'
|
|
||||||
Plug 'tomtom/tlib_vim'
|
|
||||||
Plug 'cespare/vim-toml'
|
|
||||||
Plug 'SirVer/ultisnips'
|
|
||||||
Plug 'honza/vim-snippets'
|
|
||||||
|
|
||||||
Plug 'mhartington/oceanic-next'
|
|
||||||
|
|
||||||
Plug 'preservim/nerdtree'
|
|
||||||
|
|
||||||
Plug 'farmergreg/vim-lastplace'
|
|
||||||
|
|
||||||
Plug 'sk1418/HowMuch'
|
|
||||||
|
|
||||||
Plug 'godlygeek/tabular'
|
|
||||||
Plug 'vim-crystal/vim-crystal'
|
|
||||||
Plug 'stephpy/vim-yaml'
|
|
||||||
Plug 'MaxMEllon/vim-jsx-pretty'
|
|
||||||
Plug 'arrufat/vala.vim'
|
|
||||||
Plug 'chaimleib/vim-renpy'
|
|
||||||
Plug 'vhda/verilog_systemverilog.vim'
|
|
||||||
Plug 'gregkh/kernel-coding-style'
|
|
||||||
|
|
||||||
Plug 'dense-analysis/ale'
|
|
||||||
Plug 'PenguinOwl/lsp'
|
|
||||||
Plug 'editorconfig/editorconfig-vim'
|
|
||||||
|
|
||||||
Plug '907th/vim-auto-save'
|
|
||||||
|
|
||||||
call plug#end() " required
|
|
||||||
|
|
||||||
if install
|
|
||||||
set number
|
|
||||||
PlugInstall
|
|
||||||
q
|
|
||||||
endif
|
|
||||||
|
|
||||||
filetype plugin indent on " required
|
filetype plugin indent on " required
|
||||||
|
|
||||||
@@ -99,20 +57,20 @@ endif
|
|||||||
|
|
||||||
" Theme
|
" Theme
|
||||||
syntax enable
|
syntax enable
|
||||||
colorscheme OceanicNext
|
|
||||||
let g:airine_theme='oceanicnext'
|
|
||||||
let g:airline_powerline_fonts = 1
|
|
||||||
autocmd FileType help setlocal nospell
|
autocmd FileType help setlocal nospell
|
||||||
|
|
||||||
set laststatus=2
|
set laststatus=2
|
||||||
set statusline=%m\ %F\ %y\ %{&fileencoding?&fileencoding:&encoding}\ %=%(C:%c\ L:%l\ %P%)
|
set statusline=%m\ %F\ %y\ %{&fileencoding?&fileencoding:&encoding}\ %=%(C:%c\ L:%l\ %P%)
|
||||||
|
|
||||||
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree")
|
|
||||||
\ && b:NERDTree.isTabTree()) | q | endif
|
|
||||||
autocmd FileType gitcommit setlocal spell
|
|
||||||
|
|
||||||
set viminfo='20,<1000,s1000
|
set viminfo='20,<1000,s1000
|
||||||
|
|
||||||
|
autocmd FileType gitcommit setlocal spell
|
||||||
|
|
||||||
|
set bg=dark
|
||||||
|
|
||||||
|
" Default colorscheme
|
||||||
|
colorscheme slate
|
||||||
|
|
||||||
|
function SetHighlights()
|
||||||
hi CursorLineNr term=bold cterm=bold ctermfg=012 gui=bold
|
hi CursorLineNr term=bold cterm=bold ctermfg=012 gui=bold
|
||||||
hi EndOfBuffer ctermfg=bg guifg=#404950
|
hi EndOfBuffer ctermfg=bg guifg=#404950
|
||||||
hi ALEError ctermbg=DarkRed
|
hi ALEError ctermbg=DarkRed
|
||||||
@@ -128,6 +86,9 @@ hi! def link DiffAdded DiffAdd
|
|||||||
hi! def link DiffRemoved DiffDelete
|
hi! def link DiffRemoved DiffDelete
|
||||||
hi! def link ALEError SpellBad
|
hi! def link ALEError SpellBad
|
||||||
hi! def link ALEWarning SpellCap
|
hi! def link ALEWarning SpellCap
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
call SetHighlights()
|
||||||
|
|
||||||
inoremap <expr> <TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
|
inoremap <expr> <TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
|
||||||
inoremap <expr> <S-TAB> pumvisible() ? "\<C-p>" : "\<TAB>"
|
inoremap <expr> <S-TAB> pumvisible() ? "\<C-p>" : "\<TAB>"
|
||||||
@@ -273,10 +234,82 @@ for config in lsp_configs
|
|||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
|
" ==================================
|
||||||
|
" PLUGIN SUPPORT REQUIRED AFTER THIS
|
||||||
|
" ==================================
|
||||||
|
|
||||||
|
if libs_avail == 0
|
||||||
|
echow("Install the above dependencies to access the rest of this .vimrc's features")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
if empty(glob("~/.vim/autoload/plug.vim"))
|
||||||
|
silent execute '!mkdir -p ~/.vim/autoload'
|
||||||
|
silent execute '!mkdir -p ~/.vim/undodir'
|
||||||
|
silent execute '!mkdir -p ~/.vim/swapdir'
|
||||||
|
silent execute '!curl -fLo ~/.vim/autoload/plug.vim https://raw.github.com/junegunn/vim-plug/master/plug.vim'
|
||||||
|
let install = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
call plug#begin()
|
||||||
|
|
||||||
|
Plug 'tpope/vim-fugitive'
|
||||||
|
Plug 'puremourning/vimspector'
|
||||||
|
Plug 'vim-scripts/DrawIt'
|
||||||
|
Plug 'Bercio/vim-inkscape-insert'
|
||||||
|
Plug 'rstacruz/sparkup', {'rtp': 'vim/'}
|
||||||
|
|
||||||
|
Plug 'vim-pandoc/vim-pandoc'
|
||||||
|
Plug 'vim-pandoc/vim-pandoc-syntax'
|
||||||
|
|
||||||
|
Plug 'MarcWeber/vim-addon-mw-utils'
|
||||||
|
Plug 'tomtom/tlib_vim'
|
||||||
|
Plug 'cespare/vim-toml'
|
||||||
|
Plug 'SirVer/ultisnips'
|
||||||
|
Plug 'honza/vim-snippets'
|
||||||
|
|
||||||
|
Plug 'mhartington/oceanic-next'
|
||||||
|
|
||||||
|
Plug 'preservim/nerdtree'
|
||||||
|
|
||||||
|
Plug 'farmergreg/vim-lastplace'
|
||||||
|
|
||||||
|
Plug 'sk1418/HowMuch'
|
||||||
|
|
||||||
|
Plug 'godlygeek/tabular'
|
||||||
|
Plug 'vim-crystal/vim-crystal'
|
||||||
|
Plug 'stephpy/vim-yaml'
|
||||||
|
Plug 'MaxMEllon/vim-jsx-pretty'
|
||||||
|
Plug 'arrufat/vala.vim'
|
||||||
|
Plug 'chaimleib/vim-renpy'
|
||||||
|
Plug 'vhda/verilog_systemverilog.vim'
|
||||||
|
Plug 'gregkh/kernel-coding-style'
|
||||||
|
|
||||||
|
Plug 'dense-analysis/ale'
|
||||||
|
Plug 'PenguinOwl/lsp'
|
||||||
|
Plug 'editorconfig/editorconfig-vim'
|
||||||
|
|
||||||
|
Plug '907th/vim-auto-save'
|
||||||
|
|
||||||
|
call plug#end() " required
|
||||||
|
|
||||||
|
if install
|
||||||
|
set number
|
||||||
|
PlugInstall
|
||||||
|
q
|
||||||
|
endif
|
||||||
|
|
||||||
|
colorscheme OceanicNext
|
||||||
|
let g:airine_theme='oceanicnext'
|
||||||
|
let g:airline_powerline_fonts = 1
|
||||||
|
|
||||||
|
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree")
|
||||||
|
\ && b:NERDTree.isTabTree()) | q | endif
|
||||||
autocmd BufEnter * call SetupALEBuffer()
|
autocmd BufEnter * call SetupALEBuffer()
|
||||||
autocmd BufEnter *.log setlocal autoread
|
autocmd BufEnter *.log setlocal autoread
|
||||||
|
"autocmd BufEnter *.jsx call UltiSnipsAddFiletypes(["html", "javascript"])
|
||||||
autocmd User LspSetup call LspAddServer(lsp_list)
|
autocmd User LspSetup call LspAddServer(lsp_list)
|
||||||
autocmd User LspSetup call LspOptionsSet(lspOpts)
|
autocmd User LspSetup call LspOptionsSet(lspOpts)
|
||||||
autocmd User LspAttached let b:ale_disable_lsp = 1
|
autocmd User LspAttached let b:ale_disable_lsp = 1
|
||||||
"autocmd BufEnter *.jsx call UltiSnipsAddFiletypes(["html", "javascript"])
|
|
||||||
|
|
||||||
|
call SetHighlights()
|
||||||
Reference in new issue
Block a user