turing changes

This commit is contained in:
Grace Yoder 2026-02-19 15:16:51 -05:00
parent a01bb5c0ed
commit 3e110044f2
No known key found for this signature in database
6 changed files with 80 additions and 16 deletions

View file

@ -71,12 +71,23 @@ vim.api.nvim_create_autocmd("FileType", {
callback = function()
-- Line wrapping settings
vim.opt_local.textwidth = 80
vim.opt_local.formatoptions = "atcqjnl"
vim.opt_local.formatoptions = "tcqjnl"
vim.opt_local.wrap = true
vim.opt_local.linebreak = true
-- Show column guide
vim.opt_local.colorcolumn = "80"
-- Toggle 'a' in formatoptions
vim.keymap.set("n", "<leader>a", function()
local fo = vim.opt_local.formatoptions:get()
if fo.a then
vim.opt_local.formatoptions:remove("a")
print("Auto-formatting disabled")
else
vim.opt_local.formatoptions:append("a")
print("Auto-formatting enabled")
end
end, { buffer = true, desc = "Toggle auto-formatting" })
end,
})
-- Setup formatting on LSP attach