nvim ftplugin tweaks
This commit is contained in:
@@ -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()"
|
||||
Reference in New Issue
Block a user