bugfix leader u
This commit is contained in:
parent
37855ad4bd
commit
6bc0ca0fe7
|
@ -10,7 +10,6 @@ local sections = {
|
|||
g = { desc = " " .. icons.misc.Git .. " Git" },
|
||||
f = { desc = " " .. icons.ui.Search .. " Find" },
|
||||
l = { desc = " " .. icons.ui.Note .. " LSP" },
|
||||
m = { desc = " " .. icons.ui.Gear .. " Misc" },
|
||||
t = { desc = " " .. icons.ui.Terminal .. " Terminal" },
|
||||
}
|
||||
|
||||
|
@ -52,7 +51,6 @@ maps.t["<C-k>"] = { "<cmd>wincmd k<cr>", desc = "Terminal up window navigation"
|
|||
maps.t["<C-l>"] = { "<cmd>wincmd l<cr>", desc = "Terminal right window navigation" }
|
||||
|
||||
-- Plugin Manager --
|
||||
maps.n["<Leader>p"] = sections.p
|
||||
maps.n["<Leader>ph"] = { function() require("lazy").home() end, desc = "Home" }
|
||||
maps.n["<Leader>pi"] = { function() require("lazy").install() end, desc = "Install" }
|
||||
maps.n["<Leader>pu"] = { function() require("lazy").update() end, desc = "Update" }
|
||||
|
|
|
@ -146,6 +146,7 @@ local function has_capability(capability, filter)
|
|||
return false
|
||||
end
|
||||
|
||||
-- NOTE: LSP Keymaps here
|
||||
function M.lsp_on_attach(client, bufnr)
|
||||
vim.fn.system("echo fuck >/home/luca/test")
|
||||
local lsp_mappings = M.empty_map_table()
|
||||
|
@ -188,7 +189,8 @@ function M.lsp_on_attach(client, bufnr)
|
|||
function() vim.lsp.codelens.run() end,
|
||||
desc = "Run CodeLens",
|
||||
}
|
||||
lsp_mappings.n["<leader>mL"] = {
|
||||
lsp_mappings.n["<Leader>u"] = { desc = " " .. icons.ui.Gear .. " Utility" }
|
||||
lsp_mappings.n["<leader>uL"] = {
|
||||
function() vim.lsp.codelens.clear() end,
|
||||
desc = "Toggle CodeLens"
|
||||
}
|
||||
|
@ -246,7 +248,8 @@ function M.lsp_on_attach(client, bufnr)
|
|||
-- TODO: Check this on 0.10.0 release
|
||||
if client.supports_method "textDocument/semanticTokens/full" and vim.lsp.semantic_tokens then
|
||||
vim.b[bufnr].semantic_tokens_enabled = true
|
||||
lsp_mappings.n["<leader>mY"] = {
|
||||
lsp_mappings.n["<Leader>u"] = { desc = " " .. icons.ui.Gear .. " Utility" }
|
||||
lsp_mappings.n["<leader>uY"] = {
|
||||
function()
|
||||
vim.b[bufnr].semantic_tokens_enabled = not vim.b[bufnr].semantic_tokens_enabled
|
||||
for _, active_client in ipairs(vim.lsp.get_active_clients { bufnr = bufnr }) do
|
||||
|
@ -306,7 +309,8 @@ function M.lsp_on_attach(client, bufnr)
|
|||
-- TODO: Check this on 0.10.0 release
|
||||
if vim.lsp.inlay_hint then
|
||||
if vim.b.inlay_hints_enabled then vim.lsp.inlay_hint.enable(bufnr, true) end
|
||||
lsp_mappings.n["<leader>mH"] = {
|
||||
lsp_mappings.n["<Leader>u"] = { desc = " " .. icons.ui.Gear .. " Utility" }
|
||||
lsp_mappings.n["<leader>uH"] = {
|
||||
function()
|
||||
vim.b[bufnr].inlay_hints_enabled = not vim.b[bufnr].inlay_hints_enabled
|
||||
if vim.lsp.inlay_hint then
|
||||
|
@ -358,7 +362,8 @@ function M.lsp_on_attach(client, bufnr)
|
|||
end
|
||||
|
||||
if not vim.tbl_isempty(lsp_mappings.v) then
|
||||
lsp_mappings.v["<leader>l"] = { desc = " " .. icons.ui.Note .. " LSP" }
|
||||
if lsp_mappings.v["<leader>l"] then lsp_mappings.v["<leader>l"] = { desc = " " .. icons.ui.Note .. " LSP" } end
|
||||
if lsp_mappings.v["<leader>u"] then lsp_mappings.v["<leader>u"] = { desc = " " .. icons.ui.Note .. " LSP" } end
|
||||
end
|
||||
|
||||
M.set_mappings(lsp_mappings, { buffer = bufnr })
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
Continue checking for old keymaps
|
||||
Configure Todo Telescope integration
|
||||
Figure out why the theme breaks when you install a plugin
|
||||
Indicate if various lsp toggles are active
|
||||
|
|
Loading…
Reference in New Issue