17 lines
508 B
Lua
17 lines
508 B
Lua
local filename = vim.fn.shellescape(vim.api.nvim_buf_get_name(0))
|
|
|
|
-- Indentation & Layout
|
|
vim.opt_local.colorcolumn = "120"
|
|
vim.opt_local.textwidth = 120
|
|
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 (StyLua fallback, LSP primary)
|
|
vim.bo.formatprg = "stylua --stdin-filepath " .. filename .. " -"
|
|
vim.bo.formatexpr = "v:lua.vim.lsp.formatexpr()"
|