luckymeowth/.nvimrc.lua
Felipe Contreras Salinas a3e89e1e11 refactors y mejoras varias al tema (#4)
Reviewed-on: https://codeberg.org/LuckyMeowth/luckymeowth/pulls/4
Co-authored-by: Felipe Contreras Salinas <felipe@bstr.cl>
Co-committed-by: Felipe Contreras Salinas <felipe@bstr.cl>
2025-07-27 05:21:04 +02:00

21 lines
482 B
Lua

-- Set spelling
local function set_lang(buf)
if string.match(vim.api.nvim_buf_get_name(buf), "en.md$") ~= nil then
vim.opt_local.spelllang = "en"
else
vim.opt_local.spelllang = "es"
end
end
vim.api.nvim_create_autocmd({ "FileType" }, {
pattern = "markdown",
callback = function(event)
set_lang(event.buf)
end,
})
for _, buf in ipairs(vim.api.nvim_list_bufs()) do
if vim.api.nvim_get_option_value("filetype", { buf = buf }) == "markdown" then
set_lang(buf)
end
end