diff --git a/lua/plugins/mappings.lua b/lua/plugins/mappings.lua index ab245bf..fd2e945 100644 --- a/lua/plugins/mappings.lua +++ b/lua/plugins/mappings.lua @@ -8,6 +8,7 @@ return { mappings = { n = { --essentials + ["x"] = { "source %", desc = "Source Buffer" }, ["d"] = { "_d" }, [""] = { "" }, [""] = { "" }, @@ -27,7 +28,7 @@ return { [""] = { "tabNext", desc = "move to next Tab" }, [""] = { "tabprevious", desc = "move to previous Tab" }, [""] = { "cnext", desc = "next quickfix" }, - ["fl"] = { function() require('helpers').oldfiles({}) end, desc = "find oldfiles" }, + ["fl"] = { function() require("helpers").oldfiles {} end, desc = "Find old fles" }, --git ["gy"] = { "DiffviewFileHistory %", desc = "Git file diff history" }, ["gY"] = { "DiffviewFileHistory", desc = "Git diff history" }, @@ -74,9 +75,9 @@ return { desc = "Pick to close", }, --user extra commands - ["kd"] = {desc =" Database commands"}, - ["kdu"] = {"DBUIToggle",desc ="Toggle ui"}, - ["kda"] = {"DBUIAddConnection",desc ="Add connection"}, + ["kd"] = { desc = " Database commands" }, + ["kdu"] = { "DBUIToggle", desc = "Toggle ui" }, + ["kda"] = { "DBUIAddConnection", desc = "Add connection" }, ["k"] = { desc = " User extra commands" }, ["kr"] = { "lua require('helpers').openMDfile()", desc = "Open md file in glow" }, ["km"] = { @@ -86,7 +87,21 @@ return { ["kj"] = { "set ft=htmldjango", desc = "set ft=htmldjango" }, ["kh"] = { "set ft=html", desc = "set ft=html" }, ["kt"] = { "set ft=templ", desc = "set ft=templ" }, - ["ke"] = {"redir! > error_messages | silent messages | redir END | edit!", desc = "Create error_messages file with vim messages"}, + ["ke"] = { + "redir! > error_messages | silent messages | redir END | edit!", + desc = "Create error_messages file with vim messages", + }, + ["ki"] = { function() require("helpers").go_to_definition() end, desc="Go to definition"}, + + -- telescope + ["fe"] = { + function() + require("telescope.builtin").find_files { + cwd = vim.fn.stdpath "config", + } + end, + desc = "Find config files", + }, --terminal compile sass to css ["ts"] = { function() require("helpers").compile_sass() end, @@ -126,6 +141,7 @@ return { x = { [""] = { ":m '>+1gv-gv" }, [""] = { ":m '<-2gv-gv" }, + ["x"] = { ":lua", desc = "Execute selected line" }, }, }, },