More projects
This commit is contained in:
@@ -24,6 +24,11 @@ return function(dir)
|
||||
switch_to(dir)
|
||||
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>T', function()
|
||||
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>pcf', switch_to_frontend, { desc = 'Change working directory to frontend2' })
|
||||
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' }, {
|
||||
pattern = { '*.php', '.env', '.graphql' },
|
||||
@@ -42,7 +48,7 @@ return function(dir)
|
||||
vim.fn.jobstart('vendor/bin/sail artisan horizon:terminate', { stdout_buffered = true })
|
||||
end
|
||||
if vim.fn.search '#\\[TypeScript\\]' ~= 0 then
|
||||
vim.fn.jobstart('php artisan typescript:transform', { cwd = dir .. '/server', stdout_buffered = true })
|
||||
compile_typescript()
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user