feat: GBrowse

This commit is contained in:
2024-01-05 01:25:40 +02:00
parent 4e35dccff5
commit 4abbf0514c
3 changed files with 13 additions and 2 deletions

View File

@@ -1,5 +1,16 @@
-- Global (non-buffer) fugitive mappings
vim.keymap.set('n', '<leader>gs', vim.cmd.Git, { desc = '[fugitive] status' })
vim.keymap.set("n", "<leader>gb", ":Git blame<CR>", { silent = true, desc = "[fugitive] blame" })
vim.keymap.set("n", "<leader>gB", ":GBrowse<CR>", { silent = true, desc = "[G]it [B]rowse current file/line" })
vim.api.nvim_create_user_command(
"Browse",
function(opts)
local current_row = vim.fn.line(".")
local current_col = vim.fn.col(".")
local cmd = [[!open -u "]] .. opts.args .. [[\#L]] .. current_row .. [[:]] .. current_col .. [["]]
vim.cmd(cmd, { silent = true })
end,
{ nargs = 1, force = true })
local casraf_fugitive = vim.api.nvim_create_augroup("casraf_fugitive", {})

View File

@@ -1,4 +1,4 @@
vim.keymap.set("n", "<leader>lr", ":LspRestart<CR>", { desc = "[R]estart [L]SP" })
vim.keymap.set("n", "<leader>lr", ":LspRestart<CR>", { desc = "[L]SP [R]estart" })
-- [[ Configure LSP ]]
-- This function gets run when an LSP connects to a particular buffer.
local on_attach = function(_, bufnr)

View File

@@ -26,7 +26,7 @@ end ]]
-- This is where you actually apply your config choices
config.font = wezterm.font_with_fallback({
{ family = "MesloLGS Nerd Font", weight = "Medium", harfbuzz_features = { 'zero' } },
{ family = "MesloLGS Nerd Font", weight = "Medium" },
{ family = "FiraCode Nerd Font", weight = "Medium", harfbuzz_features = { 'zero' } },