Add more plugins and fix path
This commit is contained in:
parent
81962611f1
commit
16b11af3d8
2 changed files with 60 additions and 15 deletions
|
@ -1,5 +1,5 @@
|
|||
# Use Oh My Zsh
|
||||
export ZSH="$(pwd)/.oh-my-zsh"
|
||||
export ZSH="$(echo $HOME)/.oh-my-zsh"
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# Use zplug
|
||||
|
|
73
vimcfg.vim
73
vimcfg.vim
|
@ -3,23 +3,44 @@
|
|||
" - Avoid using standard Vim directory names like 'plugin'
|
||||
call plug#begin('~/.vim/plugged')
|
||||
|
||||
"" Syntax Highlighting
|
||||
" php.vim: PHP syntax higlighting
|
||||
"" Coding Assistance
|
||||
" Ale: Runs fast and works well.
|
||||
Plug 'dense-analysis/ale'
|
||||
|
||||
" deoplete: Ale wants this for code completeopt
|
||||
Plug 'Shougo/deoplete.nvim'
|
||||
Plug 'roxma/nvim-yarp'
|
||||
Plug 'roxma/vim-hug-neovim-rpc'
|
||||
|
||||
" deoplete PHP support
|
||||
Plug 'phpactor/phpactor' , {'do': 'composer install', 'for': 'php'}
|
||||
Plug 'kristijanhusak/deoplete-phpactor'
|
||||
|
||||
" Better HTML PHP support
|
||||
Plug 'captbaritone/better-indent-support-for-php-with-html'
|
||||
|
||||
" Guten Tag: Automatically generates ctags (variable names, function, classes)
|
||||
Plug 'ludovicchabant/vim-gutentags'
|
||||
|
||||
" php.vim: PHP syntax higlighting and indent
|
||||
Plug 'StanAngeloff/php.vim'
|
||||
Plug '2072/vim-syntax-for-PHP'
|
||||
|
||||
" PHP Namespace: Helps to keep track of namespaces and autcompletes them
|
||||
Plug 'arnaud-lb/vim-php-namespace', {'for': 'php'}
|
||||
|
||||
"" Debugger
|
||||
" v-debug: PHP Debugger with xdebug
|
||||
Plug 'vim-vdebug/vdebug'
|
||||
|
||||
"" Syntax Linting/Checking
|
||||
" Ale: Runs fast and works well.
|
||||
Plug 'dense-analysis/ale'
|
||||
Plug 'vim-scripts/AutoComplPop'
|
||||
"" GUI
|
||||
" NERDTree: Sidebar file tree
|
||||
Plug 'scrooloose/nerdtree'
|
||||
Plug 'Xuyuanp/nerdtree-git-plugin'
|
||||
|
||||
" BBye: Exits the buffer without murdering the window
|
||||
"Plug 'moll/vim-bbye'
|
||||
|
||||
" MINIBUFXPL: A nice buffer explorer
|
||||
Plug 'fholgado/minibufexpl.vim'
|
||||
|
||||
|
@ -34,7 +55,7 @@ Plug 'kien/ctrlp.vim'
|
|||
" Plug 'junegunn/fzf', { 'do': './install --bin' }
|
||||
" Plug 'junegunn/fzf.vim'
|
||||
|
||||
Plug 'mileszs/ack.vim'
|
||||
Plug 'wincent/ferret'
|
||||
|
||||
"" Input optimization
|
||||
" Vim Surround: Quickly surround stuff
|
||||
|
@ -59,14 +80,30 @@ autocmd vimenter * NERDTree | wincmd w
|
|||
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|
||||
|
||||
"" ALE config
|
||||
" Enable autocomplete
|
||||
let g:ale_completion_enabled = 1
|
||||
" Run linter on save
|
||||
let g:ale_fix_on_save = 1
|
||||
|
||||
" Hijack Vim's omnifunc
|
||||
set omnifunc=ale#completion#OmniFunc
|
||||
" Enable deoplete for Ale
|
||||
let g:deoplete#enable_at_startup = 1
|
||||
let g:deoplete#ignore_sources = get(g:, 'deoplete#ignore_sources', {})
|
||||
let g:deoplete#ignore_sources.php = ['omni']
|
||||
|
||||
" Some autocompletion settings.
|
||||
set completeopt+=longest,menuone,menu,preview
|
||||
"" Gutentags
|
||||
" Auto generate ctags on startup
|
||||
autocmd! User vim-gutentags call gutentags#setup_gutentags()
|
||||
|
||||
"" AutoComplPop
|
||||
" Always show auto completion
|
||||
let g:acp_behaviorKeywordLength = 1
|
||||
|
||||
"" PHP
|
||||
" PHP Namespace: Automatically use fully qualified name
|
||||
function! IPhpExpandClass()
|
||||
call PhpExpandClass()
|
||||
call feedkeys('a', 'n')
|
||||
endfunction
|
||||
autocmd FileType php inoremap <Leader>e <Esc>:call IPhpExpandClass()<CR>
|
||||
autocmd FileType php noremap <Leader>e :call PhpExpandClass()<CR>
|
||||
|
||||
"" vdebug config
|
||||
" Set xdebug config
|
||||
|
@ -75,10 +112,18 @@ let g:vdebug_options = {'break_on_open': 0}
|
|||
let g:vdebug_options = {'server': '172.17.0.1'}
|
||||
let g:vdebug_options = {'port': '9002'}
|
||||
|
||||
let g:vdebug_options["path_maps"] = { "/var/www/html": "/home/leong/workspace/project" }
|
||||
" Configure paths
|
||||
let g:vdebug_options["path_maps"] = { "/var/www/html": "/home/leong/workspace/upwire-2019" }
|
||||
|
||||
" Don't break on open
|
||||
let g:vdebug_options['break_on_open'] = 0
|
||||
|
||||
"" CtrlP config
|
||||
" Self explainatory
|
||||
let g:ctrlp_max_files=0
|
||||
let g:ctrlp_max_depth=40
|
||||
let g:ctrlp_custom_ignore = 'node_modules\|DS_Store\|git'
|
||||
|
||||
"" Vim Config
|
||||
" Some autocompletion settings.
|
||||
set completeopt+=longest,menuone,menu,preview
|
||||
|
|
Loading…
Reference in a new issue