Added config file for whichkey plugin and
seperated opts for it.
This commit is contained in:
46
after/plugin/whichkey.lua
Normal file
46
after/plugin/whichkey.lua
Normal 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",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -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 },
|
||||||
|
|||||||
Reference in New Issue
Block a user