diff --git a/nvim/lua/before/init.lua b/nvim/lua/before/init.lua index ada2f9f..c2cf4d1 100644 --- a/nvim/lua/before/init.lua +++ b/nvim/lua/before/init.lua @@ -1,156 +1,11 @@ require("before.config") require("before.remap") require("before.globals") - - -- TODO -- Floating terminal opening multiple windows -- Debugging -- Formatting for errors -- Keymaps for Lazy( Require their own sections for config), FloatingTerminal -- Why is hop populating my jumplist???? --- Njuwate_bufs = {} -- Working on how the tabs are shown -- Change --- --- --- Previous configuration: To be reviewed --- Njuwate_bufs = {} - -- - -- vim.api.nvim_create_augroup("AddingBuffers", { clear = true }) - -- vim.api.nvim_create_autocmd("BufReadPost", { - -- desc = "Add Buffer to its window list when opened for the first time", - -- group = "AddingBuffers", - -- callback = function() - -- local current_bufnr = vim.api.nvim_get_current_buf() - -- local current_tabnr = vim.api.nvim_get_current_tabpage() - -- local window = vim.api.nvim_get_current_win() - -- local buffername = vim.fn.bufname(vim.fn.bufnr(window)) - -- -- local winnr = vim.fn.winbufnr(window) - -- -- if string.find(buffername, "neo%-tree filesystem") then - -- -- return - -- -- end - -- if Njuwate_bufs[current_tabnr] == nil then - -- Njuwate_bufs[current_tabnr] = {} - -- end - -- local tab_bufnrs = Njuwate_bufs[current_tabnr] - -- table.insert(tab_bufnrs, current_bufnr) - -- Njuwate_bufs[current_tabnr] = tab_bufnrs - -- -- table.insert(Njuwate_bufs[current_tabnr], current_bufnr) - -- end - -- - -- }) - -- vim.api.nvim_create_augroup("DeleteBuffers", { clear = true }) - -- vim.api.nvim_create_autocmd("BufDelete", { - -- desc = "Add Buffer to its window list when opened for the first time", - -- group = "DeleteBuffers", - -- callback = function() - -- local current_bufnr = vim.api.nvim_get_current_buf() - -- local current_tabnr = vim.api.nvim_get_current_tabpage() - -- if type(Njuwate_bufs[current_tabnr] ) == "table" then - -- table.remove(Njuwate_bufs[current_tabnr], current_bufnr) - -- end - -- end - -- - -- }) - -- -- vim.api.nvim_create_augroup("customizefloatingwindow", { clear = true }) - -- -- vim.api.nvim_create_autocmd("WinNew", { - -- -- desc = "Make some customization if the new window is a floating type", - -- -- group = "customizefloatingwindow", - -- -- callback = function() - -- -- local winconfig = vim.api.nvim_win_get_config(0) - -- -- for k, v in pairs(winconfig) do - -- -- vim.notify("Value of k: %",) - -- -- -- vim.inspect("Value of v: %d", v) - -- -- end - -- -- end - -- - -- -- }) - -- vim.api.nvim_create_augroup("switchingTabs", { clear = true }) - -- vim.api.nvim_create_autocmd("TabLeave", { - -- desc = "Fire when switching Tabs", - -- group = "switchingTabs", - -- callback = function() - -- local windows = vim.api.nvim_list_wins() - -- for _, window in ipairs(windows) do - -- local bufferName = vim.fn.bufname(vim.fn.winbufnr(window)) - -- if string.find(bufferName, "neo%-tree filesystem") then - -- vim.cmd.Neotree "toggle" - -- break - -- end - -- end - -- end - -- }) - -- - -- -- TODO - -- -- Tab renaming - -- -- - -- - -- - - -- }, - -- mappings = { - -- n = { - -- ["gg"] = { - -- function() - -- local gitdir = vim.fn.system("git rev-parse --show-toplevel") - -- local flags = "-p " .. gitdir - -- local utils = require "astronvim.utils" - -- utils.toggle_term_cmd("lazygit " .. flags) - -- end, - -- desc = "ToggleTerm lazygit", - -- }, - -- - -- -- Move between buffers in the same Viim Tab Section - -- ["H"] = { function() - -- require("astronvim.utils.buffer") - -- .nav(-(vim.v.count > 0 and vim.v.count or 1)) - -- end, - -- desc = "Move to prev Buffer" }, - -- ["L"] = { function() - -- require("astronvim.utils.buffer") - -- .nav(vim.v.count > 0 and vim.v.count or 1) - -- end, desc = "Move to next Buffer" }, - -- - -- -- ["r"] = { "diffoff!windo diffthis", desc = "Diff two open window buffers" }, - -- - -- }, - -- }, --- } - - --- ---Plugins to Consider --- -- nvim-bqf, --- --- , --- { --- "nvim-telescope/telescope.nvim", --- event = "VeryLazy", --- config = function (_, opts) --- require("telescope").setup(opts) --- local actions = require("telescope.actions") --- require("telescope").setup({ --- pickers ={ --- buffers = { --- mappings = { --- i = {[""] = actions.select_tab_drop} --- }, --- find_files = { --- i = {[""] = actions.select_tab_drop} --- }, --- git_files = { --- mappings = { --- i = {[""] = actions.select_tab_drop} --- }, --- }, --- old_files = { --- mappings = { --- i = {[""] = actions.select_tab_drop} --- } --- } --- } --- } --- }) --- end --- --- },