feat(markdown): add nicer viewing options

This commit is contained in:
Lucas Barbieri 2024-07-27 08:29:39 -03:00
parent 072c9771a5
commit 6c28c5e9b7
3 changed files with 13 additions and 9 deletions

View File

@ -3,5 +3,7 @@ return {
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
ft = { "markdown" },
build = function() vim.fn["mkdp#util#install"]() end,
config = function()
vim.g.mkdp_browser = '/usr/bin/qutebrowser'
end
}

View File

@ -35,8 +35,6 @@ keymap.set("n", "<leader>x", "<cmd>!chmod +x %<CR>", { silent = true, desc = "ch
keymap.set("n", "<leader>cm", "<cmd>make<CR>", { desc = "run make command" })
keymap.set("n", "<leader>cc", "<cmd>!gcc -o %< % && %< <CR>", { desc = "compile current file and execute it" })
keymap.set("t", "<leader><Esc>", [[<C-\><C-n>]], { desc = "exit insert mode on builtin terminal" })
keymap.set("n", "<leader>Sv", "<C-w>v", { desc = "create split vertically" })
keymap.set("n", "<leader>Sh", "<C-w>s", { desc = "create split horizontally" })
keymap.set("n", "<leader>Se", "<C-w>=", { desc = "even out buffers" })

View File

@ -36,12 +36,6 @@ autocmd({ "WinEnter" }, { pattern = "*", callback = function() vim.opt.colorcolu
-- disable bar any%
-- vim.opt.laststatus = 0
autocmd("Filetype", {
pattern = "norg",
callback = function()
vim.opt.wrap = true
end
})
autocmd("Filetype", {
pattern = "*",
@ -50,6 +44,16 @@ autocmd("Filetype", {
end
})
autocmd("Filetype", {
pattern = "markdown",
callback = function()
vim.opt.wrap = true
vim.o.formatoptions = "l"
vim.o.breakindent = true
vim.o.lbr = true
end
})
vim.g.mapleader = " "
-- Case insensitive searching UNLESS /C or capital in search