23 lines
616 B
Lua
23 lines
616 B
Lua
-- get only the currently used buffer in the current window and set the options for it
|
|
local winid = vim.api.nvim_get_current_win()
|
|
local bufnr = vim.api.nvim_get_current_buf()
|
|
|
|
local wo = vim.wo[winid][0]
|
|
local bo = vim.bo[bufnr]
|
|
|
|
wo.spell = true
|
|
bo.textwidth = 120
|
|
|
|
vim.cmd.highlight({ "SpellBad", "gui=undercurl", "guifg=#DA6464" })
|
|
|
|
local conform = require("conform")
|
|
|
|
-- if a formatter is enabled for this filetype then ignore .editorconfig file
|
|
-- as we assume a formatter specific config
|
|
for _, f in ipairs(conform.list_formatters(bufnr)) do
|
|
if f.available then
|
|
vim.b.editorconfig = false
|
|
break
|
|
end
|
|
end
|