]>
git.madduck.net Git - etc/lazyvim.git/commitdiff
madduck's git repository
Every one of the projects in this repository is available at the canonical
URL git://git.madduck.net/madduck/pub/<projectpath> — see
each project's metadata for the exact URL.
All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@ git. madduck. net .
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
SSH access, as well as push access can be individually
arranged .
If you use my repositories frequently, consider adding the following
snippet to ~/.gitconfig and using the third clone URL listed for each
project:
[url "git://git.madduck.net/madduck/"]
insteadOf = madduck:
summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9a8592b )
local i, _ = string.find(vim.bo.filetype, "markdown")
if not i then
vim.opt_local.filetype = "mail.markdown"
local i, _ = string.find(vim.bo.filetype, "markdown")
if not i then
vim.opt_local.filetype = "mail.markdown"
-- disable Treesitter format expression for Mail
vim.opt_local.formatexpr = ""
-- disable Treesitter format expression for Mail
vim.opt_local.formatexpr = ""
-vim.opt_local.formatoptions:remove("o")
-vim.opt_local.formatoptions:remove("r")
-vim.opt_local.formatoptions:remove("l")
+-- {{{ formatting
+vim.opt_local.formatoptions:remove("o") -- would insert current comment leader for o/O
+vim.opt_local.formatoptions:remove("r") -- would insert current comment leader for <CR>
+vim.opt_local.formatoptions:remove("l") -- would not break lines that were long before insert
+vim.opt_local.commentstring = "> %s" -- commenting means quoting in mails
+-- }}}
+
+-- {{{ keymaps
vim.keymap.set("n", "<leader>m", "", { buffer = true, desc = "mail functions" })
vim.keymap.set("n", "<leader>ms", "", { buffer = true, desc = "subject manipulation" })
vim.keymap.set("n", "<leader>m", "", { buffer = true, desc = "mail functions" })
vim.keymap.set("n", "<leader>ms", "", { buffer = true, desc = "subject manipulation" })
{ buffer = true, desc = "remove old subjects" }
)
{ buffer = true, desc = "remove old subjects" }
)
vim.keymap.set("n", "<leader>p", "", { buffer = true, desc = "mailplate profiles" })
vim.keymap.set(
vim.keymap.set("n", "<leader>p", "", { buffer = true, desc = "mailplate profiles" })
vim.keymap.set(
profile_keymap("F11", "sudetia")
profile_keymap("F12", "default")
profile_keymap("F11", "sudetia")
profile_keymap("F12", "default")
+-- }}} profiles
+-- }}}
+
+-- {{{ write mail backups
+
local function write_mail_backup()
local tmpdir = vim.fn.expand(os.getenv("TMPDIR") or "/tmp") .. "/mail-backups"
vim.fn.mkdir(tmpdir, "p", "0o700")
local function write_mail_backup()
local tmpdir = vim.fn.expand(os.getenv("TMPDIR") or "/tmp") .. "/mail-backups"
vim.fn.mkdir(tmpdir, "p", "0o700")
-vim.cmd.runtime("greeting_abbrevs.vim")
+-- }}}
+
+-- {{{ mail area detect
local function mail_area_detect()
local ts = vim.treesitter
local function mail_area_detect()
local ts = vim.treesitter
return
end
if node:type():find("^body") ~= nil then
return
end
if node:type():find("^body") ~= nil then
- vim.opt_local.formatoptions:append("a")
- vim.opt_local.formatoptions:append("w")
- vim.opt_local.formatoptions:append("n")
- vim.opt_local.formatoptions:append("t")
- vim.opt_local.formatoptions:append("c")
+ vim.opt_local.formatoptions:append("a") -- turn on auto-reflow
+ vim.opt_local.formatoptions:append("w") -- trailing whitespace for format=flowed
+ vim.opt_local.formatoptions:append("n") -- numbered lists
+ vim.opt_local.formatoptions:append("t") -- autowrap with textwidth
+ vim.opt_local.formatoptions:append("c") -- autowrap and insert quote (comment) leader
vim.w.in_body = true
else
vim.opt_local.formatoptions:remove("a")
vim.w.in_body = true
else
vim.opt_local.formatoptions:remove("a")
callback = mail_area_detect,
})
mail_area_detect()
callback = mail_area_detect,
})
mail_area_detect()
+
+vim.cmd.runtime("greeting_abbrevs.vim")
+
+-- }}}
+
+-- vim:foldmethod=marker:foldlevel=0
"conform.nvim": { "branch": "master", "commit": "372fc521f8421b7830ea6db4d6ea3bae1c77548c" },
"flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
"conform.nvim": { "branch": "master", "commit": "372fc521f8421b7830ea6db4d6ea3bae1c77548c" },
"flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
- "gitsigns.nvim": { "branch": "main", "commit": "fd50977fce4d5240b910d2b816e71fb726cbbaf7 " },
+ "gitsigns.nvim": { "branch": "main", "commit": "ee28ba3e70ecea811b8f6d7b51d81976e94b121c " },
"grug-far.nvim": { "branch": "main", "commit": "6ff8a205a29db3a9b08e5debe09452b4d6fd6591" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
"grug-far.nvim": { "branch": "main", "commit": "6ff8a205a29db3a9b08e5debe09452b4d6fd6591" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },