⚙️ config(nvim): new autocmd to fix telescope issue and binding to change color variant
This commit is contained in:
parent
30f53826a5
commit
b279eccf16
2 changed files with 14 additions and 0 deletions
|
@ -14,6 +14,15 @@ vim.api.nvim_create_autocmd("BufRead", {
|
|||
end,
|
||||
})
|
||||
|
||||
-- Fix telescope entering on insert mode
|
||||
vim.api.nvim_create_autocmd("WinLeave", {
|
||||
callback = function()
|
||||
if vim.bo.ft == "TelescopePrompt" and vim.fn.mode() == "i" then
|
||||
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("<Esc>", true, false, true), "i", false)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- start git messages in insert mode
|
||||
vim.api.nvim_create_autocmd("BufRead", {
|
||||
pattern = { "gitcommit", "gitrebase" },
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||
-- Add any additional keymaps here
|
||||
local map = vim.keymap.set
|
||||
local Util = require("lazyvim.util")
|
||||
|
||||
-- ╭───────────────────────────────────────────────────────────╮
|
||||
-- │ Credit: June Gunn <Leader>?/! | Google it / Feeling lucky │
|
||||
|
@ -26,6 +27,10 @@ map("x", "<leader>?", function()
|
|||
google(vim.fn.getreg("g"), false)
|
||||
end, { desc = "Google" })
|
||||
|
||||
map("n", "<leader>uB", function()
|
||||
Util.toggle("background", false, { "light", "dark" })
|
||||
end, { desc = "Toggle Background" })
|
||||
|
||||
map("n", "<leader>fT", "<Nop>")
|
||||
|
||||
map("n", "<C-d>", "<C-d>zz")
|
||||
|
|
Loading…
Add table
Reference in a new issue