Skip to content

Commit

Permalink
fix: Adjust legendary.nvim configs, mv some keymaps to which-key config
Browse files Browse the repository at this point in the history
  • Loading branch information
MysticalDevil committed Oct 29, 2023
1 parent afd0339 commit c880854
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
6 changes: 3 additions & 3 deletions lua/devil/configs/plugin/legendary.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ local opts = {
-- of each individual item
default_opts = {
-- for example, { silent = true, remap = false }
keymaps = {},
keymaps = { silent = true, remap = true },
-- for example, { args = '?', bang = true }
commands = {},
-- for example, { buf = 0, once = true }
Expand Down Expand Up @@ -115,7 +115,7 @@ local opts = {
lazy_nvim = {
-- Automatically register keymaps that are defined on lazy.nvim plugin specs
-- using the `keys = {}` property.
auto_register = false,
auto_register = true,
},
-- Which extensions to load; no extensions are loaded by default.
-- Setting the plugin name to `false` disables loading the extension.
Expand Down Expand Up @@ -144,7 +144,7 @@ local opts = {
which_key = {
-- Automatically add which-key tables to legendary
-- see ./doc/WHICH_KEY.md for more details
auto_register = false,
auto_register = true,
-- you can put which-key.nvim tables here,
-- or alternatively have them auto-register,
-- see ./doc/WHICH_KEY.md
Expand Down
2 changes: 0 additions & 2 deletions lua/devil/configs/plugin/lspsaga.lua
Original file line number Diff line number Diff line change
Expand Up @@ -186,5 +186,3 @@ local opts = {
}

lspsaga.setup(opts)

require("devil.utils").keymap("n", "<A-t>", "<CMD>Lspsaga term_toggle<CR>", { desc = "Float term" })
5 changes: 2 additions & 3 deletions lua/devil/configs/plugin/which-key.lua
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,8 @@ local opts = {

which_key.setup(opts)

local utils = require("devil.utils")

which_key.register({
["<A-t>"] = { "<CMD>Lspsaga term_toggle<CR>", desc = "Float term" },
["<leader>q"] = { "<CMD>q<CR>", "Quit editor" },
["<leader>f"] = {
function()
Expand Down Expand Up @@ -137,7 +136,7 @@ which_key.register({
l = { "<CMD>TroubleToggle loclist<CR>", "Open trouble loclist" },
r = { "<CMD>TroubleToggle lsp_references<CR>", "Open LSP references" },
},
s = {
p = {
name = "+plugins",
s = { "<Plug>RestNvim", "Run request under cursor" },
p = { "<Plug>RestNvimPreview", "Preview request cURL command" },
Expand Down

0 comments on commit c880854

Please sign in to comment.