diff --git a/.config/nvim/lua/config/keymaps.lua b/.config/nvim/lua/config/keymaps.lua index 8ed84c285..04d00c392 100644 --- a/.config/nvim/lua/config/keymaps.lua +++ b/.config/nvim/lua/config/keymaps.lua @@ -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[""] = { "wincmd k", desc = "Terminal up window navigation" maps.t[""] = { "wincmd l", desc = "Terminal right window navigation" } -- Plugin Manager -- -maps.n["p"] = sections.p maps.n["ph"] = { function() require("lazy").home() end, desc = "Home" } maps.n["pi"] = { function() require("lazy").install() end, desc = "Install" } maps.n["pu"] = { function() require("lazy").update() end, desc = "Update" } diff --git a/.config/nvim/lua/funcs.lua b/.config/nvim/lua/funcs.lua index 6ba87b873..39799717b 100644 --- a/.config/nvim/lua/funcs.lua +++ b/.config/nvim/lua/funcs.lua @@ -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["mL"] = { + lsp_mappings.n["u"] = { desc = " " .. icons.ui.Gear .. " Utility" } + lsp_mappings.n["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["mY"] = { + lsp_mappings.n["u"] = { desc = " " .. icons.ui.Gear .. " Utility" } + lsp_mappings.n["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["mH"] = { + lsp_mappings.n["u"] = { desc = " " .. icons.ui.Gear .. " Utility" } + lsp_mappings.n["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["l"] = { desc = " " .. icons.ui.Note .. " LSP" } + if lsp_mappings.v["l"] then lsp_mappings.v["l"] = { desc = " " .. icons.ui.Note .. " LSP" } end + if lsp_mappings.v["u"] then lsp_mappings.v["u"] = { desc = " " .. icons.ui.Note .. " LSP" } end end M.set_mappings(lsp_mappings, { buffer = bufnr }) diff --git a/.config/nvim/todo b/.config/nvim/todo index 21fa5f6e3..c096469e4 100644 --- a/.config/nvim/todo +++ b/.config/nvim/todo @@ -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