Skip to content

Commit

Permalink
[feat] optimize key mappings with project manipulation
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxing3 committed Dec 30, 2023
1 parent 24a582d commit 469b18b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"mini.bufremove": { "branch": "main", "commit": "020243bfed8c8b941f2c20626faf3ea39c0c0e1b" },
"mini.comment": { "branch": "main", "commit": "67f00d3ebbeae15e84584d971d0c32aad4f4f3a4" },
"mini.files": { "branch": "main", "commit": "8e4541ee5d2c3d37c49fa0953c0255066939b09a" },
"mini.hipatterns": { "branch": "main", "commit": "82d348b05328705a7048f852f15f66a482562f03" },
"mini.indentscope": { "branch": "main", "commit": "5a8369475cd7cd6f207a4d288406d03b0fc48bdb" },
"mini.map": { "branch": "main", "commit": "394a774459bf8db7db94385478741a1ace54c93c" },
"mini.move": { "branch": "main", "commit": "03a16d64e58da0a871de6493c3d8fa1101baef46" },
Expand Down
8 changes: 6 additions & 2 deletions lua/config/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ map("n", "<leader>tc", "<cmd>Telescope colorscheme<cr>", { desc = "Change ColorS

-- find projects
map({ "n", "v", "i" }, "<f4>", "<cmd>Telescope projects<cr>", { desc = "List Projects" })
map({ "n", "v" }, "<space>np", "<cmd>AddProject<cr>", { desc = "Add Projects" })
map({ "n", "v" }, "<space>pp", "<cmd>Telescope projects<cr>", { desc = "List Projects" })
map({ "n", "v" }, "<space>pa", "<cmd>AddProject<cr>", { desc = "Add Projects" })

-- yank history
map({ "n", "v" }, "<space>sy", "<cmd>Telescope yarn_history<cr>", { desc = "Yank history" })

-- file explorer
map({ "n", "v" }, "<f3>", "<cmd>Neotree toggle<cr>", { desc = "Toggle neotree" })
Expand Down Expand Up @@ -212,7 +216,7 @@ end
local lazyterm = function() Util.terminal.open(nil, { cwd = Util.root.get(), float = { border = "rounded"} }) end
map("n", "<C-`>", lazyterm, { desc = "Terminal (root dir)" })
-- floating terminal
map("n", "<leader>ft", function() Util.terminal.open("zsh", { cwd = Util.root.get(), esc_esc = false, ctrl_hjkl = false, float = { border = "rounded"}}) end, { desc = "Zsh (root dir)" })
map("n", "<leader>ft", function() Util.terminal.open("fish", { cwd = Util.root.get(), esc_esc = false, ctrl_hjkl = false, float = { border = "rounded"}}) end, { desc = "Fish (root dir)" })

-- Terminal Mappings
map("t", "<esc><esc>", "<c-\\><c-n>", { desc = "Enter Normal Mode" })
Expand Down
1 change: 1 addition & 0 deletions lua/config/lazy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ require("lazy").setup({
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- import any extras modules here
{ import = "lazyvim.plugins.extras.util.project" },
{ import = "lazyvim.plugins.extras.util.mini-hipatterns" },
{ import = "lazyvim.plugins.extras.editor.mini-files" },
{ import = "lazyvim.plugins.extras.ui.mini-animate" },
-- import/override with your plugins
Expand Down
1 change: 1 addition & 0 deletions lua/plugins/editor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ return {
["<leader>o"] = { name = "+org" },
["<leader>gh"] = { name = "+hunks" },
["<leader>n"] = { name = "+new" },
["<leader>p"] = { name = "+project" },
["<leader>q"] = { name = "+quit/session" },
["<leader>s"] = { name = "+search" },
["<leader>u"] = { name = "+ui" },
Expand Down

0 comments on commit 469b18b

Please sign in to comment.