Cheatsheets and debuggin

This commit is contained in:
Chris
2026-06-16 16:26:28 +01:00
parent 5dd9b59b90
commit ecbc266165
14 changed files with 1297 additions and 142 deletions
+7 -7
View File
@@ -52,16 +52,16 @@ return {
},
sources = {
default = { 'lsp', 'path', 'snippets', 'lazydev', 'blade-nav' },
default = { 'lsp', 'path', 'snippets', 'lazydev' },
providers = {
lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 },
-- avante = { module = 'blink-cmp-avante', name = 'Avante', opts = {} },
['blade-nav'] = {
module = 'blade-nav.blink',
opts = {
clost_tag_on_complete = false,
},
},
-- ['blade-nav'] = {
-- module = 'blade-nav.blink',
-- opts = {
-- clost_tag_on_complete = false,
-- },
-- },
},
per_filetype = {
codecompanion = { 'codecompanion' },
-34
View File
@@ -180,40 +180,6 @@ return {
vim.fn.sign_define(tp, { text = icon, texthl = hl, numhl = hl })
end
local function get_php_ini_dir()
local handle = io.popen 'php --ini 2>/dev/null'
if not handle then
return nil
end
local result = handle:read '*a'
handle:close()
local dir = result:match 'Scan for additional .ini files in:%s+([^\n]+)'
if dir and dir:find '%(none%)' == nil then
return vim.trim(dir)
end
return nil
end
local function enable_xdebug()
local ini_dir = get_php_ini_dir()
if not ini_dir then
return
end
os.execute(string.format('mv "%s/20-xdebug.ini.disabled" "%s/20-xdebug.ini" 2>/dev/null', ini_dir, ini_dir))
end
local function disable_xdebug()
local ini_dir = get_php_ini_dir()
if not ini_dir then
return
end
os.execute(string.format('mv "%s/20-xdebug.ini" "%s/20-xdebug.ini.disabled" 2>/dev/null', ini_dir, ini_dir))
end
dap.listeners.after.event_initialized['xdebug_enable'] = enable_xdebug
dap.listeners.before.event_terminated['xdebug_disable'] = disable_xdebug
dap.listeners.before.event_exited['xdebug_disable'] = disable_xdebug
-- dap.listeners.after.event_output['neotest_display'] = function(_, body)
-- require('neotest').output.open { enter = true, last = true }
-- end
+14 -8
View File
@@ -13,9 +13,10 @@ return {
'saghen/blink.cmp',
'folke/lazydev.nvim',
},
build = function()
vim.fn.system 'composer global require jetbrains/phpstorm-stubs friendsofphp/php-cs-fixer'
end,
-- Might not be necessary for phpantom
-- build = function()
-- vim.fn.system 'composer global require jetbrains/phpstorm-stubs friendsofphp/php-cs-fixer'
-- end,
config = function()
-- This function gets run when an LSP attaches to a particular buffer.
-- That is to say, every time a new file is opened that is associated with
@@ -115,10 +116,11 @@ return {
},
}
vim.lsp.phpactor = {
cmd = { 'phpactor', 'language-server' },
filetypes = { 'php' },
}
-- vim.lsp.config['phpantom'] = {
-- filetypes = { 'php' },
-- cmd = { 'phpantom_lsp' },
-- root_markers = { 'composer.json', '.git' },
-- }
-- Enable the following language servers
--
@@ -144,7 +146,11 @@ return {
},
},
},
-- phpactor = {},
phpantom_lsp = {
filetypes = { 'php' },
cmd = { 'phpantom_lsp' },
root_markers = { 'composer.json', '.git' },
},
vtsls = {
settings = {
vtsls = {
+8 -1
View File
@@ -5,6 +5,13 @@ return {
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
---@module 'render-markdown'
---@type render.md.UserConfig
opts = {},
ft = { 'markdown', 'codecompanion' },
config = function()
require('render-markdown').setup {
latex = {
enabled = true,
render_modes = true,
},
}
end,
}
+27
View File
@@ -0,0 +1,27 @@
require('helpers').edit_cf('pt', '/lua/plugins/test.lua')
return {
'nvim-neotest/neotest',
dependencies = {
'V13Axel/neotest-pest',
},
config = function()
require('neotest').setup {
adapters = {
require 'neotest-pest' {
sail_enabled = function()
return false
end,
parallel = 8,
pest_cmd = function()
local cmd = vim.g.neotest_pest_cmd or { 'vendor/bin/pest' }
if vim.g.neotest_debug then
cmd = { 'sh', '-c', 'XDEBUG_MODE=debug exec ' .. table.concat(cmd, ' ') .. ' "$@"' }
end
return cmd
end,
},
},
}
end,
}
+2
View File
@@ -7,9 +7,11 @@ return {
config = function()
local langs = {
'bash',
'zsh',
'c',
'diff',
'html',
'latex',
'lua',
'luadoc',
'markdown',