refine key mapping
This commit is contained in:
@@ -24,6 +24,7 @@
|
|||||||
"indent-rainbowline.nvim": { "branch": "master", "commit": "572e8157de85d7af3f0085b5c74c059518900649" },
|
"indent-rainbowline.nvim": { "branch": "master", "commit": "572e8157de85d7af3f0085b5c74c059518900649" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
"lazydev.nvim": { "branch": "main", "commit": "f59bd14a852ca43db38e3662395354cb2a9b13e0" },
|
"lazydev.nvim": { "branch": "main", "commit": "f59bd14a852ca43db38e3662395354cb2a9b13e0" },
|
||||||
|
"lua-console.nvim": { "branch": "main", "commit": "bdf40fdc2147d190688d5bfb6aa50d2b73418a64" },
|
||||||
"markview.nvim": { "branch": "main", "commit": "e6b0f5aee8105adab6077509c46459812db4cffa" },
|
"markview.nvim": { "branch": "main", "commit": "e6b0f5aee8105adab6077509c46459812db4cffa" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
|
||||||
"mason-null-ls.nvim": { "branch": "main", "commit": "2b8433f76598397fcc97318d410e0c4f7a4bea6a" },
|
"mason-null-ls.nvim": { "branch": "main", "commit": "2b8433f76598397fcc97318d410e0c4f7a4bea6a" },
|
||||||
|
@@ -35,11 +35,14 @@ return {
|
|||||||
-- navigate buffer tabs
|
-- navigate buffer tabs
|
||||||
-- ["]b"] = { function() require("astrocore.buffer").nav(vim.v.count1) end, desc = "Next buffer" },
|
-- ["]b"] = { function() require("astrocore.buffer").nav(vim.v.count1) end, desc = "Next buffer" },
|
||||||
-- ["[b"] = { function() require("astrocore.buffer").nav(-vim.v.count1) end, desc = "Previous buffer" },
|
-- ["[b"] = { function() require("astrocore.buffer").nav(-vim.v.count1) end, desc = "Previous buffer" },
|
||||||
["<leader>a"] = { function() require("astrocore.buffer").nav(vim.v.count1) end, desc = "Next buffer" },
|
["<leader>a"] = { function() require("astrocore.buffer").nav(-vim.v.count1) end, desc = "Previous buffer" },
|
||||||
["<leader>;"] = { function() require("astrocore.buffer").nav(-vim.v.count1) end, desc = "Previous buffer" },
|
["<leader>;"] = { function() require("astrocore.buffer").nav(vim.v.count1) end, desc = "Next buffer" },
|
||||||
["<Tab>"] = { function() require("astrocore.buffer").nav(vim.v.count1) end, desc = "Next buffer" },
|
["<Tab>"] = { function() require("astrocore.buffer").nav(vim.v.count1) end, desc = "Next buffer" },
|
||||||
["<S-Tab>"] = { function() require("astrocore.buffer").nav(-vim.v.count1) end, desc = "Previous buffer" },
|
["<S-Tab>"] = { function() require("astrocore.buffer").nav(-vim.v.count1) end, desc = "Previous buffer" },
|
||||||
|
|
||||||
|
-- show file path
|
||||||
|
["<leader>fP"] = { function() print(vim.fn.expand "%:p") end, desc = "Show file path" },
|
||||||
|
|
||||||
-- mappings seen under group name "Buffer"
|
-- mappings seen under group name "Buffer"
|
||||||
-- ["<Leader>bd"] = {
|
-- ["<Leader>bd"] = {
|
||||||
-- function()
|
-- function()
|
||||||
|
11
lua/plugins/lua_console.lua
Normal file
11
lua/plugins/lua_console.lua
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
if true then return {} end
|
||||||
|
|
||||||
|
return {
|
||||||
|
"yarospace/lua-console.nvim",
|
||||||
|
lazy = true,
|
||||||
|
keys = {
|
||||||
|
{ "`", desc = "Lua-console - toggle", mode = { "t", "n" } },
|
||||||
|
{ "<Leader>`", desc = "Lua-console - attach to buffer" },
|
||||||
|
},
|
||||||
|
opts = {},
|
||||||
|
}
|
@@ -12,14 +12,33 @@ return {
|
|||||||
{
|
{
|
||||||
",tt",
|
",tt",
|
||||||
function()
|
function()
|
||||||
local size = vim.o.lines * 0.4
|
local term = require "toggleterm.terminal"
|
||||||
require("toggleterm").toggle(nil, size)
|
local id = term.get_focused_id()
|
||||||
|
local last = term.get_last_focused()
|
||||||
|
if id then
|
||||||
|
require("toggleterm").toggle(id)
|
||||||
|
elseif last then
|
||||||
|
require("toggleterm").toggle(last.id)
|
||||||
|
else
|
||||||
|
require("astrocore").notify("No terminal is opening", vim.log.levels.INFO, { title = "Toggle Term" })
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
mode = { "n", "t" },
|
mode = { "n", "t" },
|
||||||
desc = "Toggle terminal horizontal",
|
desc = "Toggle terminal",
|
||||||
},
|
},
|
||||||
{ ",tn", "<Cmd>ToggleTerm direction=tab<CR>", desc = "Toggle terminal in tab" },
|
-- select
|
||||||
{ ",tN", "<Cmd>TermNew direction=tab<CR>", desc = "New terminal in tab" },
|
{ ",ts", "<Cmd>TermSelect<CR>", desc = "Select Terminal", mode = { "t", "n" } },
|
||||||
|
|
||||||
|
-- toggle
|
||||||
|
{ ",tf", "<Cmd>ToggleTerm direction=float<CR>", desc = "Toggle terminal float", mode = { "t", "n" } },
|
||||||
|
-- { ",tn", "<Cmd>ToggleTerm direction=tab<CR>", desc = "Toggle terminal in tab" },
|
||||||
|
|
||||||
|
-- new
|
||||||
|
{ ",tn", desc = "New terminal" },
|
||||||
|
{ ",tnt", "<Cmd>TermNew name=tab direction=tab<CR>", desc = "New terminal in tab" },
|
||||||
|
{ ",tnh", "<Cmd>TermNew name=horiz direction=horizontal<CR>", desc = "New horizontal terminal" },
|
||||||
|
{ ",tnv", "<Cmd>TermNew name=verti direction=vertical<CR>", desc = "New vertical terminal" },
|
||||||
|
{ ",tnf", "<Cmd>TermNew name=float direction=float<CR>", desc = "New float terminal" },
|
||||||
|
|
||||||
{ "<C-Up>", "<Cmd>resize +2<CR>", desc = "Resize terminal up", mode = "t" },
|
{ "<C-Up>", "<Cmd>resize +2<CR>", desc = "Resize terminal up", mode = "t" },
|
||||||
{ "<C-Down>", "<Cmd>resize -2<CR>", desc = "Resize terminal down", mode = "t" },
|
{ "<C-Down>", "<Cmd>resize -2<CR>", desc = "Resize terminal down", mode = "t" },
|
||||||
|
Reference in New Issue
Block a user