aboutsummaryrefslogtreecommitdiffhomepage
path: root/vim/lua
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2024-06-26 21:29:34 +0800
committerHsieh Chin Fan <pham@topo.tw>2024-06-26 21:29:34 +0800
commite58f70b411ae935fcd32f00d9e3983381fdc0294 (patch)
tree5672bd85da49640e599d4f340c609d74cbd5e990 /vim/lua
parent44f31b1f27c2a53cf8a4e053a50c245e379558b0 (diff)
Update
Diffstat (limited to 'vim/lua')
-rw-r--r--vim/lua/mappings.lua7
-rw-r--r--vim/lua/plugins/init.lua5
2 files changed, 11 insertions, 1 deletions
diff --git a/vim/lua/mappings.lua b/vim/lua/mappings.lua
index 9151f17..eaa6e68 100644
--- a/vim/lua/mappings.lua
+++ b/vim/lua/mappings.lua
@@ -110,7 +110,6 @@ end, { desc = "Create a new snippet" })
110-- map("n", "<leader>ma", "<cmd>Telescope marks<CR>", { desc = "telescope find marks" }) 110-- map("n", "<leader>ma", "<cmd>Telescope marks<CR>", { desc = "telescope find marks" })
111-- map("n", "<leader>cm", "<cmd>Telescope git_commits<CR>", { desc = "telescope git commits" }) 111-- map("n", "<leader>cm", "<cmd>Telescope git_commits<CR>", { desc = "telescope git commits" })
112-- map("n", "<leader>gt", "<cmd>Telescope git_status<CR>", { desc = "telescope git status" }) 112-- map("n", "<leader>gt", "<cmd>Telescope git_status<CR>", { desc = "telescope git status" })
113-- map("n", "<leader>th", "<cmd>Telescope themes<CR>", { desc = "telescope nvchad themes" })
114 113
115-- terminal 114-- terminal
116-- map("t", "<C-x>", "<C-\\><C-N>", { desc = "terminal escape terminal mode" }) 115-- map("t", "<C-x>", "<C-\\><C-N>", { desc = "terminal escape terminal mode" })
@@ -120,8 +119,11 @@ vim.keymap.set("n", "<leader><leader>h", function() require("nvchad.term").new {
120vim.keymap.set("n", "<leader>v", function() require("nvchad.term").new { pos = "vsp" } end, { desc = "terminal new vertical window" }) 119vim.keymap.set("n", "<leader>v", function() require("nvchad.term").new { pos = "vsp" } end, { desc = "terminal new vertical window" })
121-- toggleable 120-- toggleable
122vim.keymap.set({ "n", "t" }, "<A-v>", function() require("nvchad.term").toggle { pos = "vsp", id = "vtoggleTerm" } end, { desc = "terminal toggleable vertical term" }) 121vim.keymap.set({ "n", "t" }, "<A-v>", function() require("nvchad.term").toggle { pos = "vsp", id = "vtoggleTerm" } end, { desc = "terminal toggleable vertical term" })
122vim.keymap.set("t", "<C-x>", "<C-\\><C-N>", { desc = "terminal escape terminal mode" })
123vim.keymap.set({ "t" }, "<A-e>", "<C-\\><C-N><C-W>|<C-W>_i", { desc = "terminal toggleable vertical term" })
123vim.keymap.set({ "n", "t" }, "<A-t>", function() require("nvchad.term").toggle { pos = "sp", id = "htoggleTerm" } end, { desc = "terminal new horizontal term" }) 124vim.keymap.set({ "n", "t" }, "<A-t>", function() require("nvchad.term").toggle { pos = "sp", id = "htoggleTerm" } end, { desc = "terminal new horizontal term" })
124vim.keymap.set({ "n", "t" }, "<A-i>", function() require("nvchad.term").toggle { pos = "float", id = "floatTerm" } end, { desc = "terminal toggle floating term" }) 125vim.keymap.set({ "n", "t" }, "<A-i>", function() require("nvchad.term").toggle { pos = "float", id = "floatTerm" } end, { desc = "terminal toggle floating term" })
126vim.keymap.set("n", "<leader>th", "<cmd>Telescope themes<CR>", { desc = "telescope nvchad themes" })
125 127
126-- whichkey 128-- whichkey
127vim.keymap.set("n", "<leader>wK", "<cmd>WhichKey <CR>", { desc = "whichkey all keymaps" }) 129vim.keymap.set("n", "<leader>wK", "<cmd>WhichKey <CR>", { desc = "whichkey all keymaps" })
@@ -169,6 +171,9 @@ vim.g.mkdp_preview_options = {
169vim.keymap.set('n', "<space>", ':HopWord<CR>') 171vim.keymap.set('n', "<space>", ':HopWord<CR>')
170vim.keymap.set('n', '<C-.>', ':HopChar1<CR>') 172vim.keymap.set('n', '<C-.>', ':HopChar1<CR>')
171 173
174-- [ Configure vim-surround ]
175vim.cmd('vmap s S')
176
172-- [ Aerial ] 177-- [ Aerial ]
173vim.keymap.set("n", "{", "<cmd>AerialPrev<CR>", {}) 178vim.keymap.set("n", "{", "<cmd>AerialPrev<CR>", {})
174vim.keymap.set("n", "}", "<cmd>AerialNext<CR>", {}) 179vim.keymap.set("n", "}", "<cmd>AerialNext<CR>", {})
diff --git a/vim/lua/plugins/init.lua b/vim/lua/plugins/init.lua
index 8c49369..f54e21d 100644
--- a/vim/lua/plugins/init.lua
+++ b/vim/lua/plugins/init.lua
@@ -233,6 +233,11 @@ return {
233 }, 233 },
234 }, 234 },
235 235
236 {
237 'tpope/vim-surround',
238 lazy = false,
239 }
240
236 241
237 -- { 242 -- {
238 -- 'akinsho/bufferline.nvim', 243 -- 'akinsho/bufferline.nvim',