2024-05-24 16:07:28 +03:00
|
|
|
-- get only the currently used buffer in the current window and set the options for it
|
|
|
|
local winid = vim.api.nvim_get_current_win()
|
2024-06-08 13:16:34 +03:00
|
|
|
local bufnr = vim.api.nvim_get_current_buf()
|
|
|
|
|
2024-05-24 16:07:28 +03:00
|
|
|
local wo = vim.wo[winid][0]
|
2024-06-08 13:16:34 +03:00
|
|
|
local bo = vim.bo[bufnr]
|
2024-05-24 16:07:28 +03:00
|
|
|
|
|
|
|
wo.spell = true
|
2024-07-09 13:37:12 +03:00
|
|
|
-- bo.textwidth = 120
|
2024-05-24 16:07:28 +03:00
|
|
|
|
|
|
|
vim.cmd.highlight({ "SpellBad", "gui=undercurl", "guifg=#DA6464" })
|
2024-06-08 13:16:34 +03:00
|
|
|
|
|
|
|
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
|