Compare commits

...

10 Commits

Author SHA1 Message Date
92b3bd1af3 fix make lua to accept multiple targets 2025-10-30 02:00:10 -03:00
33b2570b4e add make run command 2025-10-30 01:44:36 -03:00
704422d374 ignore QEMU in aerospace 2025-10-30 01:42:21 -03:00
20de5fe8f1 disable smear cursor 2025-10-27 03:27:48 -03:00
a5c62aa8b2 clean stuff up 2025-10-25 17:06:57 -03:00
345044a61a make debug config better 2025-10-25 01:52:02 -03:00
31992214c8 basic hardcoded debugging 2025-10-25 01:29:14 -03:00
0f393df44e fix cmake bug 2025-10-25 00:56:06 -03:00
d4ebee1c9b use kitty with hyprland 2025-10-20 12:37:38 -03:00
2335f83255 enable LSP 2025-10-20 12:37:08 -03:00
8 changed files with 180 additions and 7 deletions

View File

@@ -148,4 +148,8 @@ automatically-unhide-macos-hidden-apps = false
down = 'volume down'
up = 'volume up'
shift-down = ['volume set 0', 'mode main']
[[on-window-detected]]
if.app-name-regex-substring = 'QEMU'
check-further-callbacks = true
run = ['layout floating']

View File

@@ -6,7 +6,7 @@
source = ~/.config/hypr/monitors.conf
# See https://wiki.hypr.land/Configuring/Keywords/
$terminal = wezterm
$terminal = kitty
$fileManager = dolphin
$menu = rofi -show drun
$screenshot = grim -g "$(slurp)" - | swappy -f -

View File

@@ -56,7 +56,7 @@ vim.api.nvim_create_user_command("Build", function(opts)
local t = opts.args
if t == "" then print("Usage: :Build <target>"); return end
float_term(
{ CMAKE, "--build", "build", "--parallel", "20", "--target", t },
{ M.find_cmake(), "--build", "build", "--parallel", "20", "--target", t },
{ height_ratio = 0.8, width_ratio = 0.8, border = "single" }
)
end, { nargs = 1 })

85
nvim/lua/config/dap.lua Normal file
View File

@@ -0,0 +1,85 @@
local dap = require('dap')
dap.adapters.codelldb = {
type = "executable",
command = "/Users/caiowakamatsu/install/codelldb/extension/adapter/codelldb",
}
vim.api.nvim_create_user_command('Debug', function(opts)
local args = vim.split(opts.args, " ")
if #args < 1 then
print("Usage: :Debug <executable> [<working_dir>] [<args>...]")
return
end
local executable = args[1]
local working_dir = (#args >= 2 and args[2] ~= "") and args[2] or vim.fn.getcwd()
local program_args = {}
if #args > 2 then
for i = 3, #args do
table.insert(program_args, args[i])
end
end
dap.run({
type = 'codelldb',
request = 'launch',
name = 'Custom Debug',
program = executable,
cwd = working_dir,
args = program_args,
stopOnEntry = false,
})
end, {
nargs = '+',
complete = 'file',
desc = 'Launch a debugger session with custom executable and args',
})
require("dapui").setup({
layouts = {
{
elements = {
{ id = "scopes", size = 0.8 },
{ id = "watches", size = 0.2 },
},
size = 40,
position = "left",
},
{
elements = {
"repl",
"console",
},
size = 0.25,
position = "bottom",
},
},
controls = {
enabled = true,
},
floating = {
max_height = nil,
max_width = nil,
border = "rounded",
mappings = {
close = { "q", "<Esc>" },
},
},
windows = { indent = 1 },
})
local dap, dapui = require("dap"), require("dapui")
dap.listeners.before.attach.dapui_config = function()
dapui.open()
end
dap.listeners.before.launch.dapui_config = function()
dapui.open()
end
dap.listeners.before.event_terminated.dapui_config = function()
dapui.close()
end
dap.listeners.before.event_exited.dapui_config = function()
dapui.close()
end

View File

@@ -41,12 +41,16 @@ require("lazy").setup({
{ import = "plugins.coding" },
{ import = "plugins.colors" },
{ import = "plugins.ui" },
{ import = "plugins.debugging" },
},
install = { colorscheme = { "habamax" } },
checker = { enabled = true },
})
require("config.cmake")
require("config.make")
require("config.lsp")
require("config.dap")
require("notify").setup({
background_colour = "#000000",

16
nvim/lua/config/make.lua Normal file
View File

@@ -0,0 +1,16 @@
local M = {}
local float_term = require("util.float").float_terminal
vim.api.nvim_create_user_command("Make", function(opts)
if opts.args == "" then
print("Usage: :Make <targets>")
return
end
local args = vim.split(opts.args, "%s+")
float_term(
vim.list_extend({ "make" }, args),
{ height_ratio = 0.8, width_ratio = 0.8, border = "single" }
)
end, { nargs = "*" })

View File

@@ -0,0 +1,64 @@
return {
{
"mfussenegger/nvim-dap",
keys = {
{
"<leader>db",
function() require("dap").toggle_breakpoint() end,
desc = "Toggle Breakpoint"
},
{
"<leader>dc",
function() require("dap").continue() end,
desc = "Continue"
},
{
"<leader>dC",
function() require("dap").run_to_cursor() end,
desc = "Run to Cursor"
},
{
"<leader>dT",
function() require("dap").terminate() end,
desc = "Terminate"
},
}
},
{
"jay-babu/mason-nvim-dap.nvim",
---@type MasonNvimDapSettings
opts = {
-- This line is essential to making automatic installation work
-- :exploding-brain
handlers = {},
automatic_installation = {
-- These will be configured by separate plugins.
exclude = {
"delve",
"python",
},
},
-- DAP servers: Mason will be invoked to install these if necessary.
ensure_installed = {
"bash",
"codelldb",
"php",
"python",
},
},
dependencies = {
"mfussenegger/nvim-dap",
"williamboman/mason.nvim",
},
},
{
"rcarriga/nvim-dap-ui",
dependencies = {
"mfussenegger/nvim-dap",
"nvim-neotest/nvim-nio"
}
},
}

View File

@@ -1,8 +1,8 @@
return {
{
"sphamba/smear-cursor.nvim",
opts = {},
},
--{
--"sphamba/smear-cursor.nvim",
--opts = {},
--},
{
"nvim-tree/nvim-tree.lua",
dependencies = { "nvim-tree/nvim-web-devicons" },