Add more plugins and fix path

This commit is contained in:
Leon Grünewald 2020-02-20 19:19:24 +01:00
parent 81962611f1
commit 16b11af3d8
2 changed files with 60 additions and 15 deletions

View file

@ -1,5 +1,5 @@
# Use Oh My Zsh # Use Oh My Zsh
export ZSH="$(pwd)/.oh-my-zsh" export ZSH="$(echo $HOME)/.oh-my-zsh"
source $ZSH/oh-my-zsh.sh source $ZSH/oh-my-zsh.sh
# Use zplug # Use zplug

View file

@ -3,23 +3,44 @@
" - Avoid using standard Vim directory names like 'plugin' " - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged') call plug#begin('~/.vim/plugged')
"" Syntax Highlighting "" Coding Assistance
" php.vim: PHP syntax higlighting " 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 '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 "" Debugger
" v-debug: PHP Debugger with xdebug " v-debug: PHP Debugger with xdebug
Plug 'vim-vdebug/vdebug' Plug 'vim-vdebug/vdebug'
"" Syntax Linting/Checking
" Ale: Runs fast and works well.
Plug 'dense-analysis/ale'
Plug 'vim-scripts/AutoComplPop'
"" GUI "" GUI
" NERDTree: Sidebar file tree " NERDTree: Sidebar file tree
Plug 'scrooloose/nerdtree' Plug 'scrooloose/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin' Plug 'Xuyuanp/nerdtree-git-plugin'
" BBye: Exits the buffer without murdering the window
"Plug 'moll/vim-bbye'
" MINIBUFXPL: A nice buffer explorer " MINIBUFXPL: A nice buffer explorer
Plug 'fholgado/minibufexpl.vim' Plug 'fholgado/minibufexpl.vim'
@ -34,7 +55,7 @@ Plug 'kien/ctrlp.vim'
" Plug 'junegunn/fzf', { 'do': './install --bin' } " Plug 'junegunn/fzf', { 'do': './install --bin' }
" Plug 'junegunn/fzf.vim' " Plug 'junegunn/fzf.vim'
Plug 'mileszs/ack.vim' Plug 'wincent/ferret'
"" Input optimization "" Input optimization
" Vim Surround: Quickly surround stuff " 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 autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
"" ALE config "" ALE config
" Enable autocomplete " Run linter on save
let g:ale_completion_enabled = 1 let g:ale_fix_on_save = 1
" Hijack Vim's omnifunc " Enable deoplete for Ale
set omnifunc=ale#completion#OmniFunc 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. "" Gutentags
set completeopt+=longest,menuone,menu,preview " 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 "" vdebug config
" Set xdebug 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 = {'server': '172.17.0.1'}
let g:vdebug_options = {'port': '9002'} 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 "" CtrlP config
" Self explainatory " Self explainatory
let g:ctrlp_max_files=0 let g:ctrlp_max_files=0
let g:ctrlp_max_depth=40 let g:ctrlp_max_depth=40
let g:ctrlp_custom_ignore = 'node_modules\|DS_Store\|git' let g:ctrlp_custom_ignore = 'node_modules\|DS_Store\|git'
"" Vim Config
" Some autocompletion settings.
set completeopt+=longest,menuone,menu,preview