Browse Source

Merge branch 'master' of git.tovijaeschke.xyz:tovi/dotfiles

master^2
Tovi Jaeschke-Rogers 3 weeks ago
parent
commit
402f199c38
9 changed files with 142 additions and 15 deletions
  1. +5
    -2
      .config/hypr/hyprland.conf
  2. +0
    -1
      .config/nvim/lua/plugins/blink.lua
  3. +1
    -0
      .config/nvim/lua/plugins/conform.lua
  4. +93
    -0
      .config/nvim/lua/plugins/dap.lua
  5. +8
    -0
      .config/nvim/lua/plugins/demicolon.lua
  6. +0
    -1
      .config/nvim/lua/plugins/fugitive.lua
  7. +1
    -0
      .config/nvim/lua/plugins/linting.lua
  8. +17
    -11
      .config/nvim/lua/plugins/lspconfig.lua
  9. +17
    -0
      .local/bin/toggle-swapescape-hyprland

+ 5
- 2
.config/hypr/hyprland.conf View File

@ -139,8 +139,8 @@ input {
kb_layout = us kb_layout = us
kb_variant = kb_variant =
kb_model = kb_model =
kb_options = kb_options = caps:swapescape
# kb_options = =
# kb_options = caps:swapescape
kb_options =
kb_rules = kb_rules =
follow_mouse = 1 follow_mouse = 1
@ -186,6 +186,9 @@ bind = $mainMod, M, exec, ~/.local/bin/hyprland-monitor-switcher.sh
bind = $mainMod SHIFT, L, exec, hyprlock bind = $mainMod SHIFT, L, exec, hyprlock
bind = $mainMod, S, exec, hyprshot -m region --clipboard-only bind = $mainMod, S, exec, hyprshot -m region --clipboard-only
bind = $mainMod, T, exec, ~/.local/bin/toggle-swapescape-hyprland
bind = $mainMod SHIFT, T, exec, ~/.local/bin/toggle-swapescape-hyprland
bind = $mainMod, Return, layoutmsg, swapwithmaster bind = $mainMod, Return, layoutmsg, swapwithmaster
bind = $mainMod, j, layoutmsg, cyclenext bind = $mainMod, j, layoutmsg, cyclenext
bind = $mainMod, k, layoutmsg, cycleprev bind = $mainMod, k, layoutmsg, cycleprev


+ 0
- 1
.config/nvim/lua/plugins/blink.lua View File

@ -20,7 +20,6 @@ return {
winblend = vim.o.pumblend, winblend = vim.o.pumblend,
scrollbar = true, scrollbar = true,
border = 'single', border = 'single',
max_items = 200,
draw = { draw = {
columns = { columns = {
{ "label", "label_description", gap = 1 }, { "label", "label_description", gap = 1 },


+ 1
- 0
.config/nvim/lua/plugins/conform.lua View File

@ -10,6 +10,7 @@ return {
go = { "goimports", "gofmt" }, go = { "goimports", "gofmt" },
javascript = { "prettierd" }, javascript = { "prettierd" },
typescript = { "prettierd" }, typescript = { "prettierd" },
typescriptreact = { "prettierd" },
vue = { "prettierd" }, vue = { "prettierd" },
css = { "prettierd" }, css = { "prettierd" },
html = { "prettierd" }, html = { "prettierd" },


+ 93
- 0
.config/nvim/lua/plugins/dap.lua View File

@ -0,0 +1,93 @@
return {
"mfussenegger/nvim-dap",
dependencies = {
"rcarriga/nvim-dap-ui",
"theHamsta/nvim-dap-virtual-text",
},
config = function()
local dap = require("dap")
local dapui = require('dapui')
-- Setup DAP UI with explicit configuration
dapui.setup()
dap.adapters.php = {
type = 'executable',
command = vim.fn.stdpath('data') .. '/mason/bin/php-debug-adapter',
}
-- Get the correct project paths (make this global so keys can access it)
_G.get_project_paths = function()
local cwd = vim.fn.getcwd()
-- Check if we're in the project root (where docker-compose.yml is)
if vim.fn.filereadable(cwd .. "/docker-compose.yml") == 1 then
return {
project_root = cwd,
api_path = cwd .. "/app/api",
docker_path = "/var/www"
}
-- Check if we're in the app/api directory
elseif string.match(cwd, "app/api$") then
local project_root = string.gsub(cwd, "/app/api$", "")
return {
project_root = project_root,
api_path = cwd,
docker_path = "/var/www"
}
else
-- Fallback - assume we're somewhere in the project
return {
project_root = cwd,
api_path = cwd,
docker_path = "/var/www"
}
end
end
local paths = _G.get_project_paths()
-- PHP configurations
dap.configurations.php = {
{
name = "🚀 Jack Laravel - Listen for Xdebug",
type = "php",
request = "launch",
port = 9003,
pathMappings = {
[paths.docker_path] = paths.api_path,
},
hostname = "0.0.0.0",
log = true,
xdebugSettings = {
max_children = 512,
max_data = 1024,
max_depth = 4,
},
},
{
name = "🌐 Jack Laravel - Web Request Debug",
type = "php",
request = "launch",
port = 9003,
pathMappings = {
["/var/www"] = paths.api_path,
},
hostname = "0.0.0.0",
-- Pre-configure for Laravel routes
breakMode = "request",
}
}
end,
keys = {
{ "<leader>DD", function() require("dap").continue() end, desc = "Start Laravel Debug" },
{ "<leader>Ds", function() require("dap").step_over() end, desc = "Step Over" },
{ "<leader>Di", function() require("dap").step_into() end, desc = "Step Into" },
{ "<leader>Do", function() require("dap").step_out() end, desc = "Step Out" }, -- Fixed: was "Ds" twice
{ "<leader>bp", function() require("dap").toggle_breakpoint() end, desc = "Toggle Breakpoint" },
{ "<leader>bP", function() require("dap").set_breakpoint(vim.fn.input("Breakpoint condition: ")) end, desc = "Conditional Breakpoint" },
{ "<leader>dr", function() require("dap").repl.open() end, desc = "Open REPL" },
{ "<leader>dl", function() require("dap").run_last() end, desc = "Run Last" },
{ "<leader>du", function() require("dapui").toggle() end, desc = "Toggle DAP UI" },
},
}

+ 8
- 0
.config/nvim/lua/plugins/demicolon.lua View File

@ -0,0 +1,8 @@
return {
'mawkler/demicolon.nvim',
dependencies = {
'nvim-treesitter/nvim-treesitter',
'nvim-treesitter/nvim-treesitter-textobjects',
},
opts = {}
}

+ 0
- 1
.config/nvim/lua/plugins/fugitive.lua View File

@ -31,7 +31,6 @@ return {
-- Additional useful fugitive buffer mappings -- Additional useful fugitive buffer mappings
map("n", "q", "<cmd>close<CR>", "Close fugitive buffer", buf_opts) map("n", "q", "<cmd>close<CR>", "Close fugitive buffer", buf_opts)
map("n", "<leader>gd", "<cmd>Gvdiffsplit<CR>", "Git diff split", buf_opts) map("n", "<leader>gd", "<cmd>Gvdiffsplit<CR>", "Git diff split", buf_opts)
map("n", "<leader>gb", "<cmd>Git blame<CR>", "Git blame", buf_opts)
end end
-- Auto-command for fugitive buffer mappings -- Auto-command for fugitive buffer mappings


+ 1
- 0
.config/nvim/lua/plugins/linting.lua View File

@ -54,6 +54,7 @@ return {
lint.linters_by_ft = { lint.linters_by_ft = {
javascript = { "eslint" }, javascript = { "eslint" },
typescript = { "eslint" }, typescript = { "eslint" },
typescriptreact = { "eslint" },
vue = { "eslint" }, vue = { "eslint" },
json = { "jsonlint" }, json = { "jsonlint" },
markdown = { "markdownlint" }, markdown = { "markdownlint" },


+ 17
- 11
.config/nvim/lua/plugins/lspconfig.lua View File

@ -3,16 +3,16 @@ return {
event = { "BufReadPre", "BufNewFile" }, event = { "BufReadPre", "BufNewFile" },
dependencies = { dependencies = {
{ "saghen/blink.cmp" }, { "saghen/blink.cmp" },
{ "antosha417/nvim-lsp-file-operations", config = true },
{ "williamboman/mason.nvim", config = true },
{ "williamboman/mason-lspconfig.nvim" },
{ "WhoIsSethDaniel/mason-tool-installer.nvim" },
{ "j-hui/fidget.nvim", opts = {} },
{ "folke/neodev.nvim", opts = {} },
{ 'dmmulroy/ts-error-translator.nvim', opts = {} },
{ "antosha417/nvim-lsp-file-operations", config = true },
{ "williamboman/mason.nvim", config = true },
{ "williamboman/mason-lspconfig.nvim" },
{ "WhoIsSethDaniel/mason-tool-installer.nvim" },
{ "j-hui/fidget.nvim", opts = {} },
{ "folke/neodev.nvim", opts = {} },
{ 'dmmulroy/ts-error-translator.nvim', opts = {} },
{ 'mawkler/refjump.nvim', opts = {}, event = 'LspAttach', },
}, },
config = function() config = function()
local lspconfig = require("lspconfig")
local utils = require("lsp.utils") local utils = require("lsp.utils")
vim.api.nvim_create_autocmd("LspAttach", { vim.api.nvim_create_autocmd("LspAttach", {
@ -43,7 +43,7 @@ return {
}, },
signs = true, signs = true,
underline = true, underline = true,
update_in_insert = false,
update_in_insert = true,
severity_sort = true, severity_sort = true,
}) })
@ -69,10 +69,16 @@ return {
end end
end end
-- Setup all servers
-- Setup all servers using the new vim.lsp.config and vim.lsp.enable APIs
for server_name, server in pairs(servers) do for server_name, server in pairs(servers) do
-- Merge capabilities
server.capabilities = vim.tbl_deep_extend("force", {}, capabilities, server.capabilities or {}) server.capabilities = vim.tbl_deep_extend("force", {}, capabilities, server.capabilities or {})
lspconfig[server_name].setup(server)
-- Use vim.lsp.config to define/customize the server configuration
vim.lsp.config(server_name, server)
-- Use vim.lsp.enable to activate the server for its filetypes
vim.lsp.enable(server_name)
end end
end, end,
} }

+ 17
- 0
.local/bin/toggle-swapescape-hyprland View File

@ -0,0 +1,17 @@
#!/bin/bash
# Script to toggle caps:swapescape setting in Hyprland
# Save this as ~/.config/hypr/scripts/toggle-caps-escape.sh
# Check current state
current_setting=$(hyprctl getoption input:kb_options | grep -o "caps:swapescape" || echo "")
if [ -n "$current_setting" ]; then
# Currently swapped, disable it
hyprctl keyword input:kb_options ""
notify-send "Keyboard Layout" "Caps Lock and Escape returned to normal" -i input-keyboard
else
# Not swapped, enable it
hyprctl keyword input:kb_options "caps:swapescape"
notify-send "Keyboard Layout" "Caps Lock and Escape swapped" -i input-keyboard
fi

Loading…
Cancel
Save