diff publishable/vimrc @ 0:8b04d7d6d91a

initial commit
author luka
date Tue, 19 Aug 2025 20:36:03 -0400
parents
children 7f5276e3dc83
line wrap: on
line diff
--- /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
+