up
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
-- Buffer group mappings
|
||||
-- buffer group mappings
|
||||
--
|
||||
|
||||
local status_wk, wk = pcall(require, 'which-key')
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
-- Edition mappings
|
||||
--
|
||||
-- edition mappings
|
||||
--
|
||||
|
||||
local status_kh, kh = pcall(require, 'custom.plugins.keymaps-helper')
|
||||
if not status_kh then
|
||||
return
|
||||
@@ -8,18 +8,5 @@ end
|
||||
|
||||
kh.map({ 'n', 'v', 'i' }, '<C-z>', '<CMD>undo<CR>', { silent = true, noremap = true, desc = 'Undo' })
|
||||
|
||||
-- local status_wk, wk = pcall(require, 'which-key')
|
||||
-- if not status_wk then
|
||||
-- return
|
||||
-- end
|
||||
--
|
||||
-- wk.add {
|
||||
-- {
|
||||
-- mode = { 'n', 'v', 'i' },
|
||||
-- -- mapping runs here as which-key intercepts ctrl-z signal before term
|
||||
-- { '<C-z>', '<CMD>undo<CR>', desc = 'Undo', silent = true, noremap = true, hidden = true },
|
||||
-- },
|
||||
-- }
|
||||
|
||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||
-- vim: ts=2 sts=2 sw=2 et
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- Neo-tree mappings
|
||||
-- file explorer mappings
|
||||
--
|
||||
|
||||
local status_wk, wk = pcall(require, 'which-key')
|
||||
@@ -1,4 +1,4 @@
|
||||
-- General mappings
|
||||
-- general mappings
|
||||
--
|
||||
|
||||
local status_kh, kh = pcall(require, 'custom.plugins.keymaps-helper')
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- Key mappings groups
|
||||
-- key mappings groups
|
||||
--
|
||||
|
||||
local status_wk, wk = pcall(require, 'which-key')
|
||||
@@ -12,6 +12,7 @@ wk.add {
|
||||
mode = { 'n' },
|
||||
{ '<leader>s', group = '[s]earch' },
|
||||
{ '<leader>t', group = '[t]oggles' },
|
||||
{ '<leader>T', group = '[T]erminal' },
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
@@ -5,11 +5,12 @@ require 'custom.keymaps.nop'
|
||||
require 'custom.keymaps.groups'
|
||||
require 'custom.keymaps.general'
|
||||
require 'custom.keymaps.buffers'
|
||||
require 'custom.keymaps.files'
|
||||
require 'custom.keymaps.explore'
|
||||
require 'custom.keymaps.edit'
|
||||
require 'custom.keymaps.search'
|
||||
require 'custom.keymaps.toggles'
|
||||
require 'custom.keymaps.obsidian'
|
||||
require 'custom.keymaps.terminal'
|
||||
|
||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||
-- vim: ts=2 sts=2 sw=2 et
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- Deactivated key mappings
|
||||
-- deactivated key mappings
|
||||
--
|
||||
|
||||
local status_wk, wk = pcall(require, 'which-key')
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- Obsidian mappings
|
||||
-- obsidian mappings
|
||||
--
|
||||
|
||||
local status_wk, wk = pcall(require, 'which-key')
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- Search group mappings
|
||||
-- search group mappings
|
||||
--
|
||||
|
||||
local wk = require 'which-key'
|
||||
|
||||
26
lua/custom/keymaps/terminal.lua
Normal file
26
lua/custom/keymaps/terminal.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
-- terminal mappings
|
||||
--
|
||||
|
||||
local status_wk, wk = pcall(require, 'which-key')
|
||||
if not status_wk then
|
||||
return
|
||||
end
|
||||
|
||||
local status_th, th = pcall(require, 'custom.plugins.term-helper')
|
||||
if not status_th then
|
||||
return
|
||||
end
|
||||
|
||||
wk.add {
|
||||
{
|
||||
mode = { 'n', 'v', 'i' },
|
||||
{ '<leader>Ti', th.new_terminal_ipython, desc = 'new [i]python terminal', silent = true, noremap = true },
|
||||
{ '<leader>Tj', th.new_terminal_julia, desc = 'new [j]ulia terminal', silent = true, noremap = true },
|
||||
{ '<leader>Ts', th.new_terminal_shell, desc = 'new terminal with [s]hell', silent = true, noremap = true },
|
||||
{ '<leader>Tp', th.new_terminal_python, desc = 'new [p]ython terminal', silent = true, noremap = true },
|
||||
{ '<leader>TR', th.new_terminal_r, desc = 'new [R] terminal', silent = true, noremap = true },
|
||||
},
|
||||
}
|
||||
|
||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||
-- vim: ts=2 sts=2 sw=2 et
|
||||
@@ -1,15 +1,35 @@
|
||||
-- Toggles group mappings
|
||||
-- toggles group mappings
|
||||
--
|
||||
|
||||
local wk = require 'which-key'
|
||||
local gitsigns = require 'gitsigns'
|
||||
|
||||
local function toggle_light_dark_theme()
|
||||
if vim.o.background == 'light' then
|
||||
vim.o.background = 'dark'
|
||||
else
|
||||
vim.o.background = 'light'
|
||||
end
|
||||
end
|
||||
|
||||
local function toggle_conceal()
|
||||
local lvl = vim.o.conceallevel
|
||||
if lvl > DefaultConcealLevel then
|
||||
vim.o.conceallevel = DefaultConcealLevel
|
||||
else
|
||||
vim.o.conceallevel = FullConcealLevel
|
||||
end
|
||||
end
|
||||
|
||||
wk.add {
|
||||
mode = { 'n' },
|
||||
-- gitsigns
|
||||
{ '<leader>tb', gitsigns.toggle_current_line_blame, desc = 'toggle git show [b]lame line' },
|
||||
{ '<leader>tD', gitsigns.preview_hunk_inline, desc = 'toggle git show [D]eleted' },
|
||||
{ '<leader>td', gitsigns.preview_hunk_inline, desc = 'toggle git show [d]eleted' },
|
||||
{ '<leader>tm', '<CMD>RenderMarkdown buf_toggle<CR>', desc = 'toggle [m]arkdown rendering for current' },
|
||||
{ '<leader>tt', toggle_light_dark_theme, desc = 'toggle light/dark [t]heme' },
|
||||
{ '<leader>tc', toggle_conceal, desc = 'toggle [c]onceal' },
|
||||
{ '<leader>tz', ':setlocal spell!<cr>', desc = 'toggle [z]pellcheck' },
|
||||
}
|
||||
|
||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||
|
||||
Reference in New Issue
Block a user