Mercurial > packages > developer
changeset 0:8b04d7d6d91a
initial commit
| author | luka |
|---|---|
| date | Tue, 19 Aug 2025 20:36:03 -0400 |
| parents | |
| children | 7f5276e3dc83 |
| files | .hgignore .vimrc composer.json publishable/hgignore publishable/vimrc src/DevelopmentServiceProvider.php |
| diffstat | 6 files changed, 190 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgignore Tue Aug 19 20:36:03 2025 -0400 @@ -0,0 +1,9 @@ +syntax: glob +vendor +*.env +*.env.backup +*.env.production +.php-cs-fixer.cache +*.aichat +tags +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.vimrc Tue Aug 19 20:36:03 2025 -0400 @@ -0,0 +1,49 @@ +syntax on +set tabstop=2 +set shiftwidth=2 +set softtabstop=2 +set autoindent +set smartindent +"set termguicolors +"set number +nnoremap <Leader>cc :set colorcolumn=80<cr> +nnoremap <Leader>ncc :set colorcolumn-=80<cr> +nnoremap <C-l> :ALECodeAction <cr> +set mouse=a + +function! FixPhpFiles() + " Save the current cursor position + let save_cursor = getpos(".") + + "Format the files + let command = 'php-cs-fixer fix .' + let output = system(command) + " Reload the file and restore the cursor position + execute 'edit!' + call setpos(".", save_cursor) +endfunction + +nnoremap <leader>f :call FixPhpFiles()<CR> + +" Committing commands +map <C-k> :wa<CR>:!hg addremove && hg commit <CR> + + + +function! SendBufferToProgram() + " Create a temporary file + let temp_file = tempname() + + " Write current buffer to the temporary file + exe "write! " . temp_file + + " Send the content of the temporary file to your program + " Replace <your_program> with the actual command to run your program + let command = "cat " . temp_file . " | <your_program>" + + " Execute the command + call system(command) + + " Optionally, delete the temporary file if not needed + call delete(temp_file) +endfunction
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/composer.json Tue Aug 19 20:36:03 2025 -0400 @@ -0,0 +1,19 @@ +{ + "name": "wizard/developer", + "version": "1.0.0", + "description": "Development dependencies.", + "autoload": { + "psr-4": { + "Wizard\\Development\\": "src/" + } + }, + "minimum-stability": "stable", + "require": {}, + "extra": { + "laravel": { + "providers": [ + "Wizard\\Development\\DevelopmentServiceProvider" + ] + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/publishable/hgignore Tue Aug 19 20:36:03 2025 -0400 @@ -0,0 +1,21 @@ +syntax: glob +vendor +node_modules +bootstrap/cache +public/build +storage +*.env +*.env.backup +*.env.production +.php-cs-fixer.cache +*.aichat +tags +public/hot +public/storage +storage/*.key +.env.*.local +Homestead.yaml +Homestead.json +.vagrant +.idea +.phpunit.result.cache
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/publishable/vimrc Tue Aug 19 20:36:03 2025 -0400 @@ -0,0 +1,69 @@ +let g:db_name='project_manager' +let g:db_user='project_manager_user' +let g:db_password='Password123' + +" let g:vim_ai_roles_config_file = './roles.ini' + + +colorscheme desert + +function! GeneratePhpCtags() + 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' + let output = system(command) +endfunction + +function! FixPhpFiles() + " Save the current cursor position + let save_cursor = getpos(".") + + "Format the files + let command = './vendor/bin/pint ' . expand('%') . ' --silent' + let output = system(command) + " Reload the file and restore the cursor position + execute 'edit!' + call setpos(".", save_cursor) +endfunction + +nnoremap <leader>f :call FixPhpFiles()<CR> + +" Committing commands +map <C-k> :wa<CR>:!./vendor/bin/pint --silent && hg addremove && hg commit <CR> +"map <C-k> :wa<CR>:!hg addremove && hg commit <CR> + + +"------------------------------------------------------------------------------- +" Plugins +"------------------------------------------------------------------------------- + +" Add Vundle or any other plugin manager setup here + +" Install plugins +Plug 'jwalton512/vim-blade' +Plug 'dense-analysis/ale' + +" Enable Blade Syntax +filetype plugin indent on +au BufRead,BufNewFile *.blade.php setfiletype blade + +" ALE Configuration +let g:ale_fixers = { + \ 'blade': ['prettier'], + \ 'javascript': ['prettier'], + \ 'php': ['pint'], + \} +let g:ale_blade_prettier_options = '--write --prose-wrap always' +let g:ale_php_pint_options = '--optimize' +let g:ale_php_pint_executable = getcwd().'/vendor/bin/pint' + +" General Prettier Settings +let g:prettier#autoformat = 1 +let g:prettier#autoformat_require_pragma = 0 + +" Map a key to run Prettier manually, if preferred +nnoremap <silent> <leader>p :ALEFix<CR> + +" Use <Tab> or space as per your preference +set tabstop=4 +set shiftwidth=4 +set expandtab +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/DevelopmentServiceProvider.php Tue Aug 19 20:36:03 2025 -0400 @@ -0,0 +1,23 @@ +<?php + +namespace Wizard\Development; + +use Illuminate\Support\ServiceProvider; + +class DevelopmentServiceProvider extends ServiceProvider +{ + + public function register(): void + {} + + public function boot(): void + { + $publish_path = __DIR__.'/../publishable'; + + $this->publishes([ + $publish_path.'/vimrc' => base_path('.vimrc'), + $publish_path.'/hgignore' => base_path('.hgignore'), + ]); + + } +}
