Skip to content

Commit 260cc38

Browse files
author
Prime Again
committed
automated dev commit
1 parent 41bf181 commit 260cc38

File tree

4 files changed

+47
-1
lines changed

4 files changed

+47
-1
lines changed

lua/theprimeagen/lazy/dap.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,12 @@ return {
9090
error(string.format("bad name: %s", name))
9191
end
9292

93-
dapui.toggle(layout_config.index)
93+
local uis = vim.api.nvim_list_uis()[1]
94+
if uis ~= nil then
95+
layout_config.size = uis.width
96+
end
97+
98+
pcall(dapui.toggle, layout_config.index)
9499
end
95100

96101
vim.keymap.set("n", "<leader>dr", function() toggle_debug_ui("repl") end, { desc = "Debug: toggle repl ui" })

lua/theprimeagen/lazy/neotest.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ return {
2424
})
2525
end, { desc = "Debug: Running Nearest Test" })
2626

27+
vim.keymap.set("n", "<leader>tv", function()
28+
require("neotest").summary.toggle()
29+
end, { desc = "Debug: Summary Toggle" })
30+
2731
vim.keymap.set("n", "<leader>ts", function()
2832
require("neotest").run.run({
2933
suite = true,
@@ -43,5 +47,9 @@ return {
4347
require("neotest").output.open()
4448
end, { desc = "Debug: Open test output" })
4549

50+
vim.keymap.set("n", "<leader>ta", function()
51+
require("neotest").run.run(vim.fn.getcwd())
52+
end, { desc = "Debug: Open test output" })
53+
4654
end
4755
}

lua/theprimeagen/lazy/tj.lua

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
return {
2+
"tjdevries/php.nvim",
3+
dependencies = {
4+
"nvim-treesitter/nvim-treesitter"
5+
},
6+
config = function()
7+
require("php").setup({})
8+
end
9+
}

lua/theprimeagen/lazy/treesitter.lua

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
return {
2+
{
23
"nvim-treesitter/nvim-treesitter",
34
build = ":TSUpdate",
45
config = function()
@@ -60,4 +61,27 @@ return {
6061

6162
vim.treesitter.language.register("templ", "templ")
6263
end
64+
},
65+
66+
{
67+
"nvim-treesitter/nvim-treesitter-context",
68+
after = "nvim-treesitter",
69+
config = function()
70+
require'treesitter-context'.setup{
71+
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
72+
multiwindow = false, -- Enable multiwindow support.
73+
max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
74+
min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit.
75+
line_numbers = true,
76+
multiline_threshold = 20, -- Maximum number of lines to show for a single context
77+
trim_scope = 'outer', -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
78+
mode = 'cursor', -- Line used to calculate context. Choices: 'cursor', 'topline'
79+
-- Separator between context and content. Should be a single character string, like '-'.
80+
-- When separator is set, the context will only show up when there are at least 2 lines above cursorline.
81+
separator = nil,
82+
zindex = 20, -- The Z-index of the context window
83+
on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching
84+
}
85+
end
86+
}
6387
}

0 commit comments

Comments
 (0)