Added config file for whichkey plugin and

seperated opts for it.
This commit is contained in:
2023-06-25 11:06:26 +02:00
parent a7972a2180
commit d342291026
3 changed files with 51 additions and 8 deletions

46
after/plugin/whichkey.lua Normal file
View File

@@ -0,0 +1,46 @@
local status, whichkey = pcall(require, "which-key")
if not status then
return
end
whichkey.setup({
key_labels = {
["<space>"] = "SPC",
["<cr>"] = "RET",
["<Tab>"] = "TAB",
},
icons = {
breadcrumb = "»",
separator = "",
group = "& ",
}
})
whichkey.register({
["<leader>"] = {
w = {
name = "window",
},
f = {
name = "find",
},
b = {
name = "buffer",
},
g = {
name = "git",
},
p = {
name = "packer",
},
t = {
name = "toggle",
},
v = {
name = "lsp",
},
h = {
name = "theme",
},
},
})

View File

@@ -34,6 +34,10 @@ opt.isfname:append("@-@")
opt.updatetime = 50 opt.updatetime = 50
--options for whichkey
vim.o.timeout = true
vim.o.timeoutlen = 300
-- Options for nvim-tree -- Options for nvim-tree
g.loaded_netrw = 1 g.loaded_netrw = 1
g.loaded_netrwPlugin = 1 g.loaded_netrwPlugin = 1

View File

@@ -105,14 +105,7 @@ return packer.startup(function(use)
use("lewis6991/gitsigns.nvim") use("lewis6991/gitsigns.nvim")
use("f-person/git-blame.nvim") use("f-person/git-blame.nvim")
-- useful plugins -- useful plugins
use({ use("folke/which-key.nvim")
"folke/which-key.nvim",
config = function()
vim.o.timeout = true
vim.o.timeoutlen = 300
require("which-key").setup({})
end,
})
use({ use({
"nvim-lualine/lualine.nvim", "nvim-lualine/lualine.nvim",
requires = { "nvim-tree/nvim-web-devicons", opt = true }, requires = { "nvim-tree/nvim-web-devicons", opt = true },