More projects

This commit is contained in:
Chris
2026-07-09 17:27:30 +01:00
parent bf0b652992
commit ffc4520ba9
2 changed files with 13 additions and 6 deletions
+6 -5
View File
@@ -1,7 +1,8 @@
return { return {
'ricardoramirezr/blade-nav.nvim', -- 'ricardoramirezr/blade-nav.nvim',
dependencies = { -- totally optional -- dependencies = { -- totally optional
'saghen/blink.cmp', -- if using blink.cmp -- 'saghen/blink.cmp', -- if using blink.cmp
}, -- },
ft = { 'blade', 'php' }, -- optional, improves startup time -- ft = { 'blade', 'php' }, -- optional, improves startup time
} }
+7 -1
View File
@@ -24,6 +24,11 @@ return function(dir)
switch_to(dir) switch_to(dir)
end end
local function compile_typescript()
vim.fn.jobstart('php artisan typescript:transform', { cwd = dir .. '/server', stdout_buffered = true })
vim.notify('Compiling typescript types', vim.log.levels.INFO, { title = 'hylark.lua' })
end
map('<leader>pl', ':cexpr system("vendor/bin/phpstan analyse --no-progress --error-format=raw --memory-limit=2G -vv") <CR>', { desc = 'Run lint' }) map('<leader>pl', ':cexpr system("vendor/bin/phpstan analyse --no-progress --error-format=raw --memory-limit=2G -vv") <CR>', { desc = 'Run lint' })
map('<leader>T', function() map('<leader>T', function()
helpers.open_term { cmd = 'lazysql pgsql://homestead:password@localhost:5432/homestead' } helpers.open_term { cmd = 'lazysql pgsql://homestead:password@localhost:5432/homestead' }
@@ -33,6 +38,7 @@ return function(dir)
map('<Leader>pcs', switch_to_server, { desc = 'Change working directory to server' }) map('<Leader>pcs', switch_to_server, { desc = 'Change working directory to server' })
map('<Leader>pcf', switch_to_frontend, { desc = 'Change working directory to frontend2' }) map('<Leader>pcf', switch_to_frontend, { desc = 'Change working directory to frontend2' })
map('<Leader>pcr', switch_to_root, { desc = 'Change working directory to root' }) map('<Leader>pcr', switch_to_root, { desc = 'Change working directory to root' })
map('<Leader>pt', compile_typescript, { desc = 'Compile typescript' })
vim.api.nvim_create_autocmd({ 'BufWritePost' }, { vim.api.nvim_create_autocmd({ 'BufWritePost' }, {
pattern = { '*.php', '.env', '.graphql' }, pattern = { '*.php', '.env', '.graphql' },
@@ -42,7 +48,7 @@ return function(dir)
vim.fn.jobstart('vendor/bin/sail artisan horizon:terminate', { stdout_buffered = true }) vim.fn.jobstart('vendor/bin/sail artisan horizon:terminate', { stdout_buffered = true })
end end
if vim.fn.search '#\\[TypeScript\\]' ~= 0 then if vim.fn.search '#\\[TypeScript\\]' ~= 0 then
vim.fn.jobstart('php artisan typescript:transform', { cwd = dir .. '/server', stdout_buffered = true }) compile_typescript()
end end
end, end,
}) })