mirror of
https://github.com/Hizenberg469/environment-setup.git
synced 2026-04-19 21:12:23 +03:00
complete
This commit is contained in:
20
env_setup.sh
20
env_setup.sh
@@ -51,8 +51,18 @@ essential_plugins=(
|
|||||||
|
|
||||||
optional_plugins=(
|
optional_plugins=(
|
||||||
"dense-analysis/ale"
|
"dense-analysis/ale"
|
||||||
|
"vim-scripts/OmniCppComplete"
|
||||||
|
"ludovicchabant/vim-gutentags"
|
||||||
|
"skywind3000/gutentags_plus"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
essential_pkg=(
|
||||||
|
"build-essential"
|
||||||
|
"gdb"
|
||||||
|
"cscope"
|
||||||
|
"universal-ctags"
|
||||||
|
"global"
|
||||||
|
)
|
||||||
# checkStatus 1 -- To exit the script
|
# checkStatus 1 -- To exit the script
|
||||||
# checkStatus 0 -- To return 255(failure) value
|
# checkStatus 0 -- To return 255(failure) value
|
||||||
# checkStatus <status> {(optional)status-message}
|
# checkStatus <status> {(optional)status-message}
|
||||||
@@ -544,6 +554,16 @@ status=$?
|
|||||||
logStatus "Setting up Plugin directory: " $status
|
logStatus "Setting up Plugin directory: " $status
|
||||||
|
|
||||||
touch status.txt
|
touch status.txt
|
||||||
|
|
||||||
|
# Installing packages
|
||||||
|
|
||||||
|
for pkg in "${essential_pkg[@]}"
|
||||||
|
do
|
||||||
|
checkPkgIsInstalled "$pkg" 1
|
||||||
|
status=$?
|
||||||
|
logStatus "Installing $pkg: " $status
|
||||||
|
done
|
||||||
|
|
||||||
# Installing the plugins
|
# Installing the plugins
|
||||||
for plugins in "${essential_plugins[@]}"
|
for plugins in "${essential_plugins[@]}"
|
||||||
do
|
do
|
||||||
|
|||||||
62
my_vimrc
62
my_vimrc
@@ -251,6 +251,8 @@ endfunction
|
|||||||
command! ALEOn call s:ALEEnable()
|
command! ALEOn call s:ALEEnable()
|
||||||
command! ALEOff call s:ALEDisable()
|
command! ALEOff call s:ALEDisable()
|
||||||
|
|
||||||
|
" Codequery
|
||||||
|
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
function! s:CodeQueryEnable() abort
|
function! s:CodeQueryEnable() abort
|
||||||
silent! packadd unite.vim
|
silent! packadd unite.vim
|
||||||
silent! packadd vim-codequery
|
silent! packadd vim-codequery
|
||||||
@@ -260,4 +262,64 @@ endfunction
|
|||||||
|
|
||||||
command! CQOn call s:CodeQueryEnable()
|
command! CQOn call s:CodeQueryEnable()
|
||||||
|
|
||||||
|
|
||||||
|
" Gutentags -- Gtags
|
||||||
|
"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
function! GutenTagsEnable() abort
|
||||||
|
|
||||||
|
"let g:gutentags_file_list_command = 'find tj100_mc/ modules/ce/ modules/ethCommon/ modules/ethTransport/ common/ -type f \( -name "*.[ch]" -o -name "*.cpp" -o -name "*.hpp" -o -name "*.js" -o -name "*.pl" -o -name "*.sh"\)'
|
||||||
|
|
||||||
|
"let g:gutentags_ctags_extra_args = [
|
||||||
|
" \'--language=C,C++,Javascript,Perl,Sh',
|
||||||
|
" \'--langmap=C:+.c.h',
|
||||||
|
" \'--langmap=C++:+.cpp.hpp.cc.hh',
|
||||||
|
" \'--langmap=Javascript:+.js',
|
||||||
|
" \'--langmap=Perl:+.pl.pm',
|
||||||
|
" \'--langmap=Sh:+.sh',
|
||||||
|
" \'--langmap=mib:+.mib'
|
||||||
|
" \]
|
||||||
|
|
||||||
|
" For ctags and gtags_plus configuration
|
||||||
|
" enable gtags module
|
||||||
|
let g:gutentags_modules = ['ctags', 'gtags_cscope']
|
||||||
|
|
||||||
|
" config project root markers.
|
||||||
|
let g:gutentags_add_default_project_roots = 0
|
||||||
|
let g:gutentags_project_roots = ['.root']
|
||||||
|
|
||||||
|
" Put the ctags file in <project>/.root/tags (path is relative to project root)
|
||||||
|
let g:gutentags_ctags_tagfile = expand('$PWD/.root/tags')
|
||||||
|
|
||||||
|
" Store GNU Global (gtags) databases under <project>/.root/ (instead of ~/.cache/tags)
|
||||||
|
let g:gutentags_cache_dir = expand('$PWD/.root')
|
||||||
|
|
||||||
|
" To let gutentag_plus manage the connection with gtags instead of gutentags.
|
||||||
|
"let g:gutentags_auto_add_gtags_cscope = 1
|
||||||
|
|
||||||
|
let g:gutentags_define_advanced_commnads = 1
|
||||||
|
|
||||||
|
" change focus to quickfix window after search (optional).
|
||||||
|
let g:gutentags_plus_switch = 1
|
||||||
|
let g:gutentags_plus_nomap = 1
|
||||||
|
noremap <silent> <leader>css :GscopeFind s <C-R><C-W><cr>
|
||||||
|
noremap <silent> <leader>csg :GscopeFind g <C-R><C-W><cr>
|
||||||
|
noremap <silent> <leader>csc :GscopeFind c <C-R><C-W><cr>
|
||||||
|
noremap <silent> <leader>cst :GscopeFind t <C-R><C-W><cr>
|
||||||
|
noremap <silent> <leader>cse :GscopeFind e <C-R><C-W><cr>
|
||||||
|
noremap <silent> <leader>csf :GscopeFind f <C-R><C-W><cr>
|
||||||
|
noremap <silent> <leader>csi :GscopeFind i <C-R>=expand("<cfile>")<cr><cr>
|
||||||
|
noremap <silent> <leader>csd :GscopeFind d <C-R>=expand("<cfile>")<cr><cr>
|
||||||
|
noremap <silent> <leader>csa :GscopeFind a <C-R><C-W><cr>
|
||||||
|
noremap <silent> <leader>csz :GscopeFind z <C-R><C-W><cr>
|
||||||
|
echo "Gutentags + Plus enabled"
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! s:GTagsDisable() abort
|
||||||
|
let g:gutentags_enabled = 0
|
||||||
|
|
||||||
|
if exists(':GscopeKill') | silent! GscopeKill | endif
|
||||||
|
|
||||||
|
echo "Gutentags disabled"
|
||||||
|
endfunction
|
||||||
|
|
||||||
" My vimrc end -- Hizenberg
|
" My vimrc end -- Hizenberg
|
||||||
|
|||||||
Reference in New Issue
Block a user