aboutsummaryrefslogtreecommitdiffhomepage
path: root/vim/nvim/lua/chadrc.lua
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2024-06-24 16:45:18 +0800
committerHsieh Chin Fan <pham@topo.tw>2024-06-24 16:45:18 +0800
commit11863aa710ab0626eb76648d101854a481664a34 (patch)
treeed7d8331ceafbf8c5cc14304d0cd12e031eb2593 /vim/nvim/lua/chadrc.lua
parent76c665e2b3c797c1b77e90337f5db1e77bf60a23 (diff)
Update
Diffstat (limited to 'vim/nvim/lua/chadrc.lua')
-rw-r--r--vim/nvim/lua/chadrc.lua47
1 files changed, 0 insertions, 47 deletions
diff --git a/vim/nvim/lua/chadrc.lua b/vim/nvim/lua/chadrc.lua
deleted file mode 100644
index aa0d78c..0000000
--- a/vim/nvim/lua/chadrc.lua
+++ /dev/null
@@ -1,47 +0,0 @@
1-- This file needs to have same structure as nvconfig.lua
2-- https://github.com/NvChad/NvChad/blob/v2.5/lua/nvconfig.lua
3
4---@type ChadrcConfig
5local M = {}
6
7M.ui = {
8 theme = "onedark",
9
10 -- hl_override = {
11 -- Comment = { italic = true },
12 -- ["@comment"] = { italic = true },
13 -- },
14 tabufline = {
15 enabled = true,
16 },
17}
18
19-- For tabufline
20if M.ui.tabufline.enabled then
21 vim.keymap.set("n", "<C-c>", function()
22 local bufnrs = vim.tbl_filter(function(b)
23 if 1 ~= vim.fn.buflisted(b) then
24 return false
25 else
26 return true
27 end
28 end, vim.api.nvim_list_bufs())
29 if #bufnrs == 1 then
30 vim.cmd("silent quit!")
31 else
32 require("nvchad.tabufline").close_buffer()
33 end
34 end, { desc = "buffer close" })
35 for i = 1, 9, 1 do
36 vim.keymap.set("n", string.format("<A-%s>", i), function()
37 vim.api.nvim_set_current_buf(vim.t.bufs[i])
38 end)
39 end
40 vim.keymap.set("n", "<A-h>", function() require("nvchad.tabufline").move_buf(-1) end)
41 vim.keymap.set("n", "<A-l>", function() require("nvchad.tabufline").move_buf(1) end)
42 vim.keymap.set("n", "<A-H>", function() vim.cmd("tabprevious") end)
43 vim.keymap.set("n", "<A-L>", function() vim.cmd("tabnext") end)
44end
45
46
47return M