---@type inbox.Renderer local M = {} function M.render(bufnr) local entry = vim.b[bufnr].inbox.entry local content_type = vim.b[bufnr].inbox.content_type local part = entry.parts[content_type] local lines = vim.split(part.content, "\n") vim.bo[bufnr].filetype = "mail" vim.bo[bufnr].syntax = "mail" vim.bo[bufnr].modifiable = true vim.api.nvim_buf_set_lines(bufnr, 0, -1, true, lines) vim.bo[bufnr].modifiable = false vim.bo[bufnr].modified = false end return M