diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2024-07-21 19:42:12 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2024-07-21 19:42:12 +0800 |
commit | 3fa3c62ab3439bffacea380631e5e2e4c5a67fcb (patch) | |
tree | 372e7b1bb45c1cef6f0ca3a415fdb78610ecefae /vim/lua | |
parent | 82ed7d4113c474f309ebeb5133873ccf0a2bcda2 (diff) |
Update
Diffstat (limited to 'vim/lua')
-rw-r--r-- | vim/lua/chadrc.lua | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/vim/lua/chadrc.lua b/vim/lua/chadrc.lua index 182ed96..11777ca 100644 --- a/vim/lua/chadrc.lua +++ b/vim/lua/chadrc.lua | |||
@@ -3,70 +3,4 @@ | |||
3 | 3 | ||
4 | ---@type ChadrcConfig | 4 | ---@type ChadrcConfig |
5 | local M = {} | 5 | local M = {} |
6 | |||
7 | M.ui = { | ||
8 | theme = "onedark", | ||
9 | hl_override = { | ||
10 | CursorLineNr = { fg = "#eeee00" }, | ||
11 | }, | ||
12 | |||
13 | -- hl_override = { | ||
14 | -- Comment = { italic = true }, | ||
15 | -- ["@comment"] = { italic = true }, | ||
16 | -- }, | ||
17 | tabufline = { | ||
18 | enabled = true, | ||
19 | order = { "treeOffset", "buffers", "tabs" }, | ||
20 | }, | ||
21 | |||
22 | term = { | ||
23 | hl = "Normal:term,WinSeparator:WinSeparator", | ||
24 | sizes = { sp = 0.4, vsp = 0.4 }, | ||
25 | float = { | ||
26 | relative = "editor", | ||
27 | row = 0.15, | ||
28 | col = 0.13, | ||
29 | width = 0.7, | ||
30 | height = 0.7, | ||
31 | border = "single", | ||
32 | }, | ||
33 | }, | ||
34 | } | ||
35 | |||
36 | -- For tabufline | ||
37 | if M.ui.tabufline.enabled then | ||
38 | vim.api.nvim_exec( | ||
39 | [[ | ||
40 | function! CloseBufferSafely() | ||
41 | lua require("nvchad.tabufline").close_buffer() | ||
42 | endfunction | ||
43 | ]], | ||
44 | false | ||
45 | ) | ||
46 | |||
47 | for i = 1, 9, 1 do | ||
48 | vim.keymap.set("n", string.format("<A-%s>", i), function() | ||
49 | vim.api.nvim_set_current_buf(vim.t.bufs[i]) | ||
50 | end) | ||
51 | end | ||
52 | vim.keymap.set("n", "<A-h>", function() | ||
53 | require("nvchad.tabufline").move_buf(-1) | ||
54 | end) | ||
55 | vim.keymap.set("n", "<A-l>", function() | ||
56 | require("nvchad.tabufline").move_buf(1) | ||
57 | end) | ||
58 | vim.keymap.set("n", "<A-H>", function() | ||
59 | vim.cmd("tabprevious") | ||
60 | end) | ||
61 | vim.keymap.set("n", "<A-L>", function() | ||
62 | vim.cmd("tabnext") | ||
63 | end) | ||
64 | vim.keymap.set("n", "<tab>", function() | ||
65 | require("nvchad.tabufline").next() | ||
66 | end, { desc = "buffer goto next" }) | ||
67 | vim.keymap.set("n", "<S-tab>", function() | ||
68 | require("nvchad.tabufline").prev() | ||
69 | end, { desc = "buffer goto prev" }) | ||
70 | end | ||
71 | |||
72 | return M | 6 | return M |