Browse Source

update: go to definition, find config files and more

master
Lucas 1 month ago
parent
commit
95228e8e69
  1. 20
      lua/plugins/mappings.lua

20
lua/plugins/mappings.lua

@ -8,6 +8,7 @@ return {
mappings = {
n = {
--essentials
["<space><space>x"] = { "<cmd>source %<CR>", desc = "Source Buffer" },
["d"] = { "_d" },
["<esc>"] = { "<Nop>" },
["<C-z>"] = { "<Nop>" },
@ -27,7 +28,7 @@ return {
["<C-]>"] = { "<cmd>tabNext<cr>", desc = "move to next Tab" },
["<C-[>"] = { "<cmd>tabprevious<cr>", desc = "move to previous Tab" },
["<CS-]>"] = { "<cmd>cnext<cr>", desc = "next quickfix" },
["<leader>fl"] = { function() require('helpers').oldfiles({}) end, desc = "find oldfiles" },
["<leader>fl"] = { function() require("helpers").oldfiles {} end, desc = "Find old fles" },
--git
["<leader>gy"] = { "<cmd>DiffviewFileHistory %<cr>", desc = "Git file diff history" },
["<leader>gY"] = { "<cmd>DiffviewFileHistory<cr>", desc = "Git diff history" },
@ -86,7 +87,21 @@ return {
["<leader>kj"] = { "<cmd>set ft=htmldjango<cr>", desc = "set ft=htmldjango" },
["<leader>kh"] = { "<cmd>set ft=html<cr>", desc = "set ft=html" },
["<leader>kt"] = { "<cmd>set ft=templ<cr>", desc = "set ft=templ" },
["<leader>ke"] = {"<cmd>redir! > error_messages | silent messages | redir END | edit!<CR>", desc = "Create error_messages file with vim messages"},
["<leader>ke"] = {
"<cmd>redir! > error_messages | silent messages | redir END | edit!<CR>",
desc = "Create error_messages file with vim messages",
},
["<leader>ki"] = { function() require("helpers").go_to_definition() end, desc="Go to definition"},
-- telescope
["<leader>fe"] = {
function()
require("telescope.builtin").find_files {
cwd = vim.fn.stdpath "config",
}
end,
desc = "Find config files",
},
--terminal compile sass to css
["<leader>ts"] = {
function() require("helpers").compile_sass() end,
@ -126,6 +141,7 @@ return {
x = {
["<A-j>"] = { ":m '>+1<CR>gv-gv" },
["<A-k>"] = { ":m '<-2<CR>gv-gv" },
["<leader>x"] = { ":lua<CR>", desc = "Execute selected line" },
},
},
},

Loading…
Cancel
Save