Files
scripts/nvim/lua/config/autocmds.lua
T
adamfandClaude Opus 5 91e2c8695f Finish Hyprland Lua migration, untrack generated config outputs
Complete the move from the old .conf-style Hyprland config to Lua:

- Drop base.conf, hyprland.conf, monitors.conf and the empty
  workspaces.conf; base.lua + colors.lua are now the sources.
- gen-colors emits hypr/colors.lua globals, build.sh cats it with
  base.lua into hyprland.lua.
- Add .luarc.json so the editor picks up Hyprland's Lua stubs.
- Correct the DP-2 monitor position and drop the stale transform.

Untrack the build outputs that were gitignored yet still committed
(i3/config, sway/config, waybar/style.css, wofi/style.css) so the
ignore rules take effect; install.sh already runs gen-colors and each
build.sh, so a fresh clone regenerates them.

Also regroup .gitignore by what produces each file, refresh the docs
for the Lua layout, and drop a stray scratch dump.

Carries along in-progress config tweaks: pin the i3 keyboard layout,
make the nerd-dictation toggle match on the full command, drop the
X11-only DP-2 rotate, and add a clangd LSP setup for nvim.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-16 16:23:22 +01:00

30 lines
985 B
Lua

-- Autocmds are automatically loaded on the VeryLazy event
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
--
-- Add any additional autocmds here
-- with `vim.api.nvim_create_autocmd`
--
-- Or remove existing autocmds by their group name (which is prefixed with `lazyvim_` for the defaults)
-- e.g. vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell")
-- C/C++ uses 2-space indent to match clang-format's LLVM default
vim.api.nvim_create_autocmd("FileType", {
pattern = { "c", "cpp" },
callback = function()
vim.opt_local.tabstop = 2
vim.opt_local.shiftwidth = 2
vim.opt_local.softtabstop = 2
-- Disable LazyVim's format-on-save for C/C++
vim.b.autoformat = false
end,
})
-- When opening multiple files, tile them vertically (side by side)
vim.api.nvim_create_autocmd("VimEnter", {
callback = function()
if vim.fn.argc() > 1 then
vim.cmd("vertical ball")
end
end,
})