Split config

This commit is contained in:
Christopher Williams
2026-01-11 21:30:04 -05:00
parent 441bad3dde
commit be09201c95
9 changed files with 388 additions and 305 deletions
+64
View File
@@ -0,0 +1,64 @@
local M = {
{
"zbirenbaum/copilot.lua",
dependencies = {
"copilotlsp-nvim/copilot-lsp",
},
cmd = "Copilot",
build = ":Copilot auth",
event = "BufReadPost",
config = function()
require("copilot").setup({
suggestion = {
enabled = true,
auto_trigger = true,
keymap = {
accept = "<M-j>",
accept_line = "<M-l>",
accept_word = "<M-k>",
next = "<M-]>",
prev = "<M-[>",
dismiss = "<M-c>",
},
},
nes = {
enabled = false,
keymap = {
accept_and_goto = "<leader>p",
accept = false,
dismiss = "<Esc>",
},
},
panel = { enabled = false },
filetypes = {
lua = true,
markdown = true,
help = true,
},
})
vim.api.nvim_create_autocmd("User", {
pattern = "BlinkCmpMenuOpen",
callback = function()
vim.b.copilot_suggestion_hidden = true
end,
})
vim.api.nvim_create_autocmd("User", {
pattern = "BlinkCmpMenuClose",
callback = function()
vim.b.copilot_suggestion_hidden = false
end,
})
end,
},
{
"CopilotC-Nvim/CopilotChat.nvim",
dependencies = {
{ "nvim-lua/plenary.nvim", branch = "master" },
},
build = "make tiktoken",
opts = {},
},
}
return M
+18
View File
@@ -0,0 +1,18 @@
local M = {
{
"folke/tokyonight.nvim",
lazy = false,
priority = 1000,
opts = {},
},
{ "nvim-tree/nvim-web-devicons", opts = {} },
{
"https://github.com/nvim-lualine/lualine.nvim",
event = "VeryLazy",
config = function()
require("lualine").setup()
end,
},
}
return M
+248
View File
@@ -0,0 +1,248 @@
local M = {
{
"folke/which-key.nvim",
event = "VeryLazy",
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
},
keys = {
{
"<leader>?",
function()
require("which-key").show({ global = false })
end,
desc = "Buffer Local Keymaps (which-key)",
},
},
},
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
local ensureInstalled = {
"lua",
"python",
"javascript",
"typescript",
"java",
"go",
"rust",
"html",
"css",
"json",
"yaml",
"markdown",
"sql",
"org",
}
local alreadyInstalled = require("nvim-treesitter.config").get_installed()
local parsersToInstall = vim.iter(ensureInstalled)
:filter(function(parser)
return not vim.tbl_contains(alreadyInstalled, parser)
end)
:totable()
require("nvim-treesitter").install(parsersToInstall)
end,
},
{
"nvim-treesitter/nvim-treesitter-textobjects",
branch = "main",
},
{
"junegunn/fzf.vim",
dependencies = {
"https://github.com/junegunn/fzf",
},
keys = {
{ "<Leader><Leader>", "<Cmd>Files<CR>", desc = "Find files" },
{ "<Leader>,", "<Cmd>Buffers<CR>", desc = "Find buffers" },
{ "<Leader>/", "<Cmd>Rg<CR>", desc = "Search project" },
},
},
{
"stevearc/oil.nvim",
config = function()
require("oil").setup()
end,
keys = {
{ "-", "<Cmd>Oil<CR>", desc = "Browse files from here" },
},
},
{
"farmergreg/vim-lastplace",
event = "BufReadPost",
},
{
"windwp/nvim-autopairs",
event = "InsertEnter",
config = function()
require("nvim-autopairs").setup()
end,
},
{
"numToStr/Comment.nvim",
event = "VeryLazy",
config = function()
require("Comment").setup()
end,
},
{
"folke/flash.nvim",
event = "VeryLazy",
keys = {
{
"s",
mode = { "n", "x", "o" },
function()
require("flash").jump()
end,
desc = "Flash",
},
{
"S",
mode = { "n", "x", "o" },
function()
require("flash").treesitter()
end,
desc = "Flash Treesitter",
},
{
"r",
mode = "o",
function()
require("flash").remote()
end,
desc = "Remote Flash",
},
{
"R",
mode = { "o", "x" },
function()
require("flash").treesitter_search()
end,
desc = "Treesitter Search",
},
{
"<c-s>",
mode = { "c" },
function()
require("flash").toggle()
end,
desc = "Toggle Flash Search",
},
},
config = function()
require("flash").setup({
modes = {
search = {
enabled = true,
},
char = {
enabled = true,
jump_labels = true,
},
}
})
end,
},
{
"folke/snacks.nvim",
priority = 1000,
lazy = false,
---@type snacks.Config
opts = {
bigfile = { enabled = true },
dashboard = { enabled = true },
explorer = { enabled = true },
indent = { enabled = true },
input = { enabled = true },
picker = { enabled = true },
notifier = { enabled = true },
quickfile = { enabled = true },
scope = { enabled = true },
scroll = {
enabled = true,
animate = {
duration = { step = 10, total = 100 },
easing = "linear",
},
},
statuscolumn = { enabled = true },
words = { enabled = true },
},
config = function(_, opts)
function floating_terminal()
require("snacks").terminal("fish", {
win = {
position = "float",
width = 0.8,
height = 0.8,
border = "rounded",
},
})
end
vim.keymap.set("n", "<leader>tf", floating_terminal, { desc = "Open floating terminal" })
vim.keymap.set("n", "<leader>\\", floating_terminal, { desc = "Open floating terminal" })
require("snacks").setup(opts)
end,
},
{
"lukas-reineke/indent-blankline.nvim",
event = { "VeryLazy" },
config = function()
require("ibl").setup()
end,
},
{
"stevearc/conform.nvim",
opts = {},
config = function()
local conform = require("conform")
conform.setup({
formatters_by_ft = {
lua = { "stylua" },
python = {
"ruff_fix",
"ruff_format",
},
},
})
vim.api.nvim_create_user_command("Format", function(args)
local range = nil
if args.count ~= -1 then
local end_line = vim.api.nvim_buf_get_lines(0, args.line2 - 1, args.line2, true)[1]
range = {
start = { args.line1, 0 },
["end"] = { args.line2, end_line:len() },
}
end
require("conform").format({
async = true,
lsp_fallback = true,
range = range,
})
end, { range = true, desc = "Format buffer or range with conform.nvim" })
vim.keymap.set("n", "<leader>lf", "<cmd>Format<cr>", { desc = "Format buffer with conform.nvim" })
end,
},
{
"serhez/bento.nvim",
config = function()
require("bento").setup({
main_keymap = ",",
})
end,
},
{
"brianhuster/live-preview.nvim",
dependencies = {
"ibhagwan/fzf-lua",
},
},
}
return M
+16
View File
@@ -0,0 +1,16 @@
local M = {
{
"NeogitOrg/neogit",
lazy = true,
dependencies = {
"nvim-lua/plenary.nvim",
"sindrets/diffview.nvim",
},
cmd = "Neogit",
keys = {
{ "<leader>gg", "<cmd>Neogit<cr>", desc = "Show Neogit UI" },
},
},
}
return M
+1 -5
View File
@@ -11,7 +11,6 @@ local M = {
},
{
"saghen/blink.cmp",
-- optional: provides snippets for the snippet source
dependencies = { "rafamadriz/friendly-snippets" },
-- use a release tag to download pre-built binaries
@@ -106,10 +105,7 @@ local M = {
end
require("ufo").setup()
end,
},
{
"AckslD/swenv.nvim",
},
}
}
return M
+31
View File
@@ -0,0 +1,31 @@
local M = {
{
"nvim-orgmode/orgmode",
tag = "0.7.0",
event = "VeryLazy",
ft = { "org" },
config = function()
require("orgmode").setup({
org_agenda_files = "~/org/**/*",
org_default_notes_file = "~/org/refile.org",
})
-- Create TANGLE command
vim.api.nvim_create_user_command("TANGLE", function()
require("orgmode").action("org_mappings.org_babel_tangle")
end, {})
end,
},
{
"chipsenkbeil/org-roam.nvim",
tag = "0.2.0",
config = function()
require("org-roam").setup({
directory = "~/org",
})
end,
},
}
return M