my ripoff of LazyVim/ upgrade to lazy.nvim is complete... for now

This commit is contained in:
Solomon Laing 2023-01-11 22:26:46 +10:30
parent de19c7bc39
commit 1a984d2e0f
11 changed files with 322 additions and 350 deletions

View File

@ -1,128 +1,128 @@
local status_ok, telescope = pcall(require, "telescope") local status_ok, telescope = pcall(require, "telescope")
if not status_ok then if not status_ok then
return return
end end
local actions = require "telescope.actions" local actions = require("telescope.actions")
local icons = require "chris.icons" local icons = require("chris.icons")
telescope.setup { telescope.setup({
defaults = { defaults = {
prompt_prefix = icons.ui.Telescope .. " > ", prompt_prefix = icons.ui.Telescope .. " > ",
selection_caret = "", selection_caret = "",
path_display = { "smart" }, path_display = { "smart" },
file_ignore_patterns = { file_ignore_patterns = {
".git/", ".git/",
"target/", "target/",
"docs/", "docs/",
"vendor/*", "vendor/*",
"%.lock", "%.lock",
"__pycache__/*", "__pycache__/*",
"%.sqlite3", "%.sqlite3",
"%.ipynb", "%.ipynb",
"node_modules/*", "node_modules/*",
"%.svg", "%.svg",
"%.otf", "%.otf",
"%.ttf", "%.ttf",
"%.webp", "%.webp",
".dart_tool/", ".dart_tool/",
".github/", ".github/",
".gradle/", ".gradle/",
".idea/", ".idea/",
".settings/", ".settings/",
".vscode/", ".vscode/",
"__pycache__/", "__pycache__/",
"build/", "build/",
"env/", "env/",
"gradle/", "gradle/",
"node_modules/", "node_modules/",
"%.pdb", "%.pdb",
"%.dll", "%.dll",
"%.class", "%.class",
"%.exe", "%.exe",
"%.cache", "%.cache",
"%.ico", "%.ico",
"%.pdf", "%.pdf",
"%.dylib", "%.dylib",
"%.jar", "%.jar",
"%.docx", "%.docx",
"%.met", "%.met",
"smalljre_*/*", "smalljre_*/*",
".vale/", ".vale/",
"%.burp", "%.burp",
"%.mp4", "%.mp4",
"%.mkv", "%.mkv",
"%.rar", "%.rar",
"%.zip", "%.zip",
"%.7z", "%.7z",
"%.tar", "%.tar",
"%.bz2", "%.bz2",
"%.epub", "%.epub",
"%.flac", "%.flac",
"%.tar.gz", "%.tar.gz",
}, },
mappings = { mappings = {
i = { i = {
["<C-n>"] = actions.cycle_history_next, ["<C-n>"] = actions.cycle_history_next,
["<C-p>"] = actions.cycle_history_prev, ["<C-p>"] = actions.cycle_history_prev,
["<C-j>"] = actions.move_selection_next, ["<C-j>"] = actions.move_selection_next,
["<C-k>"] = actions.move_selection_previous, ["<C-k>"] = actions.move_selection_previous,
["<C-c>"] = actions.close, ["<C-c>"] = actions.close,
["<Down>"] = actions.move_selection_next, ["<Down>"] = actions.move_selection_next,
["<Up>"] = actions.move_selection_previous, ["<Up>"] = actions.move_selection_previous,
["<CR>"] = actions.select_default, ["<CR>"] = actions.select_default,
["<C-s>"] = actions.select_horizontal, ["<C-s>"] = actions.select_horizontal,
["<C-v>"] = actions.select_vertical, ["<C-v>"] = actions.select_vertical,
["<C-t>"] = actions.select_tab, ["<C-t>"] = actions.select_tab,
["<c-d>"] = require("telescope.actions").delete_buffer, ["<c-d>"] = require("telescope.actions").delete_buffer,
["<C-u>"] = actions.preview_scrolling_up, ["<C-u>"] = actions.preview_scrolling_up,
["<C-d>"] = actions.preview_scrolling_down, ["<C-d>"] = actions.preview_scrolling_down,
["<C-l>"] = actions.complete_tag, ["<C-l>"] = actions.complete_tag,
["<C-h>"] = actions.which_key, -- keys from pressing <C-h> ["<C-h>"] = actions.which_key, -- keys from pressing <C-h>
["<esc>"] = actions.close, ["<esc>"] = actions.close,
}, },
n = { n = {
["<esc>"] = actions.close, ["<esc>"] = actions.close,
["<CR>"] = actions.select_default, ["<CR>"] = actions.select_default,
["<C-x>"] = actions.select_horizontal, ["<C-x>"] = actions.select_horizontal,
["<C-v>"] = actions.select_vertical, ["<C-v>"] = actions.select_vertical,
["<C-t>"] = actions.select_tab, ["<C-t>"] = actions.select_tab,
["j"] = actions.move_selection_next, ["j"] = actions.move_selection_next,
["k"] = actions.move_selection_previous, ["k"] = actions.move_selection_previous,
["H"] = actions.move_to_top, ["H"] = actions.move_to_top,
["M"] = actions.move_to_middle, ["M"] = actions.move_to_middle,
["L"] = actions.move_to_bottom, ["L"] = actions.move_to_bottom,
["q"] = actions.close, ["q"] = actions.close,
["dd"] = require("telescope.actions").delete_buffer, ["dd"] = require("telescope.actions").delete_buffer,
["s"] = actions.select_horizontal, ["s"] = actions.select_horizontal,
["v"] = actions.select_vertical, ["v"] = actions.select_vertical,
["t"] = actions.select_tab, ["t"] = actions.select_tab,
["<Down>"] = actions.move_selection_next, ["<Down>"] = actions.move_selection_next,
["<Up>"] = actions.move_selection_previous, ["<Up>"] = actions.move_selection_previous,
["gg"] = actions.move_to_top, ["gg"] = actions.move_to_top,
["G"] = actions.move_to_bottom, ["G"] = actions.move_to_bottom,
["<C-u>"] = actions.preview_scrolling_up, ["<C-u>"] = actions.preview_scrolling_up,
["<C-d>"] = actions.preview_scrolling_down, ["<C-d>"] = actions.preview_scrolling_down,
["<PageUp>"] = actions.results_scrolling_up, ["<PageUp>"] = actions.results_scrolling_up,
["<PageDown>"] = actions.results_scrolling_down, ["<PageDown>"] = actions.results_scrolling_down,
["?"] = actions.which_key, ["?"] = actions.which_key,
}, },
}, },
}, },
} })

View File

@ -3,114 +3,114 @@
-- or go here and upload the font file: https://mathew-kurian.github.io/CharacterMap/ -- or go here and upload the font file: https://mathew-kurian.github.io/CharacterMap/
-- find more here: https://www.nerdfonts.com/cheat-sheet -- find more here: https://www.nerdfonts.com/cheat-sheet
return { return {
kind = { kind = {
Text = "", Text = "",
-- Method = "m", -- Method = "m",
Function = "", Function = "",
-- Constructor = "", -- Constructor = "",
Method = "", Method = "",
-- Function = "", -- Function = "",
Constructor = "", Constructor = "",
Field = "", Field = "",
-- Variable = "", -- Variable = "",
Variable = "", Variable = "",
Namespace = "", Namespace = "",
Class = "", Class = "",
Interface = "", Interface = "",
-- Module = "", -- Module = "",
Module = "", Module = "",
Property = "", Property = "",
Unit = "", Unit = "",
Value = "", Value = "",
Enum = "", Enum = "",
Key = "k", Key = "k",
-- Keyword = "", -- Keyword = "",
Keyword = "", Keyword = "",
-- Snippet = "", -- Snippet = "",
Snippet = "", Snippet = "",
Color = "", Color = "",
File = "", File = "",
Reference = "", Reference = "",
Folder = "", Folder = "",
EnumMember = "", EnumMember = "",
Constant = "", Constant = "",
Struct = "", Struct = "",
Event = "", Event = "",
Operator = "", Operator = "",
TypeParameter = "", TypeParameter = "",
}, },
type = { type = {
Array = "", Array = "",
Number = "", Number = "",
String = "", String = "",
Boolean = "", Boolean = "",
Null = "", Null = "",
Object = "", Object = "",
}, },
documents = { documents = {
File = "", File = "",
Files = "", Files = "",
Folder = "", Folder = "",
OpenFolder = "", OpenFolder = "",
}, },
git = { git = {
Add = "", Add = "",
Mod = "", Mod = "",
Remove = "", Remove = "",
Ignore = "", Ignore = "",
Rename = "", Rename = "",
Diff = "", Diff = "",
Repo = "", Repo = "",
Octoface = "", Octoface = "",
}, },
ui = { ui = {
ArrowClosed = "", ArrowClosed = "",
ArrowOpen = "", ArrowOpen = "",
Lock = "", Lock = "",
Circle = "", Circle = "",
BigCircle = "", BigCircle = "",
BigUnfilledCircle = "", BigUnfilledCircle = "",
Close = "", Close = "",
NewFile = "", NewFile = "",
Search = "", Search = "",
Lightbulb = "", Lightbulb = "",
Project = "", Project = "",
Dashboard = "", Dashboard = "",
History = "", History = "",
Comment = "", Comment = "",
Bug = "", Bug = "",
Code = "", Code = "",
Telescope = "", Telescope = "",
Gear = "", Gear = "",
Package = "", Package = "",
List = "", List = "",
SignIn = "", SignIn = "",
SignOut = "", SignOut = "",
Check = "", Check = "",
Fire = "", Fire = "",
Note = "", Note = "",
BookMark = "", BookMark = "",
Pencil = "", Pencil = "",
-- ChevronRight = "", -- ChevronRight = "",
ChevronRight = ">", ChevronRight = ">",
Table = "", Table = "",
Calendar = "", Calendar = "",
CloudDownload = "", CloudDownload = "",
}, },
diagnostics = { diagnostics = {
Error = "", Error = "",
Warning = "", Warning = "",
Information = "", Information = "",
Question = "", Question = "",
Hint = "", Hint = "",
}, },
misc = { misc = {
Robot = "", Robot = "",
Squirrel = "", Squirrel = "",
Tag = "", Tag = "",
Watch = "", Watch = "",
Smiley = "", Smiley = "",
Package = "", Package = "",
CircuitBoard = "", CircuitBoard = "",
}, },
} }

View File

@ -2,8 +2,6 @@ local opts = { noremap = true, silent = true }
local map = vim.api.nvim_set_keymap local map = vim.api.nvim_set_keymap
map("n", "<Space>", "", opts)
-- better up/down -- better up/down
map("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true }) map("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
map("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) map("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })

View File

@ -1,6 +1,3 @@
vim.g.mapleader = " "
vim.g.maplocalleader = " "
local options = { local options = {
backup = false, -- creates a backup file backup = false, -- creates a backup file
clipboard = "unnamedplus", -- gives nvim access to clipboard clipboard = "unnamedplus", -- gives nvim access to clipboard

View File

@ -17,28 +17,23 @@ require("lazy").setup({
spec = "lazyvim.plugins", spec = "lazyvim.plugins",
defaults = { lazy = true, version = "*" }, defaults = { lazy = true, version = "*" },
checker = { enabled = true }, checker = { enabled = true },
performance = {
rtp = {
disabled_plugins = {
"gzip",
"matchit",
"matchparen",
"netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
}) })
vim.keymap.set("n", "<leader>L", "<cmd>:Lazy<cr>") -- map leader and register keymap for Lazy.
vim.g.mapleader = " "
vim.g.maplocalleader = " "
vim.api.nvim_set_keymap("n", "<leader>L", "<cmd>:Lazy<cr>", { desc = "Lazy GUI" })
local colorscheme = "base16-gruvbox-dark-medium" -- This might not be best, but it allows for easy resetting
ColorMe = function()
local colorscheme = "gruvbox-material"
local okay, _ = pcall(vim.cmd, "colorscheme " .. colorscheme) local okay, _ = pcall(vim.cmd, "colorscheme " .. colorscheme)
if not okay then if not okay then
vim.notify("Colorscheme " .. colorscheme .. " not found!") vim.notify("Colorscheme " .. colorscheme .. " not found!")
vim.cmd("colorsheme habamax")
end
end end
ColorMe()

View File

@ -29,8 +29,6 @@ return {
["<Tab>"] = cmp.mapping(function(fallback) ["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then if cmp.visible() then
cmp.select_next_item() cmp.select_next_item()
else
-- fallback()
end end
end, { end, {
"i", "i",
@ -39,8 +37,6 @@ return {
["<S-Tab>"] = cmp.mapping(function(fallback) ["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then if cmp.visible() then
cmp.select_prev_item() cmp.select_prev_item()
else
-- fallback()
end end
end, { end, {
"i", "i",

View File

@ -2,7 +2,7 @@ return {
{ {
"lewis6991/gitsigns.nvim", "lewis6991/gitsigns.nvim",
event = "BufReadPre", event = "BufReadPre",
opns = { opts = {
signs = { signs = {
add = { text = "" }, add = { text = "" },
change = { text = "" }, change = { text = "" },
@ -18,19 +18,19 @@ return {
vim.keymap.set(mode, l, r, { buffer = buffer, desc = desc }) vim.keymap.set(mode, l, r, { buffer = buffer, desc = desc })
end end
-- stylua: ignore start -- stylua: ignore start
map("n", "]h", gs.prev_hunk, "Next Hunk") map("n", "]h", gs.prev_hunk, "Next Hunk")
map("n", "[h", gs.next_hunk, "Prev Hunk") map("n", "[h", gs.next_hunk, "Prev Hunk")
map({ "n", "v" }, "<leader>ghs", ":Gitsigns stage_hunk<CR>", "Stage Hunk") map({ "n", "v" }, "<leader>ghs", ":Gitsigns stage_hunk<CR>", "Stage Hunk")
map({ "n", "v" }, "<leader>ghr", ":Gitsigns reset_hunk<CR>", "Reset Hunk") map({ "n", "v" }, "<leader>ghr", ":Gitsigns reset_hunk<CR>", "Reset Hunk")
map("n", "<leader>ghS", gs.stage_buffer, "Stage Buffer") map("n", "<leader>ghS", gs.stage_buffer, "Stage Buffer")
map("n", "<leader>ghu", gs.undo_stage_hunk, "Undo Stage Hunk") map("n", "<leader>ghu", gs.undo_stage_hunk, "Undo Stage Hunk")
map("n", "<leader>ghR", gs.reset_buffer, "Reset Buffer") map("n", "<leader>ghR", gs.reset_buffer, "Reset Buffer")
map("n", "<leader>ghp", gs.preview_hunk, "Preview Hunk") map("n", "<leader>ghp", gs.preview_hunk, "Preview Hunk")
map("n", "<leader>ghb", function() gs.blame_line({ full = true }) end, "Blame Line") map("n", "<leader>ghb", function() gs.blame_line({ full = true }) end, "Blame Line")
map("n", "<leader>ghd", gs.diffthis, "Diff This") map("n", "<leader>ghd", gs.diffthis, "Diff This")
map("n", "<leader>ghD", function() gs.diffthis("~") end, "Diff This ~") map("n", "<leader>ghD", function() gs.diffthis("~") end, "Diff This ~")
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>", "GitSigns Select Hunk") map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>", "GitSigns Select Hunk")
end, end,
}, },
}, },

View File

@ -17,7 +17,7 @@ return {
for name, section in pairs(sections) do for name, section in pairs(sections) do
local left = name:sub(9, 10) < "x" local left = name:sub(9, 10) < "x"
for pos = 1, name ~= "lualine_z" and #section or #section - 1 do for pos = 1, name ~= "lualine_z" and #section or #section - 1 do
table.insert(section, pos * 2, { empty, color = { fg = colors.white, bg = colors.white } }) table.insert(section, pos * 2, { color = { fg = colors.white, bg = colors.white } })
end end
for id, comp in ipairs(section) do for id, comp in ipairs(section) do
if type(comp) ~= "table" then if type(comp) ~= "table" then
@ -66,13 +66,13 @@ return {
"diagnostics", "diagnostics",
source = { "nvim" }, source = { "nvim" },
sections = { "error" }, sections = { "error" },
diagnostics_color = { error = { bg = colors.red, fg = colors.white } }, -- diagnostics_color = { error = { bg = colors.red, fg = colors.white } },
}, },
{ {
"diagnostics", "diagnostics",
source = { "nvim" }, source = { "nvim" },
sections = { "warn" }, sections = { "warn" },
diagnostics_color = { warn = { bg = colors.orange, fg = colors.white } }, -- diagnostics_color = { warn = { bg = colors.orange, fg = colors.white } },
}, },
{ "filename", file_status = false, path = 1 }, { "filename", file_status = false, path = 1 },
{ modified, color = { bg = colors.red } }, { modified, color = { bg = colors.red } },
@ -106,7 +106,7 @@ return {
}, },
}, },
lualine_x = {}, lualine_x = {},
-- lualine_y = { search_result, 'filetype' }, -- lualine_y = { search_result, "filetype" },
lualine_y = { "filetype " }, lualine_y = { "filetype " },
lualine_z = { "%l:%c", "%p%%/%L" }, lualine_z = { "%l:%c", "%p%%/%L" },
}), }),

View File

@ -3,7 +3,7 @@ local util = require("lazyvim.functions")
return { return {
{ {
"nvim-telescope/telescope.nvim", "nvim-telescope/telescope.nvim",
cmd = "Telescope", event = "VeryLazy",
keys = { keys = {
{ "<leader>/", util.telescope("live_grep"), desc = "Find in Files (Grep)" }, { "<leader>/", util.telescope("live_grep"), desc = "Find in Files (Grep)" },
{ "<leader><space>", util.telescope("find_files"), desc = "Find Files (root dir)" }, { "<leader><space>", util.telescope("find_files"), desc = "Find Files (root dir)" },
@ -57,6 +57,12 @@ return {
selection_caret = "", selection_caret = "",
mappings = { mappings = {
i = { i = {
["<C-j>"] = function(...)
return require("telescope.actions").move_selection_next(...)
end,
["<C-k>"] = function(...)
require("telescope.actions").move_selection_previous(...)
end,
["<c-t>"] = function(...) ["<c-t>"] = function(...)
return require("trouble.providers.telescope").open_with_trouble(...) return require("trouble.providers.telescope").open_with_trouble(...)
end, end,

View File

@ -65,32 +65,30 @@ return {
{ "<leader>bl", "<cmd>CybuNext<cr>", desc = "Next Buffer" }, { "<leader>bl", "<cmd>CybuNext<cr>", desc = "Next Buffer" },
{ "<leader>bh", "<cmd>CybuPrev<cr>", desc = "Prev Buffer" }, { "<leader>bh", "<cmd>CybuPrev<cr>", desc = "Prev Buffer" },
}, },
config = function() opts = {
require("cybu").setup({ position = {
position = { relative_to = "win", -- win, editor, cursor
relative_to = "win", -- win, editor, cursor anchor = "topright", -- topleft, topcenter, topright,
anchor = "topright", -- topleft, topcenter, topright, -- centerleft, center, centerright,
-- centerleft, center, centerright, -- bottomleft, bottomcenter, bottomright
-- bottomleft, bottomcenter, bottomright -- vertical_offset = 10, -- vertical offset from anchor in lines
-- vertical_offset = 10, -- vertical offset from anchor in lines -- horizontal_offset = 0, -- vertical offset from anchor in columns
-- horizontal_offset = 0, -- vertical offset from anchor in columns -- max_win_height = 5, -- height of cybu window in lines
-- max_win_height = 5, -- height of cybu window in lines -- max_win_width = 0.5, -- integer for absolute in columns
-- max_win_width = 0.5, -- integer for absolute in columns -- float for relative to win/editor width
-- float for relative to win/editor width },
display_time = 1750, -- time the cybu window is displayed
style = {
separator = " ", -- string used as separator
prefix = "", -- string used as prefix for truncated paths
padding = 1, -- left & right padding in number of spaces
hide_buffer_id = true,
devicons = {
enabled = true, -- enable or disable web dev icons
colored = true, -- enable color for web dev icons
}, },
display_time = 1750, -- time the cybu window is displayed },
style = { },
separator = " ", -- string used as separator
prefix = "", -- string used as prefix for truncated paths
padding = 1, -- left & right padding in number of spaces
hide_buffer_id = true,
devicons = {
enabled = true, -- enable or disable web dev icons
colored = true, -- enable color for web dev icons
},
},
})
end,
}, },
{ {
"mbbill/undotree", "mbbill/undotree",

View File

@ -1,66 +1,46 @@
return { return {
{ {
"folke/which-key.nvim", "folke/which-key.nvim",
event = "BufEnter", event = "VeryLazy",
config = function() opts = {
plugins = {
-- marks = true, -- shows a list of your marks on ' and `
-- registers = true, -- shows your registers on " in NORMAL or <C-r> in INSERT mode
spelling = {
enabled = true, -- enabling this will show WhichKey when pressing z= to select spelling suggestions
suggestions = 20, -- how many suggestions should be shown in the list?
},
},
key_labels = {
-- override the label used to display some keys. It doesn't effect WK in any other way.
["<leader>"] = "SPC",
},
icons = {
breadcrumb = "»", -- symbol used in the command line area that shows your active key combo
separator = "", -- symbol used between a key and it's label
group = "+", -- symbol prepended to a group
},
popup_mappings = {
scroll_down = "<C-d>", -- binding to scroll down inside the popup
scroll_up = "<C-u>", -- binding to scroll up inside the popup
},
-- window = {
-- border = "rounded", -- none, single, double, shadow
-- position = "bottom", -- bottom, top
-- margin = { 1, 0, 1, 0 }, -- extra window margin [top, right, bottom, left]
-- padding = { 2, 2, 2, 2 }, -- extra window padding [top, right, bottom, left]
-- winblend = 0,
-- },
-- layout = {
-- height = { min = 4, max = 25 }, -- min and max height of the columns
-- width = { min = 20, max = 50 }, -- min and max width of the columns
-- spacing = 3, -- spacing between columns
-- align = "center", -- align columns left, center or right
-- },
},
config = function(_, opts)
local whichkey = require("which-key") local whichkey = require("which-key")
whichkey.setup({ whichkey.setup(opts)
plugins = {
marks = true, -- shows a list of your marks on ' and `
registers = true, -- shows your registers on " in NORMAL or <C-r> in INSERT mode
spelling = {
enabled = true, -- enabling this will show WhichKey when pressing z= to select spelling suggestions
suggestions = 20, -- how many suggestions should be shown in the list?
},
-- the presets plugin, adds help for a bunch of default keybindings in Neovim
-- No actual key bindings are created
presets = {
operators = true, -- adds help for operators like d, y, ... and registers them for motion / text object completion
motions = true, -- adds help for motions
text_objects = true, -- help for text objects triggered after entering an operator
windows = true, -- default bindings on <c-w>
nav = true, -- misc bindings to work with windows
z = true, -- bindings for folds, spelling and others prefixed with z
g = true, -- bindings for prefixed with g
},
},
key_labels = {
-- override the label used to display some keys. It doesn't effect WK in any other way.
["<leader>"] = "SPC",
},
icons = {
breadcrumb = "»", -- symbol used in the command line area that shows your active key combo
separator = "", -- symbol used between a key and it's label
group = "+", -- symbol prepended to a group
},
popup_mappings = {
scroll_down = "<C-d>", -- binding to scroll down inside the popup
scroll_up = "<C-u>", -- binding to scroll up inside the popup
},
window = {
border = "rounded", -- none, single, double, shadow
position = "bottom", -- bottom, top
margin = { 1, 0, 1, 0 }, -- extra window margin [top, right, bottom, left]
padding = { 2, 2, 2, 2 }, -- extra window padding [top, right, bottom, left]
winblend = 0,
},
layout = {
height = { min = 4, max = 25 }, -- min and max height of the columns
width = { min = 20, max = 50 }, -- min and max width of the columns
spacing = 3, -- spacing between columns
align = "center", -- align columns left, center or right
},
ignore_missing = true, -- enable this to hide mappings for which you didn't specify a label
hidden = { "<silent>", "<cmd>", "<Cmd>", "<CR>", "call", "lua", "^:", "^ " }, -- hide mapping boilerplate
show_help = false, -- show help message on the command line when the popup is visible
triggers_blacklist = {
-- list of mode / prefixes that should never be hooked by WhichKey
-- this is mostly relevant for key maps that start with a native binding
-- most people should not need to change this
i = { "j", "k" },
v = { "j", "k" },
},
})
local leader_opts = { local leader_opts = {
mode = { "n", "v" }, -- NORMAL/VISUAL mode mode = { "n", "v" }, -- NORMAL/VISUAL mode
@ -75,6 +55,8 @@ return {
mode = { "n", "v" }, mode = { "n", "v" },
["g"] = { name = "+goto" }, ["g"] = { name = "+goto" },
["m"] = { name = "+harpoon" }, ["m"] = { name = "+harpoon" },
["]"] = { name = "+next" },
["["] = { name = "+previous" },
}) })
local leader_mappings = { local leader_mappings = {
@ -89,8 +71,8 @@ return {
N = { name = "+noice" }, N = { name = "+noice" },
o = { name = "+option" }, o = { name = "+option" },
H = { "<cmd>split<cr>", "split" }, H = { "<cmd>split<cr>", "Split" },
V = { "<cmd>vsplit<cr>", "vsplit" }, V = { "<cmd>vsplit<cr>", "V Split" },
n = { "<cmd>NvimTreeToggle<cr>", "Explorer" }, n = { "<cmd>NvimTreeToggle<cr>", "Explorer" },
P = { "<cmd>!opout %<cr><cr>", "Preview Document" }, P = { "<cmd>!opout %<cr><cr>", "Preview Document" },
q = { '<cmd>lua require("lazyvim.functions").smart_quit()<CR>', "Quit" }, q = { '<cmd>lua require("lazyvim.functions").smart_quit()<CR>', "Quit" },