diff --git a/lazy-lock.json b/lazy-lock.json index 6c12dab..9ab066c 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -10,6 +10,7 @@ "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "code_runner.nvim": { "branch": "main", "commit": "6c5bfe44a6c7523350cd706e6b3b8101166eed99" }, + "codeium.nvim": { "branch": "main", "commit": "d3b88eb3aa1de6da33d325c196b8a41da2bcc825" }, "dracula.nvim": { "branch": "main", "commit": "8d8bddb8814c3e7e62d80dda65a9876f97eb699c" }, "dressing.nvim": { "branch": "master", "commit": "572314728cb1ce012e825fd66331f52c94acac12" }, "friendly-snippets": { "branch": "main", "commit": "e11b09bf10706bb74e16e4c3d11b2274d62e687f" }, @@ -21,10 +22,11 @@ "mason-lspconfig.nvim": { "branch": "main", "commit": "9ae570e206360e47d30b4c35a4550c165f4ea7b7" }, "mason-null-ls.nvim": { "branch": "main", "commit": "2b8433f76598397fcc97318d410e0c4f7a4bea6a" }, "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, + "mini.indentscope": { "branch": "main", "commit": "f0d7faa064c892b96997810afcddfadc3f2a15b3" }, "neoscroll.nvim": { "branch": "master", "commit": "a731f66f1d39ec6175fd201c5bf849e54abda99c" }, - "noice.nvim": { "branch": "main", "commit": "69c6ad5c1f1c0777125d0275f9871d8609cb0521" }, + "noice.nvim": { "branch": "main", "commit": "29c7f030b0920e2f17263a9ab8742cde144b9140" }, "none-ls-extras.nvim": { "branch": "main", "commit": "336e84b9e43c0effb735b08798ffac382920053b" }, - "none-ls.nvim": { "branch": "main", "commit": "c2dd47284f5f800fe86a6f848de4114bc83408cf" }, + "none-ls.nvim": { "branch": "main", "commit": "8691504118b252d64fc5023a104aedd100ab754a" }, "nui.nvim": { "branch": "main", "commit": "a0fd35fcbb4cb479366f1dc5f20145fd718a3733" }, "nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" }, "nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" }, @@ -35,7 +37,7 @@ "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, "nvim-scrollview": { "branch": "main", "commit": "c29c5f69d37040a1fac88cbea7f5e6f06f0aff4d" }, "nvim-tree.lua": { "branch": "master", "commit": "2bc725a3ebc23f0172fb0ab4d1134b81bcc13812" }, - "nvim-treesitter": { "branch": "master", "commit": "a80fe081b4c5890980561e0de2458f64aaffbfc7" }, + "nvim-treesitter": { "branch": "master", "commit": "69e41a2c1405ad9626ed502b86e75245f8118531" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "fd41b7ccc5490a3a99c734d1ee418b68d06c48a9" }, "nvim-ts-autotag": { "branch": "main", "commit": "6eb4120a1aadef07ac312f1c4bc6456712220007" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "cb064386e667def1d241317deed9fd1b38f0dc2e" }, diff --git a/lua/custom/default.lua b/lua/custom/default.lua index 4567145..e519a70 100644 --- a/lua/custom/default.lua +++ b/lua/custom/default.lua @@ -109,9 +109,15 @@ vim.g.pcode_coderunner = { vim.g.pcode_nvimtree_isfloat = 0 vim.g.pcode_tailwindcolorizer = false +-- https://github.com/Exafunction/codeium.vim vim.g.pcode_codeium = false +-- https://github.com/Exafunction/codeium.nvim +vim.g.pcode_codeium_nvim = true +-- https://github.com/kevinhwang91/nvim-ufo vim.g.pcode_nvimufo = false -vim.g.pcode_indentscope = false +-- https://github.com/echasnovski/mini.indentscope +vim.g.pcode_indentscope = true +-- https://github.com/echasnovski/mini.animate vim.g.pvode_minianimate = false vim.g.pcode_disable_cmpdoc = false diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 789ef8b..94478dd 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -86,6 +86,7 @@ return { luasnip = "(Snippet)", buffer = "(Buffer)", path = "(Path)", + codeium = "(Codeium)", })[entry.source.name] return vim_item end, diff --git a/lua/plugins/codeioum.lua b/lua/plugins/codeioum.lua index 6289792..7e8ac69 100644 --- a/lua/plugins/codeioum.lua +++ b/lua/plugins/codeioum.lua @@ -3,8 +3,9 @@ if vim.g.pcode_codeium then M.codeium = { "Exafunction/codeium.vim", enabled = true, - -- event = "BufEnter", - event = "InsertEnter", + version = "1.8.37", + event = "BufWinEnter", + -- event = "InsertEnter", config = function() vim.g.codeium_disable_bindings = 1 -- Change '' here to any keycode you like. diff --git a/lua/plugins/codeiumnvim.lua b/lua/plugins/codeiumnvim.lua new file mode 100644 index 0000000..650bb01 --- /dev/null +++ b/lua/plugins/codeiumnvim.lua @@ -0,0 +1,27 @@ +if vim.g.pcode_codeium_nvim then + return { + -- codeium cmp source + { + "nvim-cmp", + dependencies = { + -- codeium + { + "Exafunction/codeium.nvim", + cmd = "Codeium", + build = ":Codeium Auth", + opts = {}, + }, + }, + --@param opts cmp.ConfigSchema + opts = function(_, opts) + table.insert(opts.sources, 1, { + name = "codeium", + group_index = 1, + priority = 100, + }) + end, + }, + } +else + return {} +end diff --git a/lua/plugins/themes/_globalvar.lua b/lua/plugins/themes/_globalvar.lua index 56b3e46..fc00d8a 100644 --- a/lua/plugins/themes/_globalvar.lua +++ b/lua/plugins/themes/_globalvar.lua @@ -24,4 +24,8 @@ _G.extract = function(text) return result end +_G.all_trim = function(s) + return s:match "^%s*(.-)%s*$" +end + return {} diff --git a/lua/user/icons.lua b/lua/user/icons.lua index 234f5ee..5f790df 100644 --- a/lua/user/icons.lua +++ b/lua/user/icons.lua @@ -10,7 +10,8 @@ return { Collapsed = " ", Constant = "", Constructor = "", - Copilot = " ", + Copilot = "", + CopilotOff = "", Enum = "", EnumMember = "", Event = "", diff --git a/lua/user/utils/lualine_component.lua b/lua/user/utils/lualine_component.lua index 0e710bf..83dcc90 100644 --- a/lua/user/utils/lualine_component.lua +++ b/lua/user/utils/lualine_component.lua @@ -51,6 +51,35 @@ return { cond = hide_in_width, }, + codeium = { + function() + if vim.g.pcode_codeium then + local codeium = all_trim(vim.api.nvim_call_function("codeium#GetStatusString", {})) + if codeium then + -- return " " .. all_trim(codeium) + if codeium == "OFF" then + return icons.kind.CopilotOff + else + return icons.kind.Copilot + end + else + return "" + end + else + return "" + end + end, + color = function() + if vim.g.pcode_codeium then + local codeium = all_trim(vim.api.nvim_call_function("codeium#GetStatusString", {})) + return { fg = codeium == "OFF" and "#3E4452" or "#50fa7b" } + else + return {} + end + end, + cond = hide_in_width, + }, + -- Lsp info lsp_info = { function() diff --git a/lua/user/utils/lualine_template.lua b/lua/user/utils/lualine_template.lua index 0b8e994..51e06ac 100644 --- a/lua/user/utils/lualine_template.lua +++ b/lua/user/utils/lualine_template.lua @@ -12,6 +12,7 @@ local data_ok, lspprogress = pcall(require, "lsp-progress") if data_ok then lsp_progress = lspprogress.progress end +local codeium = component.codeium M.filetype = { "TelescopePrompt", @@ -46,7 +47,7 @@ M.rounded = function(colorscheme) }, lualine_b = { get_branch }, lualine_c = { diff, lsp_info, lsp_progress }, - lualine_x = { diagnostics, spaces, treesitter, "filetype" }, + lualine_x = { diagnostics, spaces, codeium, treesitter, "filetype" }, lualine_y = { "progress" }, lualine_z = { { "location", separator = { right = " " }, padding = 1 }, @@ -81,7 +82,7 @@ M.roundedall = function(colorscheme) }, lualine_b = { get_branch }, lualine_c = { diff, lsp_info, lsp_progress }, - lualine_x = { diagnostics, spaces, treesitter, "filetype" }, + lualine_x = { diagnostics, spaces, codeium, treesitter, "filetype" }, lualine_y = { "progress" }, lualine_z = { { "location", separator = { right = " ", left = "" }, padding = 1 }, @@ -116,7 +117,7 @@ M.triangle = function(colorscheme) }, lualine_b = { get_branch }, lualine_c = { diff, lsp_info, lsp_progress }, - lualine_x = { diagnostics, spaces, treesitter, "filetype" }, + lualine_x = { diagnostics, spaces, codeium, treesitter, "filetype" }, lualine_y = { "progress" }, lualine_z = { { "location", separator = { right = " ", left = "" }, padding = 1 }, @@ -151,7 +152,7 @@ M.parallelogram = function(colorscheme) }, lualine_b = { get_branch }, lualine_c = { diff, lsp_info, lsp_progress }, - lualine_x = { diagnostics, spaces, treesitter, "filetype" }, + lualine_x = { diagnostics, spaces, codeium, treesitter, "filetype" }, lualine_y = { "progress" }, lualine_z = { { "location", separator = { right = " ", left = "" }, padding = 1 }, @@ -186,7 +187,7 @@ M.square = function(colorscheme) }, lualine_b = { get_branch }, lualine_c = { diff, lsp_info, lsp_progress }, - lualine_x = { diagnostics, spaces, treesitter, "filetype" }, + lualine_x = { diagnostics, spaces, codeium, treesitter, "filetype" }, lualine_y = { "progress" }, lualine_z = { { "location", separator = { right = " " }, padding = 1 }, diff --git a/lua/user/utils/whichkey.lua b/lua/user/utils/whichkey.lua index 12f1650..816ca15 100644 --- a/lua/user/utils/whichkey.lua +++ b/lua/user/utils/whichkey.lua @@ -3,282 +3,284 @@ local M = {} -- for debug local debug_key = {} -if vim.fn.has("win32") == 0 then - debug_key = { - name = "  Debug", - t = { "lua require'dap'.toggle_breakpoint()", "Toggle Breakpoint" }, - b = { "lua require'dap'.step_back()", "Step Back" }, - c = { "lua require'dap'.continue()", "Continue" }, - C = { "lua require'dap'.run_to_cursor()", "Run To Cursor" }, - d = { "lua require'dap'.disconnect()", "Disconnect" }, - g = { "lua require'dap'.session()", "Get Session" }, - i = { "lua require'dap'.step_into()", "Step Into" }, - o = { "lua require'dap'.step_over()", "Step Over" }, - u = { "lua require'dap'.step_out()", "Step Out" }, - p = { "lua require'dap'.pause()", "Pause" }, - r = { "lua require'dap'.repl.toggle()", "Toggle Repl" }, - s = { "lua require'dap'.continue()", "Start" }, - q = { "lua require'dap'.close()", "Quit" }, - U = { "lua require'dapui'.toggle({reset = true})", "Toggle UI" }, - } +if vim.fn.has "win32" == 0 then + debug_key = { + name = "  Debug", + t = { "lua require'dap'.toggle_breakpoint()", "Toggle Breakpoint" }, + b = { "lua require'dap'.step_back()", "Step Back" }, + c = { "lua require'dap'.continue()", "Continue" }, + C = { "lua require'dap'.run_to_cursor()", "Run To Cursor" }, + d = { "lua require'dap'.disconnect()", "Disconnect" }, + g = { "lua require'dap'.session()", "Get Session" }, + i = { "lua require'dap'.step_into()", "Step Into" }, + o = { "lua require'dap'.step_over()", "Step Over" }, + u = { "lua require'dap'.step_out()", "Step Out" }, + p = { "lua require'dap'.pause()", "Pause" }, + r = { "lua require'dap'.repl.toggle()", "Toggle Repl" }, + s = { "lua require'dap'.continue()", "Start" }, + q = { "lua require'dap'.close()", "Quit" }, + U = { "lua require'dapui'.toggle({reset = true})", "Toggle UI" }, + } end -- end debug function M._LAZYGIT_TOGGLE() - local Terminal = require("toggleterm.terminal").Terminal - local lazygit = Terminal:new({ cmd = "lazygit", hidden = true }) - lazygit:toggle() + local Terminal = require("toggleterm.terminal").Terminal + local lazygit = Terminal:new { cmd = "lazygit", hidden = true } + lazygit:toggle() end function M._NODE_TOGGLE() - local Terminal = require("toggleterm.terminal").Terminal - local node = Terminal:new({ cmd = "node", hidden = true }) - node:toggle() + local Terminal = require("toggleterm.terminal").Terminal + local node = Terminal:new { cmd = "node", hidden = true } + node:toggle() end function M._BTOP_TOGGLE() - local Terminal = require("toggleterm.terminal").Terminal - local htop = Terminal:new({ cmd = "btop", hidden = true }) - htop:toggle() + local Terminal = require("toggleterm.terminal").Terminal + local htop = Terminal:new { cmd = "btop", hidden = true } + htop:toggle() end function M._PYTHON_TOGGLE() - local Terminal = require("toggleterm.terminal").Terminal - local python = Terminal:new({ cmd = "python", hidden = true }) - python:toggle() + local Terminal = require("toggleterm.terminal").Terminal + local python = Terminal:new { cmd = "python", hidden = true } + python:toggle() end function M._NEWTAB_TOGGLE() - local Terminal = require("toggleterm.terminal").Terminal - local pwsh = Terminal:new({ cmd = "pwsh", hidden = true, direction = "tab" }) - pwsh:toggle() + local Terminal = require("toggleterm.terminal").Terminal + local pwsh = Terminal:new { cmd = "pwsh", hidden = true, direction = "tab" } + pwsh:toggle() end function M._OPEN_EXPLORER() - local Terminal = require("toggleterm.terminal").Terminal - local pwsh = Terminal:new({ cmd = "explorer .", hidden = true, direction = "tab" }) - pwsh:toggle() + local Terminal = require("toggleterm.terminal").Terminal + local pwsh = Terminal:new { cmd = "explorer .", hidden = true, direction = "tab" } + pwsh:toggle() end function M._LIVE_SERVER() - local Terminal = require("toggleterm.terminal").Terminal - local live_server = Terminal:new({ - cmd = "live-server", - hidden = true, - direction = "tab", - }) - live_server:toggle() + local Terminal = require("toggleterm.terminal").Terminal + local live_server = Terminal:new { + cmd = "live-server", + hidden = true, + direction = "tab", + } + live_server:toggle() end function M._OPEN_ALACRITTY() - -- open alacritty new windows current directory - vim.cmd("silent !alacritty --working-directory " .. vim.fn.getcwd()) + -- open alacritty new windows current directory + vim.cmd("silent !alacritty --working-directory " .. vim.fn.getcwd()) end function M._OPEN_WEZTERM() - -- open wezterm new windows current directory - vim.cmd("silent !wezterm start --cwd " .. vim.fn.getcwd()) + -- open wezterm new windows current directory + vim.cmd("silent !wezterm start --cwd " .. vim.fn.getcwd()) end -- get folder name from current directory function M._get_folder_name() - return vim.fn.fnamemodify(vim.fn.getcwd(), ":t") + return vim.fn.fnamemodify(vim.fn.getcwd(), ":t") end function M._OPEN_WEZTERM_TAB() - -- open new tab wezterm current directory - vim.cmd('silent !wezterm cli spawn --cwd "' .. vim.fn.getcwd() .. '"') + -- open new tab wezterm current directory + vim.cmd('silent !wezterm cli spawn --cwd "' .. vim.fn.getcwd() .. '"') end function M._SET_TAB_TITLE() - -- set tab title - vim.cmd('silent !wezterm cli set-tab-title "' .. M._get_folder_name() .. '"') + -- set tab title + vim.cmd('silent !wezterm cli set-tab-title "' .. M._get_folder_name() .. '"') end function M._CLOSE_BUFFER() - local buf = vim.api.nvim_get_current_buf() - -- delete current buffer - require("bufdelete").bufdelete(buf, true) + local buf = vim.api.nvim_get_current_buf() + -- delete current buffer + require("bufdelete").bufdelete(buf, true) end -- function for close all bufferline function M._CLOSE_ALL_BUFFER() - -- get all buffer - local bufs = vim.api.nvim_list_bufs() - -- loop through all buffer - for _, buf in pairs(bufs) do - require("user.utils").bufdelete(buf) - end + -- get all buffer + local bufs = vim.api.nvim_list_bufs() + -- loop through all buffer + for _, buf in pairs(bufs) do + require("user.utils").bufdelete(buf) + end end M.mappings = { - ["a"] = { "Alpha", "󰕮 Alpha" }, - ["e"] = { "NvimTreeToggle", "󰙅 Explorer" }, - ["w"] = { "w!", "󰆓 Save" }, - ["q"] = { "q!", "󰿅 Quit" }, - -- open exloler and close toggleterm - ["o"] = { - "lua require('user.utils.whichkey')._OPEN_EXPLORER()", - "󱏒 Open Explorer", - }, - ["h"] = { "nohlsearch", "󱪿 No Highlight" }, - ["f"] = { - "Telescope find_files ", - " Find files", - }, - ["F"] = { "Telescope live_grep theme=ivy", " Find Text" }, - ["/"] = { - function() - require("Comment.api").toggle.linewise.current() - end, - "󰆈 Coment line", - }, - b = { - name = "  Buffers", - -- show all buffers with telescope - b = { - "lua require('telescope.builtin').buffers(require('telescope.themes').get_dropdown{previewer = false})", - "All Buffer", - }, - -- close current active buffer - c = { "lua require('user.utils.bufferline').bufremove()", "Close current buffer" }, - -- bufferline close left - d = { - "BufferLineCloseLeft", - "Buffer close left", - }, - -- bufferline close right - D = { - "BufferLineCloseRight", - "Buffer close right", - }, - -- bufferline close others - a = { - "BufferLineCloseOthers", - "Buffer close others", - }, - -- close all bufferline - A = { - "BufferLineCloseOthersbd!", - "Buffer close All Buffer", - }, - }, + ["a"] = { "Alpha", "󰕮 Alpha" }, + ["e"] = { "NvimTreeToggle", "󰙅 Explorer" }, + ["w"] = { "w!", "󰆓 Save" }, + ["q"] = { "q!", "󰿅 Quit" }, + -- open exloler and close toggleterm + ["o"] = { + "lua require('user.utils.whichkey')._OPEN_EXPLORER()", + "󱏒 Open Explorer", + }, + ["h"] = { "nohlsearch", "󱪿 No Highlight" }, + ["f"] = { + "Telescope find_files ", + " Find files", + }, + ["F"] = { "Telescope live_grep theme=ivy", " Find Text" }, + ["/"] = { + function() + require("Comment.api").toggle.linewise.current() + end, + "󰆈 Coment line", + }, + b = { + name = "  Buffers", + -- show all buffers with telescope + b = { + "lua require('telescope.builtin').buffers(require('telescope.themes').get_dropdown{previewer = false})", + "All Buffer", + }, + -- close current active buffer + c = { "lua require('user.utils.bufferline').bufremove()", "Close current buffer" }, + -- bufferline close left + d = { + "BufferLineCloseLeft", + "Buffer close left", + }, + -- bufferline close right + D = { + "BufferLineCloseRight", + "Buffer close right", + }, + -- bufferline close others + a = { + "BufferLineCloseOthers", + "Buffer close others", + }, + -- close all bufferline + A = { + "BufferLineCloseOthersbd!", + "Buffer close All Buffer", + }, + }, - g = { - name = "  Git", - g = { "lua require('user.utils.whichkey')._LAZYGIT_TOGGLE()", "Lazygit" }, - j = { "lua require 'gitsigns'.next_hunk()", "Next Hunk" }, - k = { "lua require 'gitsigns'.prev_hunk()", "Prev Hunk" }, - l = { "lua require 'gitsigns'.blame_line()", "Blame" }, - p = { "lua require 'gitsigns'.preview_hunk()", "Preview Hunk" }, - r = { "lua require 'gitsigns'.reset_hunk()", "Reset Hunk" }, - R = { "lua require 'gitsigns'.reset_buffer()", "Reset Buffer" }, - s = { "lua require 'gitsigns'.stage_hunk()", "Stage Hunk" }, - u = { - "lua require 'gitsigns'.undo_stage_hunk()", - "Undo Stage Hunk", - }, - o = { "Telescope git_status", "Open changed file" }, - b = { "Telescope git_branches", "Checkout branch" }, - c = { "Telescope git_commits", "Checkout commit" }, - d = { - "Gitsigns diffthis HEAD", - "Diff", - }, - }, + g = { + name = "  Git", + g = { "lua require('user.utils.whichkey')._LAZYGIT_TOGGLE()", "Lazygit" }, + j = { "lua require 'gitsigns'.next_hunk()", "Next Hunk" }, + k = { "lua require 'gitsigns'.prev_hunk()", "Prev Hunk" }, + l = { "lua require 'gitsigns'.blame_line()", "Blame" }, + p = { "lua require 'gitsigns'.preview_hunk()", "Preview Hunk" }, + r = { "lua require 'gitsigns'.reset_hunk()", "Reset Hunk" }, + R = { "lua require 'gitsigns'.reset_buffer()", "Reset Buffer" }, + s = { "lua require 'gitsigns'.stage_hunk()", "Stage Hunk" }, + u = { + "lua require 'gitsigns'.undo_stage_hunk()", + "Undo Stage Hunk", + }, + o = { "Telescope git_status", "Open changed file" }, + b = { "Telescope git_branches", "Checkout branch" }, + c = { "Telescope git_commits", "Checkout commit" }, + d = { + "Gitsigns diffthis HEAD", + "Diff", + }, + }, - l = { - name = "  LSP", - a = { "lua vim.lsp.buf.code_action()", "Code Action" }, - d = { - "Telescope diagnostics bufnr=0", - "Document Diagnostics", - }, - w = { - "Telescope diagnostics", - "Workspace Diagnostics", - }, - f = { "lua vim.lsp.buf.format{async=true}", "Format" }, - i = { "LspInfo", "Info" }, - I = { "Mason", "Installer Info" }, - j = { - "lua vim.lsp.diagnostic.goto_next()", - "Next Diagnostic", - }, - k = { - "lua vim.lsp.diagnostic.goto_prev()", - "Prev Diagnostic", - }, - l = { "lua vim.lsp.codelens.run()", "CodeLens Action" }, - q = { "lua vim.diagnostic.setloclist()", "Quickfix" }, - r = { "lua vim.lsp.buf.rename()", "Rename" }, - s = { "Telescope lsp_document_symbols", "Document Symbols" }, - S = { - "Telescope lsp_dynamic_workspace_symbols", - "Workspace Symbols", - }, - }, - s = { - name = "  Search", - b = { "Telescope git_branches", "Checkout branch" }, - c = { "Telescope colorscheme", "Colorscheme" }, - h = { "Telescope help_tags", "Find Help" }, - M = { "Telescope man_pages", "Man Pages" }, - r = { "Telescope oldfiles", "Open Recent File" }, - R = { "Telescope registers", "Registers" }, - k = { "Telescope keymaps", "Keymaps" }, - C = { "Telescope commands", "Commands" }, - }, + l = { + name = "  LSP", + a = { "lua vim.lsp.buf.code_action()", "Code Action" }, + d = { + "Telescope diagnostics bufnr=0", + "Document Diagnostics", + }, + w = { + "Telescope diagnostics", + "Workspace Diagnostics", + }, + f = { "lua vim.lsp.buf.format{async=true}", "Format" }, + i = { "LspInfo", "Info" }, + I = { "Mason", "Installer Info" }, + j = { + "lua vim.lsp.diagnostic.goto_next()", + "Next Diagnostic", + }, + k = { + "lua vim.lsp.diagnostic.goto_prev()", + "Prev Diagnostic", + }, + l = { "lua vim.lsp.codelens.run()", "CodeLens Action" }, + q = { "lua vim.diagnostic.setloclist()", "Quickfix" }, + r = { "lua vim.lsp.buf.rename()", "Rename" }, + s = { "Telescope lsp_document_symbols", "Document Symbols" }, + S = { + "Telescope lsp_dynamic_workspace_symbols", + "Workspace Symbols", + }, + }, + s = { + name = "  Search", + b = { "Telescope git_branches", "Checkout branch" }, + c = { "Telescope colorscheme", "Colorscheme" }, + h = { "Telescope help_tags", "Find Help" }, + M = { "Telescope man_pages", "Man Pages" }, + r = { "Telescope oldfiles", "Open Recent File" }, + R = { "Telescope registers", "Registers" }, + k = { "Telescope keymaps", "Keymaps" }, + C = { "Telescope commands", "Commands" }, + }, - t = { - name = "  Terminal", - l = { "terminal live-server", "Live Server" }, - P = { "lua require('user.utils.whichkey')._NEWTAB_TOGGLE()", "Power Shell" }, - x = { "ToggleTermToggleAll!", "Close Tab" }, - n = { "lua require('user.utils.whichkey')._NODE_TOGGLE()", "Node" }, - b = { "lua require('user.utils.whichkey')._BTOP_TOGGLE()", "Btop" }, - p = { "lua require('user.utils.whichkey')._PYTHON_TOGGLE()", "Python" }, - f = { "ToggleTerm direction=float", "Float" }, - h = { "ToggleTerm size=10 direction=horizontal", "Horizontal" }, - v = { "ToggleTerm size=80 direction=vertical", "Vertical" }, - s = { "ToggleTerm direction=tab", "New Tab" }, - a = { "lua require('user.utils.whichkey')._OPEN_ALACRITTY()", "Open Alacritty" }, - w = { "lua require('user.utils.whichkey')._OPEN_WEZTERM()", "Open Wezterm" }, - t = { "lua require('user.utils.whichkey')._OPEN_WEZTERM_TAB()", "Open Tab Wezterm" }, - j = { "lua _SET_TAB_TITLE()", "Set Tab Title" }, - }, - r = { - name = "  Run", - l = { "edit term://live-server", "Live Server" }, - s = { - 'autocmd bufwritepost [^_]*.sass,[^_]*.scss silent exec "!sass %:p %:r.css"', - "Auto Compile Sass", - }, - r = { "RunCode", "Run Code" }, - f = { "RunFile", "Run File" }, - p = { "RunProject", "Run Project" }, - g = { "terminalgradle run", "Run Gradle" }, - m = { - "terminal mvn package", - "MVN Build", - }, - }, - d = debug_key, - z = { - name = " 󱑠 Plugins(Lazy)", - i = { "Lazy install", "Install" }, - s = { "Lazy sync", "Sync" }, - S = { "Lazy clear", "Status" }, - c = { "Lazy clean", "Clean" }, - u = { "Lazy update", "Update" }, - p = { "Lazy profile", "Profile" }, - l = { "Lazy log", "Log" }, - d = { "Lazy debug", "Debug" }, - }, + t = { + name = "  Terminal", + l = { "terminal live-server", "Live Server" }, + P = { "lua require('user.utils.whichkey')._NEWTAB_TOGGLE()", "Power Shell" }, + x = { "ToggleTermToggleAll!", "Close Tab" }, + n = { "lua require('user.utils.whichkey')._NODE_TOGGLE()", "Node" }, + b = { "lua require('user.utils.whichkey')._BTOP_TOGGLE()", "Btop" }, + p = { "lua require('user.utils.whichkey')._PYTHON_TOGGLE()", "Python" }, + f = { "ToggleTerm direction=float", "Float" }, + h = { "ToggleTerm size=10 direction=horizontal", "Horizontal" }, + v = { "ToggleTerm size=80 direction=vertical", "Vertical" }, + s = { "ToggleTerm direction=tab", "New Tab" }, + a = { "lua require('user.utils.whichkey')._OPEN_ALACRITTY()", "Open Alacritty" }, + w = { "lua require('user.utils.whichkey')._OPEN_WEZTERM()", "Open Wezterm" }, + t = { "lua require('user.utils.whichkey')._OPEN_WEZTERM_TAB()", "Open Tab Wezterm" }, + j = { "lua _SET_TAB_TITLE()", "Set Tab Title" }, + }, + r = { + name = "  Run", + l = { "edit term://live-server", "Live Server" }, + s = { + 'autocmd bufwritepost [^_]*.sass,[^_]*.scss silent exec "!sass %:p %:r.css"', + "Auto Compile Sass", + }, + r = { "RunCode", "Run Code" }, + f = { "RunFile", "Run File" }, + p = { "RunProject", "Run Project" }, + g = { "terminalgradle run", "Run Gradle" }, + m = { + "terminal mvn package", + "MVN Build", + }, + }, + d = debug_key, + z = { + name = " 󱑠 Plugins(Lazy)", + i = { "Lazy install", "Install" }, + s = { "Lazy sync", "Sync" }, + S = { "Lazy clear", "Status" }, + c = { "Lazy clean", "Clean" }, + u = { "Lazy update", "Update" }, + p = { "Lazy profile", "Profile" }, + l = { "Lazy log", "Log" }, + d = { "Lazy debug", "Debug" }, + }, } +table.insert(M.mappings, { ["c"] = { ":call codeium#Chat()", "󰭹 Codeium Chat" } }) + M.mappings2 = { - ["/"] = { "lua require('Comment.api').toggle.linewise(vim.fn.visualmode())", " 󰆈 Commet Block" }, + ["/"] = { "lua require('Comment.api').toggle.linewise(vim.fn.visualmode())", " 󰆈 Commet Block" }, } return M