nvim ftplugin tweaks

This commit is contained in:
Henrik Bakken
2026-10-16 16:10:36 +02:00
parent 32f3429acf
commit a02140d3a4
9 changed files with 67 additions and 17 deletions
+16
View File
@@ -0,0 +1,16 @@
local filename = vim.fn.shellescape(vim.api.nvim_buf_get_name(0))
-- Indentation & Layout
vim.opt_local.colorcolumn = "100"
vim.opt_local.textwidth = 100
vim.opt_local.tabstop = 4
vim.opt_local.shiftwidth = 4
vim.opt_local.softtabstop = 4
-- Formatting Behavior
vim.opt_local.formatoptions:remove("t")
vim.opt_local.formatoptions:append("j")
-- gq Formatters (Ruff/Black fallback, LSP primary)
vim.bo.formatprg = "ruff format --stdin-filename " .. filename
vim.bo.formatexpr = "v:lua.vim.lsp.formatexpr()"