Compare commits

..

9 Commits

Author SHA1 Message Date
tracer 12c215ef1b Ignore generated Neovim logs 2026-04-30 19:14:28 +02:00
tracer 003dd1d656 Merge branch 'master' of git.24unix.net:tracer/dotfiles 2026-04-25 21:50:44 +02:00
tracer 1a24b058c6 LSP 2026-04-25 21:50:34 +02:00
tracer 9cdd05c831 Karabiner 2026-04-25 21:48:48 +02:00
tracer 43cc5c91f7 Update Kitty clear shortcut and Telescope search behavior 2026-04-22 00:14:16 +02:00
tracer 525765963d updated kitty 2026-04-15 22:13:33 +02:00
tracer 9641ce051e Update Karabiner mappings for Codex CLI in kitty 2026-04-09 21:42:14 +02:00
tracer 4c66aee045 Merge branch 'master' of git.24unix.net:tracer/dotfiles 2026-04-05 12:03:11 +02:00
tracer 470e6147f3 kitty.conf 2026-04-05 12:02:43 +02:00
13 changed files with 434 additions and 76 deletions
+4
View File
@@ -3,3 +3,7 @@
email = tracer@24unix.net email = tracer@24unix.net
[core] [core]
autocrlf = input autocrlf = input
[init]
defaultBranch = master
[push]
autoSetupRemote = true
+2 -2
View File
@@ -1,3 +1,3 @@
.nvimlog nvim.log
nvim/.nvimlog nvim/.nvimlog
nvim/plugin/ nvim/plugin/packer_compiled.lua
@@ -0,0 +1,196 @@
{
"profiles": [
{
"complex_modifications": {
"rules": [
{
"description": "kitty: map shift+enter for codex cli",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^net\\.kovidgoyal\\.kitty(-quick-access)?$"
],
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "return_or_enter",
"modifiers": {
"mandatory": ["shift"],
"optional": ["any"]
}
},
"to": [
{
"key_code": "j",
"modifiers": ["control"]
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^net\\.kovidgoyal\\.kitty(-quick-access)?$"
],
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "return_or_enter",
"modifiers": {
"mandatory": ["option"]
}
},
"to": [
{
"key_code": "j",
"modifiers": ["control"]
}
],
"type": "basic"
}
]
},
{
"description": "kitty: map cmd+enter to new OS window globally",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^net\\.kovidgoyal\\.kitty(-quick-access)?$"
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "return_or_enter",
"modifiers": {
"mandatory": ["command"]
}
},
"to": [
{
"key_code": "vk_none"
},
{
"shell_command": "/Applications/kitty.app/Contents/MacOS/kitty --single-instance --directory ~"
}
],
"type": "basic"
}
]
},
{
"description": "kitty: map ctrl+enter to quick access terminal globally",
"manipulators": [
{
"from": {
"key_code": "return_or_enter",
"modifiers": {
"mandatory": ["control"]
}
},
"to": [
{
"key_code": "vk_none"
},
{
"shell_command": "$HOME/.config/kitty/launch-quick-access-terminal.sh >/tmp/kitty-quick-access.log 2>&1 < /dev/null &"
}
],
"type": "basic"
},
{
"from": {
"key_code": "keypad_enter",
"modifiers": {
"mandatory": ["control"]
}
},
"to": [
{
"key_code": "vk_none"
},
{
"shell_command": "$HOME/.config/kitty/launch-quick-access-terminal.sh >/tmp/kitty-quick-access.log 2>&1 < /dev/null &"
}
],
"type": "basic"
}
]
},
{
"description": "kitty: map cmd+left/right to ctrl+left/right",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^net\\.kovidgoyal\\.kitty(-quick-access)?$"
],
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "left_arrow",
"modifiers": {
"mandatory": ["command"],
"optional": ["any"]
}
},
"to": [
{
"key_code": "left_arrow",
"modifiers": ["control"]
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^net\\.kovidgoyal\\.kitty(-quick-access)?$"
],
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "right_arrow",
"modifiers": {
"mandatory": ["command"],
"optional": ["any"]
}
},
"to": [
{
"key_code": "right_arrow",
"modifiers": ["control"]
}
],
"type": "basic"
}
]
}
]
},
"fn_function_keys": [
{
"from": { "key_code": "f6" },
"to": [{ "key_code": "f6" }]
}
],
"name": "Default profile",
"selected": true,
"virtual_hid_keyboard": {
"country_code": 0,
"keyboard_type_v2": "ansi"
}
}
]
}
+35 -55
View File
@@ -1,40 +1,17 @@
{ {
"global": { "show_in_menu_bar": false },
"profiles": [ "profiles": [
{ {
"complex_modifications": { "complex_modifications": {
"rules": [ "rules": [
{ {
"description": "codex: map cmd+v and shift+enter", "description": "kitty: map shift+enter for codex cli",
"manipulators": [ "manipulators": [
{ {
"conditions": [ "conditions": [
{ {
"bundle_identifiers": [ "bundle_identifiers": [
"^com\\.openai\\.codex$" "^net\\.kovidgoyal\\.kitty(-quick-access)?$"
],
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "v",
"modifiers": {
"mandatory": ["command"],
"optional": ["any"]
}
},
"to": [
{
"key_code": "v",
"modifiers": ["control"]
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.openai\\.codex$"
], ],
"type": "frontmost_application_if" "type": "frontmost_application_if"
} }
@@ -53,6 +30,27 @@
} }
], ],
"type": "basic" "type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^net\\.kovidgoyal\\.kitty(-quick-access)?$"
],
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "return_or_enter",
"modifiers": { "mandatory": ["option"] }
},
"to": [
{
"key_code": "j",
"modifiers": ["control"]
}
],
"type": "basic"
} }
] ]
}, },
@@ -63,24 +61,18 @@
"conditions": [ "conditions": [
{ {
"bundle_identifiers": [ "bundle_identifiers": [
"^net\\.kovidgoyal\\.kitty$" "^net\\.kovidgoyal\\.kitty(-quick-access)?$"
], ],
"type": "frontmost_application_unless" "type": "frontmost_application_unless"
} }
], ],
"from": { "from": {
"key_code": "return_or_enter", "key_code": "return_or_enter",
"modifiers": { "modifiers": { "mandatory": ["command"] }
"mandatory": ["command"]
}
}, },
"to": [ "to": [
{ { "key_code": "vk_none" },
"key_code": "vk_none" { "shell_command": "/Applications/kitty.app/Contents/MacOS/kitty --single-instance --directory ~" }
},
{
"shell_command": "/usr/bin/osascript -e 'tell application \"kitty\" to activate' -e 'tell application \"System Events\" to keystroke return using command down'"
}
], ],
"type": "basic" "type": "basic"
} }
@@ -92,34 +84,22 @@
{ {
"from": { "from": {
"key_code": "return_or_enter", "key_code": "return_or_enter",
"modifiers": { "modifiers": { "mandatory": ["control"] }
"mandatory": ["control"]
}
}, },
"to": [ "to": [
{ { "key_code": "vk_none" },
"key_code": "vk_none" { "shell_command": "$HOME/.config/kitty/launch-quick-access-terminal.sh >/tmp/kitty-quick-access.log 2>&1 < /dev/null &" }
},
{
"shell_command": "$HOME/.config/kitty/launch-quick-access-terminal.sh >/tmp/kitty-quick-access.log 2>&1 < /dev/null &"
}
], ],
"type": "basic" "type": "basic"
}, },
{ {
"from": { "from": {
"key_code": "keypad_enter", "key_code": "keypad_enter",
"modifiers": { "modifiers": { "mandatory": ["control"] }
"mandatory": ["control"]
}
}, },
"to": [ "to": [
{ { "key_code": "vk_none" },
"key_code": "vk_none" { "shell_command": "$HOME/.config/kitty/launch-quick-access-terminal.sh >/tmp/kitty-quick-access.log 2>&1 < /dev/null &" }
},
{
"shell_command": "$HOME/.config/kitty/launch-quick-access-terminal.sh >/tmp/kitty-quick-access.log 2>&1 < /dev/null &"
}
], ],
"type": "basic" "type": "basic"
} }
@@ -194,4 +174,4 @@
} }
} }
] ]
} }
+10
View File
@@ -1,3 +1,4 @@
font_family family="JetbrainsMono Nerd Font Mono"
bold_font auto bold_font auto
italic_font auto italic_font auto
bold_italic_font auto bold_italic_font auto
@@ -5,10 +6,15 @@ bold_italic_font auto
font_size 14 font_size 14
adjust_line_height 125% adjust_line_height 125%
cursor_shape block cursor_shape block
cursor_trail 120
cursor_trail_decay 0.08 0.25
cursor_trail_start_threshold 3
cursor_trail_color #ff8844
cursor_blink_interval 0.5 cursor_blink_interval 0.5
cursor_stop_blinking_after 0 cursor_stop_blinking_after 0
shell_integration no-cursor shell_integration no-cursor
enable_audio_bell 0 enable_audio_bell 0
background_opacity 0.85
hide_window_decorations titlebar-only hide_window_decorations titlebar-only
macos_show_window_title_in none macos_show_window_title_in none
macos_titlebar_color background macos_titlebar_color background
@@ -16,10 +22,14 @@ copy_on_select clipboard
term xterm-256color term xterm-256color
map ctrl+left previous_tab map ctrl+left previous_tab
map ctrl+right next_tab map ctrl+right next_tab
map cmd+k combine : clear_terminal scrollback active : clear_terminal clear active
tab_bar_style separator tab_bar_style separator
tab_separator " ┇" tab_separator " ┇"
tab_bar_edge top tab_bar_edge top
window_padding_width 10 window_padding_width 10
remember_window_size no
initial_window_width 160c
initial_window_height 35c
map cmd+shift+r load_config_file map cmd+shift+r load_config_file
map cmd+enter launch --type=os-window --cwd=~ map cmd+enter launch --type=os-window --cwd=~
+2 -2
View File
@@ -10,9 +10,9 @@ kitty_kitten=/Applications/kitty.app/Contents/MacOS/kitten
studio_config=$dotfiles_dir/hosts/studio/kitty/quick-access-terminal.conf studio_config=$dotfiles_dir/hosts/studio/kitty/quick-access-terminal.conf
if [ "$host_name" = "studio" ] && [ -f "$studio_config" ]; then if [ "$host_name" = "studio" ] && [ -f "$studio_config" ]; then
exec "$kitty_kitten" quick-access-terminal --config "$studio_config" \ exec "$kitty_kitten" quick-access-terminal --instance-group quick-access --config "$studio_config" \
"$kitty_kitten" run-shell --cwd "$HOME" "$kitty_kitten" run-shell --cwd "$HOME"
fi fi
exec "$kitty_kitten" quick-access-terminal \ exec "$kitty_kitten" quick-access-terminal --instance-group quick-access \
"$kitty_kitten" run-shell --cwd "$HOME" "$kitty_kitten" run-shell --cwd "$HOME"
-8
View File
@@ -1,8 +0,0 @@
WRN 2026-04-01T22:04:13.317 ?.6087 server_start:197: Failed to start server: operation not permitted: /var/folders/jr/2c20bjfn48ld1tm7_75l6dz00000gn/T/nvim.tracer/BZ5xQs/nvim.6087.0
WRN 2026-04-01T22:04:13.317 ?.6086 server_start:197: Failed to start server: operation not permitted: /var/folders/jr/2c20bjfn48ld1tm7_75l6dz00000gn/T/nvim.tracer/W6ywmm/nvim.6086.0
WRN 2026-04-01T22:09:00.578 ?.7002 server_start:197: Failed to start server: operation not permitted: /var/folders/jr/2c20bjfn48ld1tm7_75l6dz00000gn/T/nvim.tracer/EE2fn7/nvim.7002.0
WRN 2026-04-01T22:10:22.134 ?.7483 server_start:197: Failed to start server: operation not permitted: /var/folders/jr/2c20bjfn48ld1tm7_75l6dz00000gn/T/nvim.tracer/q30iDC/nvim.7483.0
WRN 2026-04-01T22:10:22.134 ?.7481 server_start:197: Failed to start server: operation not permitted: /var/folders/jr/2c20bjfn48ld1tm7_75l6dz00000gn/T/nvim.tracer/JODETW/nvim.7481.0
WRN 2026-04-01T22:10:22.134 ?.7482 server_start:197: Failed to start server: operation not permitted: /var/folders/jr/2c20bjfn48ld1tm7_75l6dz00000gn/T/nvim.tracer/lKGUPU/nvim.7482.0
WRN 2026-04-01T22:10:29.772 ?.7512 server_start:197: Failed to start server: operation not permitted: /var/folders/jr/2c20bjfn48ld1tm7_75l6dz00000gn/T/nvim.tracer/84u53h/nvim.7512.0
WRN 2026-04-01T22:10:29.772 ?.7509 server_start:197: Failed to start server: operation not permitted: /var/folders/jr/2c20bjfn48ld1tm7_75l6dz00000gn/T/nvim.tracer/oWmRd9/nvim.7509.0
+15
View File
@@ -0,0 +1,15 @@
local function set_gitsigns_blame_highlight()
vim.api.nvim_set_hl(0, "GitSignsCurrentLineBlame", {
fg = "#f0a97e",
italic = true,
})
end
local highlight_group = vim.api.nvim_create_augroup("tracer_highlights", { clear = true })
vim.api.nvim_create_autocmd("ColorScheme", {
group = highlight_group,
callback = set_gitsigns_blame_highlight,
})
set_gitsigns_blame_highlight()
+1
View File
@@ -15,6 +15,7 @@ opt.softtabstop = 4
opt.smartindent = true opt.smartindent = true
opt.wrap = false opt.wrap = false
opt.wildmode = "longest:full,full" opt.wildmode = "longest:full,full"
opt.completeopt = "menuone,longest,preview"
opt.title = true opt.title = true
opt.signcolumn = 'yes:1' opt.signcolumn = 'yes:1'
+18
View File
@@ -182,12 +182,30 @@ require("packer").startup(function(use)
requires = { requires = {
"williamboman/mason.nvim", "williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim", "williamboman/mason-lspconfig.nvim",
"b0o/schemastore.nvim",
}, },
config = function() config = function()
pcall(require, "tracer.plugins.lspconfig") pcall(require, "tracer.plugins.lspconfig")
end, end,
}) })
-- Completion
use({
"hrsh7th/nvim-cmp",
requires = {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-nvim-lsp-signature-help",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"L3MON4D3/LuaSnip",
"saadparwaiz1/cmp_luasnip",
"onsails/lspkind.nvim",
},
config = function()
require("tracer.plugins.cmp")
end,
})
-- Fuzzy finder -- Fuzzy finder
use({ use({
"nvim-telescope/telescope.nvim", "nvim-telescope/telescope.nvim",
+64
View File
@@ -0,0 +1,64 @@
local cmp = require("cmp")
local luasnip = require("luasnip")
local lspkind = require("lspkind")
local has_words_before = function()
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
cmp.setup({
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
formatting = {
format = lspkind.cmp_format(),
},
mapping = {
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" }),
["<CR>"] = cmp.mapping.confirm({ select = true }),
},
sources = {
{
name = "nvim_lsp",
option = {
php = {
keyword_pattern = [=[[\%(\$\k*\)\|\k\+]]=],
},
},
},
{ name = "nvim_lsp_signature_help" },
{ name = "luasnip" },
{
name = "buffer",
option = {
keyword_pattern = [=[[\%(\$\k*\)\|\k\+]]=],
},
},
{ name = "path" },
},
experimental = {
ghost_text = true,
},
})
+29
View File
@@ -3,6 +3,12 @@ require("mason").setup()
require("mason-lspconfig").setup({ automatic_installation = true }) require("mason-lspconfig").setup({ automatic_installation = true })
local capabilities = require("cmp_nvim_lsp").default_capabilities()
vim.lsp.config("*", {
capabilities = capabilities,
})
-- Keymaps -- Keymaps
vim.keymap.set("n", "<Leader>d", vim.diagnostic.open_float) vim.keymap.set("n", "<Leader>d", vim.diagnostic.open_float)
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev) vim.keymap.set("n", "[d", vim.diagnostic.goto_prev)
@@ -13,6 +19,20 @@ vim.keymap.set("n", "gr", "<cmd>Telescope lsp_references<CR>")
vim.keymap.set("n", "K", vim.lsp.buf.hover) vim.keymap.set("n", "K", vim.lsp.buf.hover)
vim.keymap.set("n", "<Leader>rn", vim.lsp.buf.rename) vim.keymap.set("n", "<Leader>rn", vim.lsp.buf.rename)
-- Sign configuration
vim.fn.sign_define("DiagnosticSignError", { text = "", texthl = "DiagnosticSignError" })
vim.fn.sign_define("DiagnosticSignWarn", { text = "", texthl = "DiagnosticSignWarn" })
vim.fn.sign_define("DiagnosticSignInfo", { text = "", texthl = "DiagnosticSignInfo" })
vim.fn.sign_define("DiagnosticSignHint", { text = "󰌵", texthl = "DiagnosticSignHint" })
vim.diagnostic.config({
virtual_text = true,
signs = true,
underline = true,
update_in_insert = true,
severity_sort = true,
})
-- Emmet for HTML and JSX-style markup editing -- Emmet for HTML and JSX-style markup editing
vim.lsp.config("emmet_language_server", { vim.lsp.config("emmet_language_server", {
filetypes = { filetypes = {
@@ -26,9 +46,18 @@ vim.lsp.config("emmet_language_server", {
}, },
}) })
vim.lsp.config("jsonls", {
settings = {
json = {
schemas = require("schemastore").json.schemas(),
},
},
})
vim.lsp.enable("intelephense") vim.lsp.enable("intelephense")
vim.lsp.enable("ts_ls") vim.lsp.enable("ts_ls")
vim.lsp.enable("eslint") vim.lsp.enable("eslint")
vim.lsp.enable("html") vim.lsp.enable("html")
vim.lsp.enable("cssls") vim.lsp.enable("cssls")
vim.lsp.enable("jsonls")
vim.lsp.enable("emmet_language_server") vim.lsp.enable("emmet_language_server")
+58 -9
View File
@@ -1,4 +1,40 @@
local actions = require('telescope.actions') local actions = require('telescope.actions')
local action_state = require('telescope.actions.state')
local builtin = require('telescope.builtin')
local telescope_state = require('telescope.state')
local function clear_prompt(prompt_bufnr)
local current_picker = action_state.get_current_picker(prompt_bufnr)
current_picker:reset_prompt()
end
local function resume_cached_picker(prompt_title, fallback)
local cached_pickers = telescope_state.get_global_key('cached_pickers') or {}
for index, picker in ipairs(cached_pickers) do
if picker.prompt_title == prompt_title then
builtin.resume({ cache_index = index })
return
end
end
fallback()
end
local function find_files()
resume_cached_picker('Files', function()
builtin.find_files()
end)
end
local function find_all_files()
resume_cached_picker('All Files', function()
builtin.find_files({
no_ignore = true,
prompt_title = 'All Files',
})
end)
end
vim.cmd([[ vim.cmd([[
highlight link TelescopePromptTitle PMenuSel highlight link TelescopePromptTitle PMenuSel
@@ -14,6 +50,10 @@ require('telescope').setup({
path_display = { truncate = 1 }, path_display = { truncate = 1 },
prompt_prefix = '', prompt_prefix = '',
selection_caret = ' ', selection_caret = ' ',
cache_picker = {
num_pickers = 10,
ignore_empty_prompt = true,
},
layout_config = { layout_config = {
prompt_position = 'top', prompt_position = 'top',
}, },
@@ -21,8 +61,14 @@ require('telescope').setup({
mappings = { mappings = {
i = { i = {
['<esc>'] = actions.close, ['<esc>'] = actions.close,
['<C-Down>'] = actions.cycle_history_next, ['<M-n>'] = actions.cycle_history_next,
['<C-Up>'] = actions.cycle_history_prev, ['<M-p>'] = actions.cycle_history_prev,
['<C-l>'] = clear_prompt,
},
n = {
['<M-n>'] = actions.cycle_history_next,
['<M-p>'] = actions.cycle_history_prev,
['<C-l>'] = clear_prompt,
}, },
}, },
file_ignore_patterns = { '.git/' }, file_ignore_patterns = { '.git/' },
@@ -30,6 +76,7 @@ require('telescope').setup({
pickers = { pickers = {
find_files = { find_files = {
hidden = true, hidden = true,
prompt_title = 'Files',
}, },
buffers = { buffers = {
previewer = false, previewer = false,
@@ -49,10 +96,12 @@ require('telescope').setup({
require('telescope').load_extension('fzf') require('telescope').load_extension('fzf')
require('telescope').load_extension('live_grep_args') require('telescope').load_extension('live_grep_args')
vim.keymap.set('n', '<leader>f', [[<cmd>lua require('telescope.builtin').find_files()<CR>]]) vim.keymap.set('n', '<leader>f', find_files, { desc = 'Find files' })
vim.keymap.set('n', '<leader><leader>', [[<cmd>lua require('telescope.builtin').find_files()<CR>]]) vim.keymap.set('n', '<leader><leader>', find_files, { desc = 'Find files' })
vim.keymap.set('n', '<leader>F', [[<cmd>lua require('telescope.builtin').find_files({ no_ignore = true, prompt_title = 'All Files' })<CR>]]) vim.keymap.set('n', '<leader>F', find_all_files, { desc = 'Find all files' })
vim.keymap.set('n', '<leader>b', [[<cmd>lua require('telescope.builtin').buffers()<CR>]]) vim.keymap.set('n', '<leader>b', builtin.buffers, { desc = 'Find buffers' })
vim.keymap.set('n', '<leader>g', [[<cmd>lua require('telescope').extensions.live_grep_args.live_grep_args()<CR>]]) vim.keymap.set('n', '<leader>g', function()
vim.keymap.set('n', '<leader>h', [[<cmd>lua require('telescope.builtin').oldfiles()<CR>]]) require('telescope').extensions.live_grep_args.live_grep_args()
vim.keymap.set('n', '<leader>s', [[<cmd>lua require('telescope.builtin').lsp_document_symbols()<CR>]]) end, { desc = 'Live grep' })
vim.keymap.set('n', '<leader>h', builtin.oldfiles, { desc = 'Recent files' })
vim.keymap.set('n', '<leader>s', builtin.lsp_document_symbols, { desc = 'Document symbols' })