diff --git a/.config/nvim/lua/config/keymaps.lua b/.config/nvim/lua/config/keymaps.lua index c743ac0c..36cd47b0 100644 --- a/.config/nvim/lua/config/keymaps.lua +++ b/.config/nvim/lua/config/keymaps.lua @@ -51,28 +51,31 @@ map({ "n" }, "", "H", { remap = false }) -- Duplicate and comment line map({ "n" }, "yc", '"zyygcc"zp', { remap = true, silent = true, desc = "Duplicate and comment line" }) -local function is_lsp_attached() - local clients = vim.lsp.get_clients({ bufnr = 0 }) - return #clients > 0 -end - -local cptoggle = Snacks.toggle.new({ - name = "Lsp", - -- map = vim.keymap.set, - which_key = true, - get = function() - return not is_lsp_attached() - end, - notify = true, - set = function(state) - if state then - vim.cmd("LspStart") - else - vim.cmd("LspStop") - end - end, -}) -Snacks.toggle.map(cptoggle, "at", { desc = "Toggle Copilot" }) +-- local function is_lsp_attached() +-- local clients = vim.lsp.get_clients({ bufnr = 0 }) +-- print(#clients .. " clients found") +-- return #clients > 0 +-- end +-- +-- local lsptoggle = Snacks.toggle.new({ +-- name = "Lsp", +-- -- map = vim.keymap.set, +-- which_key = true, +-- get = function() +-- return not is_lsp_attached() +-- end, +-- notify = true, +-- set = function(state) +-- if state then +-- -- vim.cmd("LspStart") +-- print("we start lsp...") +-- else +-- -- vim.cmd("LspStop") +-- print("We stop lsp...") +-- end +-- end, +-- }) +-- Snacks.toggle.map(lsptoggle, "cL", { desc = "Toggle LSP" }) -- better quit map("n", "", "qa", { desc = "Quit All" })