From: Stefan Huber Date: Fri, 17 Dec 2021 21:43:28 +0000 (+0100) Subject: plugins: Support lowendbox setting X-Git-Url: https://git.sthu.org/?a=commitdiff_plain;h=4dd74699e5c889cf5469cb9577c0fed74cf51458;p=vimconf.git plugins: Support lowendbox setting --- diff --git a/init.vim b/init.vim index c1f7872..845bc42 100644 --- a/init.vim +++ b/init.vim @@ -44,6 +44,12 @@ syntax on " Load some macros runtime macros.vim +if filereadable($HOME . '/.vim/lowendbox') + let g:lowendbox = 1 +else + let g:lowendbox = 0 +endif + """""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Some global plugin settings @@ -110,28 +116,29 @@ let NERDTreeWinSize=22 let NERDTreeQuitOnOpen=1 "au VimEnter * if !argc() | Startify | NERDTree | wincmd w -let g:neomake_c_enabled_makers = ['clangtidy', 'clangcheck'] -let g:neomake_cpp_enabled_makers = ['clangtidy', 'clangcheck'] - -" Taken from neomake -if OnBattery() - call neomake#configure#automake('w') -else - call neomake#configure#automake('nw', 1000) +if $USER != "root" && g:lowendbox == 0 + let g:neomake_c_enabled_makers = ['clangtidy', 'clangcheck'] + let g:neomake_cpp_enabled_makers = ['clangtidy', 'clangcheck'] + let g:clang_compilation_database = '.' + + " Taken from neomake + if OnBattery() + call neomake#configure#automake('w') + else + call neomake#configure#automake('nw', 1000) + endif + + " Speedup deoplete startup time, see deoplete FAQ + let g:python3_host_prog = '/usr/bin/python3' + " deoplete requires huge startuptime. Delay loading upon first InsertEnter. + let g:deoplete#enable_at_startup = 0 + call deoplete#custom#option({ + \ 'smart_case' : v:true, + \ 'auto_refresh_delay' : 100, + \ }) + au InsertEnter * call deoplete#enable() endif -let g:clang_compilation_database = '.' - -" Speedup deoplete startup time, see deoplete FAQ -let g:python3_host_prog = '/usr/bin/python3' -" deoplete requires huge startuptime. Delay loading upon first InsertEnter. -let g:deoplete#enable_at_startup = 0 -call deoplete#custom#option({ - \ 'smart_case' : v:true, - \ 'auto_refresh_delay' : 100, - \ }) -au InsertEnter * call deoplete#enable() - "augroup pencil "au! "au FileType markdown,mkd call pencil#init() @@ -308,26 +315,28 @@ let s:normal_mode_mappings = [ let g:termdebug_wide = 1 let termdebugger = $HOME . '/.vim/gdb.sh' -if has('nvim-0.5') && $USER != "root" +if g:lowendbox == 0 + if has('nvim-0.5') && $USER != "root" lua <Unicoder'} Plug 'scrooloose/nerdtree', {'on': 'NERDTreeToggle'} Plug 'ryanoasis/vim-devicons', Cond(g:enable_plugin_devicons) -Plug 'neomake/neomake' -Plug 'majutsushi/tagbar', {'on': 'TagbarToggle'} - Plug 'Konfekt/vim-DetectSpellLang', {'do': 'spell'} Plug 'roryokane/detectindent' Plug 'derekwyatt/vim-fswitch', {'for': ['c', 'cpp', 'objc']} -Plug 'ludovicchabant/vim-gutentags', {'for': ['c', 'cpp', 'objc']} -"Plug 'vim-scripts/Conque-GDB', {'for': ['c', 'cpp', 'objc']} Plug 'godlygeek/tabular' Plug 'junegunn/vim-easy-align' @@ -47,26 +42,16 @@ Plug 'tpope/vim-repeat' Plug 'flwyd/vim-conjoin' +if $USER != "root" + Plug 'majutsushi/tagbar', {'on': 'TagbarToggle'} -if has('nvim') - Plug 'Shougo/deoplete.nvim', {'do': ':UpdateRemotePlugins'} - Plug 'Shougo/denite.nvim', { 'do': ':UpdateRemotePlugins' } -else - Plug 'Shougo/deoplete.nvim' - Plug 'Shougo/denite.nvim' + Plug 'ludovicchabant/vim-gutentags', {'for': ['c', 'cpp', 'objc']} + "Plug 'vim-scripts/Conque-GDB', {'for': ['c', 'cpp', 'objc']} - Plug 'roxma/nvim-yarp' - Plug 'roxma/vim-hug-neovim-rpc' -endif - -if $USER != "root" Plug 'editorconfig/editorconfig-vim' Plug 'embear/vim-localvimrc' - Plug 'mhinz/vim-signify' - Plug 'tpope/vim-fugitive' Plug 'airblade/vim-rooter' - Plug 'Xuyuanp/nerdtree-git-plugin', {'on': 'NERDTreeToggle'} Plug 'plasticboy/vim-markdown', {'for': 'markdown'} @@ -76,34 +61,54 @@ if $USER != "root" Plug 'PProvost/vim-markdown-jekyll', {'for': 'markdown'} Plug 'tpope/vim-liquid', {'for': ['liquid', 'html', 'xml', 'markdown']} - Plug 'cakebaker/scss-syntax.vim', {'for': 'scss'} - Plug 'hail2u/vim-css3-syntax', {'for': ['scss', 'css']} - Plug 'gko/vim-coloresque' - Plug 'tpope/vim-ragtag' - Plug 'lervag/vimtex', {'for': 'tex'} - - " java extension to deoplete - Plug 'artur-shaik/vim-javacomplete2', {'for': 'java'} - Plug 'Shougo/neosnippet.vim' Plug 'Shougo/neosnippet-snippets' Plug 'tpope/vim-speeddating' - Plug 'jceb/vim-orgmode', {'for': ['org']} - Plug 'vimwiki/vimwiki' Plug 'mattn/calendar-vim' " Costs a second startup time Plug 'dbeniamine/cheat.sh-vim', {'on': 'Cheat'} - Plug 'sjl/splice.vim', {'on': 'SpliceInit'} - if has('nvim-0.5') - Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} - else - Plug 'sheerun/vim-polyglot' + if g:lowendbox == 0 + if has('nvim') + Plug 'Shougo/deoplete.nvim', {'do': ':UpdateRemotePlugins'} + Plug 'Shougo/denite.nvim', { 'do': ':UpdateRemotePlugins' } + else + Plug 'Shougo/deoplete.nvim' + Plug 'Shougo/denite.nvim' + + Plug 'roxma/nvim-yarp' + Plug 'roxma/vim-hug-neovim-rpc' + endif + + " java extension to deoplete + Plug 'artur-shaik/vim-javacomplete2', {'for': 'java'} + + Plug 'neomake/neomake' + + Plug 'lervag/vimtex', {'for': 'tex'} + + Plug 'mhinz/vim-signify' + Plug 'tpope/vim-fugitive' + Plug 'gko/vim-coloresque' + + Plug 'vimwiki/vimwiki' + Plug 'jceb/vim-orgmode', {'for': ['org']} + + Plug 'cakebaker/scss-syntax.vim', {'for': 'scss'} + Plug 'hail2u/vim-css3-syntax', {'for': ['scss', 'css']} + + Plug 'sjl/splice.vim', {'on': 'SpliceInit'} + + if has('nvim-0.5') + Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} + else + Plug 'sheerun/vim-polyglot' + endif endif endif