Compare commits

..

No commits in common. "4cb5bb7608466546cf1ce736c756a0361a3cd5d1" and "38b3000be629bb77b96867eb85f53505ece57ba7" have entirely different histories.

3 changed files with 89 additions and 151 deletions

View file

@ -25,9 +25,9 @@ vim.cmd("set undofile")
-- Customize window border -- Customize window border
vim.diagnostic.config({ vim.diagnostic.config({
float = { float = {
border = "single", border = "single",
}, },
}) })
-- Custom Key Binds -- Custom Key Binds
@ -65,17 +65,6 @@ vim.keymap.set("n", "<leader>cd", ":Copilot disable<CR>", { desc = "Disable Copi
vim.keymap.set("n", "<leader>cc", ":CopilotChatToggle<CR>", { desc = "Toggle Copilot Chat" }) vim.keymap.set("n", "<leader>cc", ":CopilotChatToggle<CR>", { desc = "Toggle Copilot Chat" })
vim.keymap.set("n", "<leader>cx", ":CopilotChatReset<CR>", { desc = "Reset Copilot Chat" }) vim.keymap.set("n", "<leader>cx", ":CopilotChatReset<CR>", { desc = "Reset Copilot Chat" })
-- Configure Buffer Navigation
vim.keymap.set("n", "<A-left>", ":BufferPrevious<CR>", { desc = "Previous Buffer" })
vim.keymap.set("n", "<A-right>", ":BufferNext<CR>", { desc = "Next Buffer" })
vim.keymap.set("n", "<A-h>", ":BufferPrevious<CR>", { desc = "Previous Buffer" })
vim.keymap.set("n", "<A-l>", ":BufferNext<CR>", { desc = "Next Buffer" })
vim.keymap.set("n", "<leader>bq", ":BufferClose<CR>", { desc = "Close Buffer" })
vim.keymap.set("n", "<leader>bQ", ":BufferWipeout<CR>", { desc = "Wipeout Buffer" })
vim.keymap.set("n", "<A-q>", ":BufferClose<CR>", { desc = "Close Buffer" })
vim.keymap.set("n", "<leader>bp", ":BufferPrevious<CR>", { desc = "Previous Buffer" })
vim.keymap.set("n", "<leader>bn", ":BufferNext<CR>", { desc = "Next Buffer" })
-- Configure f-key shortcuts -- Configure f-key shortcuts
vim.keymap.set("n", "<F1>", vim.lsp.buf.hover) vim.keymap.set("n", "<F1>", vim.lsp.buf.hover)
vim.keymap.set("i", "<F1>", vim.lsp.buf.hover) vim.keymap.set("i", "<F1>", vim.lsp.buf.hover)

View file

@ -1,136 +1,92 @@
return { return {
{ {
"nvim-lualine/lualine.nvim", "nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" }, dependencies = { "nvim-tree/nvim-web-devicons" },
config = function() config = function()
require("lualine").setup({ require("lualine").setup({
options = { options = {
--`theme=codedark, --`theme=codedark,
component_separators = { left = "", right = "" }, component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" }, section_separators = { left = "", right = "" },
}, },
sections = { sections = {
lualine_a = { "mode" }, lualine_a = { "mode" },
lualine_b = { "branch", "diff", "diagnostics" }, lualine_b = { "branch", "diff", "diagnostics" },
lualine_c = { lualine_c = { { "filename", path = 1 } },
{ "filename", path = 1 }, lualine_x = { "encoding", "filetype" },
lualine_y = {
function()
-- Display an active Python virtual environment if active
local venv = os.getenv("VIRTUAL_ENV")
if venv then
return vim.fn.fnamemodify(venv, ":t")
-- Put other useful paths here as available
else
return ""
end
end,
},
lualine_z = { "location" },
},
})
end,
},
{
-- Determine class/function name "romgrk/barbar.nvim",
function() tag = "v1.9.0",
local current_buff = vim.api.nvim_get_current_buf() --init = function()
local current_node = vim.treesitter.get_node() -- vim.g.barbar_auto_setup = false
if not current_node then --end,
return "" },
end
local class = nil
local func = nil
local expr = current_node
while expr do
if expr:type() == "function_definition" then
func = expr
elseif expr:type() == "class_definition" then
class = expr
end
expr = expr:parent()
end
if not func then {
return "" "folke/which-key.nvim",
end event = "VeryLazy",
for child in func:iter_children() do keys = {
if child:type() == "identifier" then {
func = child "<S-F1>",
break function()
end require("which-key").show()
end end,
local func_text = vim.treesitter.get_node_text(func, current_buff) mode = { "n", "v", "i" },
if class then },
for child in class:iter_children() do },
if child:type() == "identifier" then },
class = child {
break "yegappan/taglist",
end vim.keymap.set("n", "<leader>fs", ":TlistToggle<CR>", { desc = "Toggle Taglist" }),
end vim.cmd("let Tlist_Use_Right_Window = 1"),
func_text = vim.treesitter.get_node_text(class, current_buff) .. ":" .. func_text vim.cmd("let Tlist_Show_One_File = 1"),
end vim.cmd("let Tlist_WinWidth = 50"),
if vim.bo.filetype == "lua" then },
-- Patch out invalid parsing of lua (and other?) files {
return "" "goolord/alpha-nvim",
end vim.keymap.set("n", "<A-left>", ":BufferPrevious<CR>", { desc = "Previous Buffer" }),
return func_text vim.keymap.set("n", "<A-right>", ":BufferNext<CR>", { desc = "Next Buffer" }),
end, vim.keymap.set("n", "<A-h>", ":BufferPrevious<CR>", { desc = "Previous Buffer" }),
}, vim.keymap.set("n", "<A-l>", ":BufferNext<CR>", { desc = "Next Buffer" }),
lualine_x = { "encoding", "filetype" }, vim.keymap.set("n", "<leader>bq", ":BufferClose<CR>", { desc = "Close Buffer" }),
lualine_y = { vim.keymap.set("n", "<A-q>", ":BufferClose<CR>", { desc = "Close Buffer" }),
function() vim.keymap.set("n", "<leader>bp", ":BufferPrevious<CR>", { desc = "Previous Buffer" }),
-- Display an active Python virtual environment if active vim.keymap.set("n", "<leader>bn", ":BufferNext<CR>", { desc = "Next Buffer" }),
local venv = os.getenv("VIRTUAL_ENV") dependencies = { "nvim-tree/nvim-web-devicons" },
if venv then config = function()
return vim.fn.fnamemodify(venv, ":t") local alpha = require("alpha")
-- Put other useful paths here as available local dashboard = require("alpha.themes.startify")
else
return ""
end
end,
},
lualine_z = { "location" },
},
})
end,
},
{
"romgrk/barbar.nvim",
tag = "v1.9.1",
init = function()
vim.g.barbar_auto_setup = false
end,
opts = {
animation = false,
},
},
{
"folke/which-key.nvim",
event = "VeryLazy",
keys = {
{
"<S-F1>",
function()
require("which-key").show()
end,
mode = { "n", "v", "i" },
},
},
},
{
"preservim/tagbar",
vim.keymap.set("n", "<leader>fs", ":TagbarToggle<CR>", { desc = "Toggle Tagbar" }),
},
--{
-- "yegappan/taglist",
-- vim.keymap.set("n", "<leader>fs", ":TlistToggle<CR>", { desc = "Toggle Taglist" }),
-- vim.cmd("let Tlist_Use_Right_Window = 1"),
-- vim.cmd("let Tlist_Show_One_File = 1"),
-- vim.cmd("let Tlist_WinWidth = 50"),
--},
{
"goolord/alpha-nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
local alpha = require("alpha")
local dashboard = require("alpha.themes.startify")
dashboard.section.header.val = { dashboard.section.header.val = {
" ", " ",
" ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ", " ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ",
" ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ", " ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ",
" ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ", " ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ",
" ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ", " ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ",
" ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ", " ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ",
" ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ", " ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ",
" ", " ",
} }
alpha.setup(dashboard.opts) alpha.setup(dashboard.opts)
end, end,
}, },
} }

View file

@ -8,13 +8,6 @@ return {
}, },
{ {
"pocco81/auto-save.nvim", "pocco81/auto-save.nvim",
event = { "InsertLeave", "TextChanged" },
config = function()
require("auto-save").setup({
enabled = true,
trigger_events = { "InsertLeave", "TextChanged" },
})
end,
keys = { keys = {
{ "<leader>as", "<cmd>ASToggle<cr>", desc = "Toggle Auto Save" }, { "<leader>as", "<cmd>ASToggle<cr>", desc = "Toggle Auto Save" },
}, },