nvim-config/lua/commands.lua
Michael Peters 65d16b0062 Merge branch 'master' into home
Conflicts:
	lua/commands.lua
2022-11-23 18:49:45 -08:00

21 lines
724 B
Lua

-- Make it easier to run black
vim.api.nvim_create_user_command('Black', 'call Black()', {})
-- Insert IPDB statement
vim.api.nvim_create_user_command('IPDB', 'norm oimport ipdb; ipdb.set_trace() # fmt:skip', {})
-- Format the document
vim.api.nvim_create_user_command('Format', 'lua vim.lsp.buf.format()', {})
local function gitblame_toggle_summary()
local normal = '<author> • <date>'
local with_summary = '<summary> • <author> • <date>'
if vim.g.gitblame_message_template == normal then
vim.g.gitblame_message_template = with_summary
else
vim.g.gitblame_message_template = normal
end
end
vim.api.nvim_create_user_command('GitBlameToggleSummary', gitblame_toggle_summary, {})