mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-21 08:35:48 +02:00
add: tabaction key mapping
This commit is contained in:
parent
df209391f6
commit
6acb3af8ab
3 changed files with 51 additions and 14 deletions
|
@ -11,6 +11,7 @@
|
|||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||
"code_runner.nvim": { "branch": "main", "commit": "baea3a97c02276bff92b235f4e0d9fd8909d0d04" },
|
||||
"codeium.vim": { "branch": "main", "commit": "bef9cbaa5c19ab85d8048f364bfc0ac8c7ab335d" },
|
||||
"dracula.nvim": { "branch": "main", "commit": "8d8bddb8814c3e7e62d80dda65a9876f97eb699c" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "42d767b04c50a6966c9633e3968bc65c0c2f2bfc" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "dcd4a586439a1c81357d5b9d26319ae218cc9479" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "6ef8c54fb526bf3a0bc4efb0b2fe8e6d9a7daed2" },
|
||||
|
@ -18,7 +19,7 @@
|
|||
"lazy.nvim": { "branch": "main", "commit": "83493db50a434a4c5c648faf41e2ead80f96e478" },
|
||||
"lsp-progress.nvim": { "branch": "main", "commit": "1c37b1cd0611563a767f0a340d61f265c4c54ecd" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "af4c3cf17206810880d2a93562e0a4c0d901c684" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "2ba17cecfde8b8c7c7c287909a1e4de895223df6" },
|
||||
"mason-null-ls.nvim": { "branch": "main", "commit": "e270134d83ba59425edc53356c6fd337b61bb8dd" },
|
||||
"mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
|
||||
"mini.animate": { "branch": "main", "commit": "82519630b2760ffc516ebc387bef632f9c07b9f5" },
|
||||
|
@ -42,7 +43,6 @@
|
|||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "7ab799a9792f7cf3883cf28c6a00ad431f3d382a" },
|
||||
"nvim-ts-rainbow2": { "branch": "master", "commit": "b3120cd5ae9ca524af9cb602f41e12e301fa985f" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "a55b801b7ef5719ca25692c3a0a5447fdfb692ed" },
|
||||
"onedark.nvim": { "branch": "master", "commit": "1230aaf2a427b2c5b73aba6e4a9a5881d3e69429" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
|
||||
"smart-splits.nvim": { "branch": "master", "commit": "f6fcb79527872e9330c554915af2ca511c388390" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "f06eeb79e14d5c95745558927c5b1f341c0a3a28" },
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
-- catppuccin, catppuccin-latte, catppuccin-frappe, catppuccin-macchiato, catppuccin-mocha
|
||||
-- dracula
|
||||
-- nightfox, dayfox, dawnfox, duskfox, nordfox, terafox, carbonfox
|
||||
vim.g.pcode_colorscheme = "onedark"
|
||||
vim.g.pcode_colorscheme = "dracula"
|
||||
|
||||
-- custom transparent mode
|
||||
-- only support
|
||||
|
|
|
@ -94,6 +94,22 @@ function _SET_TAB_TITLE()
|
|||
vim.cmd('silent !wezterm cli set-tab-title "' .. _get_folder_name() .. '"')
|
||||
end
|
||||
|
||||
function _CLOSE_BUFFER()
|
||||
local buf = vim.api.nvim_get_current_buf()
|
||||
-- delete current buffer
|
||||
require("bufdelete").bufdelete(buf, true)
|
||||
end
|
||||
|
||||
-- function for close all bufferline
|
||||
function _CLOSE_ALL_BUFFER()
|
||||
-- get all buffer
|
||||
local bufs = vim.api.nvim_list_bufs()
|
||||
-- loop through all buffer
|
||||
for _, buf in pairs(bufs) do
|
||||
require("bufdelete").bufdelete(buf, true)
|
||||
end
|
||||
end
|
||||
|
||||
local setup = {
|
||||
plugins = {
|
||||
marks = true, -- shows a list of your marks on ' and `
|
||||
|
@ -188,12 +204,6 @@ local debug_key = {}
|
|||
-- local trasparant = {}
|
||||
-- local is_dap = pcall(require, "dap")
|
||||
|
||||
function _close_buffer()
|
||||
local buf = vim.api.nvim_get_current_buf()
|
||||
-- delete current buffer
|
||||
require("bufdelete").bufdelete(buf, true)
|
||||
end
|
||||
|
||||
-- local trans_ok, _ = pcall(require, "transparent")
|
||||
-- if trans_ok then
|
||||
-- trasparant = { "<cmd>TransparentToggle<cr>", "Toggle Transparency" }
|
||||
|
@ -225,16 +235,12 @@ local mappings2 = {
|
|||
local mappings = {
|
||||
-- ["c"] = trasparant,
|
||||
["a"] = { "<cmd>Alpha<cr>", " Alpha" },
|
||||
["b"] = {
|
||||
"<cmd>lua require('telescope.builtin').buffers(require('telescope.themes').get_dropdown{previewer = false})<cr>",
|
||||
" Buffers",
|
||||
},
|
||||
--["e"] = { "<cmd>NvimTreeToggle<cr>", "Explorer" },
|
||||
["e"] = { "<cmd>NvimTreeToggle<cr>", " Explorer" },
|
||||
["w"] = { "<cmd>w!<CR>", " Save" },
|
||||
["q"] = { "<cmd>q!<CR>", " Quit" },
|
||||
-- ["c"] = { "<cmd>Bdelete!<CR>", " Close Buffer" },
|
||||
["k"] = { "<cmd>lua _close_buffer()<CR>", " Close Buffer" },
|
||||
-- ["k"] = { "<cmd>lua _close_buffer()<CR>", " Close Buffer" },
|
||||
-- open exloler and close toggleterm
|
||||
["o"] = { "<cmd>lua _OPEN_EXPLORER()<cr><cmd>lua require('toggleterm').toggle()<cr>", " Open Explorer" },
|
||||
["h"] = { "<cmd>nohlsearch<CR>", " No Highlight" },
|
||||
|
@ -266,6 +272,37 @@ local mappings = {
|
|||
-- u = { "<cmd>PackerUpdate<cr>", "Update" },
|
||||
-- },
|
||||
|
||||
b = {
|
||||
name = " Buffers",
|
||||
-- show all buffers with telescope
|
||||
b = {
|
||||
"<cmd>lua require('telescope.builtin').buffers(require('telescope.themes').get_dropdown{previewer = false})<cr>",
|
||||
"All Buffer",
|
||||
},
|
||||
-- close current active buffer
|
||||
c = { "<cmd>bd!<cr>", "Close current buffer" },
|
||||
-- bufferline close left
|
||||
d = {
|
||||
"<cmd>BufferLineCloseLeft<cr>",
|
||||
"Buffer close left",
|
||||
},
|
||||
-- bufferline close right
|
||||
D = {
|
||||
"<cmd>BufferLineCloseRight<cr>",
|
||||
"Buffer close right",
|
||||
},
|
||||
-- bufferline close others
|
||||
a = {
|
||||
"<cmd>BufferLineCloseOthers<cr>",
|
||||
"Buffer close others",
|
||||
},
|
||||
-- close all bufferline
|
||||
A = {
|
||||
"<cmd>BufferLineCloseOthers<cr><cmd>bd!<cr>",
|
||||
"Buffer close All Buffer",
|
||||
},
|
||||
},
|
||||
|
||||
g = {
|
||||
name = " Git",
|
||||
g = { "<cmd>lua _LAZYGIT_TOGGLE()<CR>", "Lazygit" },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue