From bc10779a9aab503d7d3c35cb2932a705659e9f50 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Wed, 3 May 2023 14:22:26 +0200 Subject: [PATCH] Add wm specific Vim setup --- .../neovim/configuration/ftdetect/folder_wm.vim | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 home/programs/neovim/configuration/ftdetect/folder_wm.vim diff --git a/home/programs/neovim/configuration/ftdetect/folder_wm.vim b/home/programs/neovim/configuration/ftdetect/folder_wm.vim new file mode 100644 index 0000000..21be1c8 --- /dev/null +++ b/home/programs/neovim/configuration/ftdetect/folder_wm.vim @@ -0,0 +1,16 @@ +augroup wm_soziopolisFolder + autocmd! + autocmd BufEnter **/soziopolis/**/tests/Acceptance/** execute "call WmSoziopolisSetupAcceptance()" +augroup END + +function! WmSoziopolisSetupAcceptance() + let l:env = 'localhost' + " Allows switching via `:let g:codeception_env = 'prod'` + if exists('g:codeception_env') + let l:env = g:codeception_env + endif + let g:test#php#codeception#options = { + \ 'nearest': '--env ' . l:env . ' --debug', + \ 'file': '--env ' . l:env . ' --debug', + \} +endfunction