Mercurial > borealpoint
comparison .vimrc @ 0:9d7dcd54c677
Initial Commit and package setup
| author | luka |
|---|---|
| date | Sat, 23 Aug 2025 22:20:51 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:9d7dcd54c677 |
|---|---|
| 1 let g:db_name='project_manager' | |
| 2 let g:db_user='project_manager_user' | |
| 3 let g:db_password='Password123' | |
| 4 | |
| 5 " let g:vim_ai_roles_config_file = './roles.ini' | |
| 6 | |
| 7 | |
| 8 colorscheme desert | |
| 9 | |
| 10 function! GeneratePhpCtags() | |
| 11 let command = 'ctags -R --fields=+aimS --php-kinds=cdfint --languages=php --extras=+q --tag-relative=yes --exclude=".git" --exclude=".hg" --exclude="vendor" --exclude="node_modules" --exclude="composer.phar" --totals=yes' | |
| 12 let output = system(command) | |
| 13 endfunction | |
| 14 | |
| 15 function! FixPhpFiles() | |
| 16 " Save the current cursor position | |
| 17 let save_cursor = getpos(".") | |
| 18 | |
| 19 "Format the files | |
| 20 let command = './vendor/bin/pint ' . expand('%') . ' --silent' | |
| 21 let output = system(command) | |
| 22 " Reload the file and restore the cursor position | |
| 23 execute 'edit!' | |
| 24 call setpos(".", save_cursor) | |
| 25 endfunction | |
| 26 | |
| 27 nnoremap <leader>f :call FixPhpFiles()<CR> | |
| 28 | |
| 29 " Committing commands | |
| 30 map <C-k> :wa<CR>:!./vendor/bin/pint --silent && hg addremove && hg commit <CR> | |
| 31 "map <C-k> :wa<CR>:!hg addremove && hg commit <CR> | |
| 32 | |
| 33 | |
| 34 "------------------------------------------------------------------------------- | |
| 35 " Plugins | |
| 36 "------------------------------------------------------------------------------- | |
| 37 | |
| 38 " Add Vundle or any other plugin manager setup here | |
| 39 | |
| 40 " Install plugins | |
| 41 Plug 'jwalton512/vim-blade' | |
| 42 Plug 'dense-analysis/ale' | |
| 43 | |
| 44 " Enable Blade Syntax | |
| 45 filetype plugin indent on | |
| 46 au BufRead,BufNewFile *.blade.php setfiletype blade | |
| 47 | |
| 48 " ALE Configuration | |
| 49 let g:ale_fixers = { | |
| 50 \ 'blade': ['prettier'], | |
| 51 \ 'javascript': ['prettier'], | |
| 52 \ 'php': ['pint'], | |
| 53 \} | |
| 54 let g:ale_blade_prettier_options = '--write --prose-wrap always' | |
| 55 let g:ale_php_pint_options = '--optimize' | |
| 56 let g:ale_php_pint_executable = getcwd().'/vendor/bin/pint' | |
| 57 | |
| 58 " General Prettier Settings | |
| 59 let g:prettier#autoformat = 1 | |
| 60 let g:prettier#autoformat_require_pragma = 0 | |
| 61 | |
| 62 " Map a key to run Prettier manually, if preferred | |
| 63 nnoremap <silent> <leader>p :ALEFix<CR> | |
| 64 | |
| 65 " Use <Tab> or space as per your preference | |
| 66 set tabstop=4 | |
| 67 set shiftwidth=4 | |
| 68 set expandtab | |
| 69 |
