| skipped 21 lines |
22 | 22 | | desc = "Previous buffer", |
23 | 23 | | }, |
24 | 24 | | -- better search |
25 | | - | n = { require("user.utils").better_search "n", desc = "Next search" }, |
26 | | - | N = { require("user.utils").better_search "N", desc = "Previous search" }, |
| 25 | + | n = { utils.better_search "n", desc = "Next search" }, |
| 26 | + | N = { utils.better_search "N", desc = "Previous search" }, |
27 | 27 | | -- better increment/decrement |
28 | 28 | | ["-"] = { "<c-x>", desc = "Descrement number" }, |
29 | 29 | | ["+"] = { "<c-a>", desc = "Increment number" }, |
| skipped 7 lines |
37 | 37 | | -- buffer switching |
38 | 38 | | ["<Tab>"] = { |
39 | 39 | | function() |
40 | | - | if #vim.t.bufs > 1 then require("telescope.builtin").buffers { previewer = false, sort_lastused = true } end |
| 40 | + | if #vim.t.bufs > 1 then |
| 41 | + | require("telescope.builtin").buffers { sort_mru = true, ignore_current_buffer = true } |
| 42 | + | else |
| 43 | + | astro_utils.notify "No other buffers open" |
| 44 | + | end |
41 | 45 | | end, |
42 | 46 | | desc = "Switch Buffers", |
43 | 47 | | }, |
| skipped 20 lines |
64 | 68 | | function() |
65 | 69 | | vim.cmd "silent! write" |
66 | 70 | | local filename = vim.fn.expand "%:t" |
67 | | - | utils.async_run( |
68 | | - | { "compiler", vim.fn.expand "%:p" }, |
69 | | - | function() utils.quick_notification("Compiled " .. filename) end |
70 | | - | ) |
| 71 | + | utils.async_run({ "compiler", vim.fn.expand "%:p" }, function() astro_utils.notify("Compiled " .. filename) end) |
71 | 72 | | end, |
72 | 73 | | desc = "Compile", |
73 | 74 | | }, |
74 | 75 | | ["<leader>ma"] = { |
75 | 76 | | function() |
76 | 77 | | vim.notify "Autocompile Started" |
77 | | - | utils.async_run( |
78 | | - | { "autocomp", vim.fn.expand "%:p" }, |
79 | | - | function() utils.quick_notification "Autocompile stopped" end |
80 | | - | ) |
| 78 | + | utils.async_run({ "autocomp", vim.fn.expand "%:p" }, function() astro_utils.notify "Autocompile stopped" end) |
81 | 79 | | end, |
82 | 80 | | desc = "Auto Compile", |
83 | 81 | | }, |
| skipped 11 lines |
95 | 93 | | "beamer", |
96 | 94 | | "-o", |
97 | 95 | | vim.fn.expand "%:r" .. ".pdf", |
98 | | - | }, function() utils.quick_notification("Compiled " .. filename) end) |
| 96 | + | }, function() astro_utils.notify("Compiled " .. filename) end) |
99 | 97 | | end, |
100 | 98 | | desc = "Compile Beamer", |
101 | 99 | | }, |
| skipped 96 lines |