Skip to content

Commit b491f02

Browse files
committed
chore(maps): load lspmaps on attach; dropbar on verylazy
1 parent 0195e95 commit b491f02

File tree

3 files changed

+11
-14
lines changed

3 files changed

+11
-14
lines changed

lua/core/mappings.lua

+10-10
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,26 @@ end
7979

8080
M.misc = function()
8181
map("n", "<RightMouse>", "<cmd>:popup mousemenu<CR>")
82+
8283
map("n", "<A-R>", function()
8384
utils.run_vert_command()
8485
end, "Run command")
8586

8687
map("n", "<leader>n", function()
8788
utils.toggle_numbering()
8889
end, "Toggle line numbering")
90+
8991
map("n", "<leader>tf", function()
9092
utils.toggle_flow()
9193
end, "Toggle flow")
94+
95+
map("n", "<leader>p", function()
96+
require("dropbar.api").pick(vim.v.count ~= 0 and vim.v.count)
97+
end, "Open dropbar menu")
98+
99+
map("n", "<leader>td", function()
100+
require("core.utils").toggle_dropbar()
101+
end, "Toggle dropbar")
92102
end
93103

94104
M.lsp = function()
@@ -131,16 +141,6 @@ M.lsp = function()
131141
})
132142
end
133143

134-
M.dropbar = function()
135-
map("n", "<leader>p", function()
136-
require("dropbar.api").pick(vim.v.count ~= 0 and vim.v.count)
137-
end, "Open dropbar menu")
138-
139-
map("n", "<leader>td", function()
140-
require("core.utils").toggle_dropbar()
141-
end, "Toggle dropbar")
142-
end
143-
144144
M.gitsigns = function()
145145
map("n", "<leader>gp", function()
146146
require("gitsigns").preview_hunk()

lua/plugins/configs/lsp.lua

-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ local lspconfig = require "lspconfig"
22
local windows = require "lspconfig.ui.windows"
33
local cmp = require "cmp_nvim_lsp"
44

5-
--- mappings
6-
require("core.mappings").lsp()
7-
85
windows.default_options.border = "rounded"
96
lspconfig.util.on_setup = lspconfig.util.add_hook_after(lspconfig.util.on_setup, function(config)
107
config.capabilities = vim.tbl_deep_extend("force", config.capabilities, cmp.default_capabilities())

lua/plugins/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ local plugins = {
112112
"LspAttach",
113113
},
114114
init = function()
115+
require("core.mappings").lsp()
115116
require("core.utils").lazy_load "lspconfig"
116117
end,
117118
config = function()
@@ -161,7 +162,6 @@ local plugins = {
161162
"nvim-tree/nvim-web-devicons",
162163
},
163164
opts = function()
164-
require("core.mappings").dropbar()
165165
return require("plugins.configs.fancy").drop
166166
end,
167167
},

0 commit comments

Comments
 (0)