You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
require("transparent")
|
|
|
|
|
|
|
|
vim.g.mapleader = " "
|
|
|
|
|
|
|
|
vim.keymap.set("n", "<leader>b", ":lua ToggleTransparent()<CR>")
|
|
|
|
|
|
|
|
-- nvim-tree bindings
|
|
|
|
|
|
|
|
vim.keymap.set("n", "<leader>t", ":NvimTreeToggle<CR>")
|
|
|
|
|
|
|
|
vim.keymap.set("n", "<leader>a", ":lua SpellToggle()<CR>")
|
|
|
|
|
|
|
|
-- toggle spell check
|
|
|
|
function SpellToggle()
|
|
|
|
if vim.o.spell == nil or vim.o.spell then
|
|
|
|
vim.o.spell = false
|
|
|
|
else
|
|
|
|
vim.o.spell = true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
-- markdown preview
|
|
|
|
|
|
|
|
vim.keymap.set("n", "<leader>p", ":MarkdownPreviewToggle<CR>")
|
|
|
|
|
|
|
|
-- custom shell script to move windows
|
|
|
|
vim.cmd([[
|
|
|
|
function OpenMarkdownPreview (url)
|
|
|
|
execute "silent ! markdown-preview.sh " . a:url
|
|
|
|
endfunction
|
|
|
|
]])
|
|
|
|
|
|
|
|
vim.g.mkdp_browserfunc = 'OpenMarkdownPreview'
|
|
|
|
|
|
|
|
-- git actions
|
|
|
|
vim.keymap.set("n", "<leader>ga", ":Git add .<CR>")
|
|
|
|
vim.keymap.set("n", "<leader>gm", ":Git commit<CR>")
|
|
|
|
|