ctrl k
  • mappings.lua
    ■ ■ ■ ■ ■ ■
    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
  • plugins/core.lua
    ■ ■ ■ ■ ■
    skipped 3 lines
    4 4   
    5 5   { "akinsho/toggleterm.nvim", opts = { terminal_mappings = false } },
    6 6   { "folke/which-key.nvim", opts = { window = { border = "none" } } },
     7 + { "rcarriga/nvim-notify", opts = { timeout = 0 } },
    7 8  }
    8 9   
  • plugins/telescope.lua
    ■ ■ ■ ■ ■
    skipped 61 lines
    62 62   hidden = true,
    63 63   },
    64 64   buffers = {
     65 + path_display = { "smart" },
    65 66   mappings = {
    66 67   i = { ["<c-d>"] = actions.delete_buffer },
    67 68   n = { ["d"] = actions.delete_buffer },
    skipped 14 lines
  • utils.lua
    ■ ■ ■ ■ ■ ■
    1 1  local M = {}
    2 2   
    3  -function M.quick_notification(msg, type) require("core.utils").notify(msg, type or "info", { timeout = 0 }) end
    4  - 
    5 3  function M.vim_opt_toggle(opt, on, off, name)
    6 4   if on == nil then on = true end
    7 5   if off == nil then off = false end
    8 6   if not name then name = opt end
    9 7   local is_off = vim.opt[opt]:get() == off
    10 8   vim.opt[opt] = is_off and on or off
    11  - M.quick_notification(name .. " " .. (is_off and "Enabled" or "Disabled"))
     9 + require("core.utils").notify(name .. " " .. (is_off and "Enabled" or "Disabled"))
    12 10  end
    13 11   
    14 12  function M.async_run(cmd, on_finish)
    skipped 43 lines
    58 56   if searched then
    59 57   pcall(vim.cmd.normal, "zzzv")
    60 58   else
    61  - M.quick_notification(error, "error")
     59 + require("core.utils").notify(error, "error")
    62 60   end
    63 61   vim.opt.hlsearch = searched
    64 62   end
    skipped 4 lines
Page is in error, reload to recover