1
0
Fork 0

refactor: Moved all plugin specs to their own file under truss/lazy

directory.
This commit is contained in:
Tristan Russell 2026-05-08 04:18:59 -04:00
parent 7c6700711d
commit d0291709a9
Signed by: tristanr
GPG Key ID: 4495C92911DF04CA
20 changed files with 117 additions and 104 deletions

2
lua/truss/init.lua Normal file → Executable file
View File

@ -1,6 +1,6 @@
require("truss.remap")
require("truss.set")
require("truss.lazy")
require("truss.lazyInit")
local augroup = vim.api.nvim_create_augroup
local autocmd = vim.api.nvim_create_autocmd

View File

@ -1,103 +0,0 @@
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
-- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct.
-- This is also a good place to setup other settings (vim.opt)
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
-- Setup lazy.nvim
require("lazy").setup({
spec = {
{ -- Syntax Highlighter
'nvim-treesitter/nvim-treesitter', branch = 'main',
lazy = false, build = ":TSUpdate"
},
{ -- Packager Manager (LSPs)
'williamboman/mason.nvim'
},
{ -- Formatter, Linter, etc bridge??
'nvimtools/none-ls.nvim'
},
{ -- LSP Configuration tool
'neovim/nvim-lspconfig'
},
{ -- Snippet engine?
"L3MON4D3/LuaSnip",
version = "v2.4", -- Replace <CurrentMajor> by the latest released major (first number of latest release)
-- install jsregexp (optional!).
build = "make install_jsregexp"
},
{ -- Code completion
'hrsh7th/nvim-cmp'
},
{ -- Utility thing for code completion
'hrsh7th/cmp-nvim-lsp'
},
{ -- Buffer source for code completion
'hrsh7th/cmp-buffer'
},
{ -- Path source for code completion
'hrsh7th/cmp-path'
},
{ -- Cmdline source for code completion
'hrsh7th/cmp-cmdline'
},
{ -- File navigation fuzzy finder
'nvim-telescope/telescope.nvim', version = '*',
dependencies = {
'nvim-lua/plenary.nvim',
-- optional but recommended
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' },
}
},
{ -- File navigation utility
'ThePrimeagen/harpoon'
},
{ -- Undo.. tree
'mbbill/undotree'
},
{ -- Git utility
'tpope/vim-fugitive'
},
{ -- Hex colors
'norcalli/nvim-colorizer.lua',
config=true
},
{ -- Keybind helper
'folke/which-key.nvim',
keys = {
{
"<leader>?",
function()
require("which-key").show({ global = false })
end,
desc = "Buffer Local Keymaps (which-key)",
},
},
},
{ -- Color Scheme
'folke/tokyonight.nvim'
}
},
-- Configure any other settings here. See the documentation for more details.
-- colorscheme that will be used when installing plugins.
install = { colorscheme = { "habamax" } },
-- automatically check for plugin updates
checker = { enabled = true },
})

View File

@ -0,0 +1,4 @@
return {
-- Buffer source for code completion
'hrsh7th/cmp-buffer'
}

View File

@ -0,0 +1,4 @@
return {
-- Cmdline source for code completion
'hrsh7th/cmp-cmdline'
}

View File

@ -0,0 +1,4 @@
return {
-- Utility thing for code completion
'hrsh7th/cmp-nvim-lsp'
}

View File

@ -0,0 +1,4 @@
return {
-- Path source for code completion
'hrsh7th/cmp-path'
}

4
lua/truss/lazy/cmp.lua Normal file
View File

@ -0,0 +1,4 @@
return {
-- Code completion
'hrsh7th/nvim-cmp'
}

View File

@ -0,0 +1,5 @@
return {
-- Hex colors
'norcalli/nvim-colorizer.lua',
config=true
}

View File

@ -0,0 +1,4 @@
return {
-- Git utility
'tpope/vim-fugitive'
}

View File

@ -0,0 +1,4 @@
return {
-- File navigation utility
'ThePrimeagen/harpoon'
}

View File

@ -0,0 +1,4 @@
return {
-- LSP Configuration tool
'neovim/nvim-lspconfig'
}

View File

@ -0,0 +1,7 @@
return {
-- Snippet engine?
"L3MON4D3/LuaSnip",
version = "v2.4", -- Replace <CurrentMajor> by the latest released major (first number of latest release)
-- install jsregexp (optional!).
build = "make install_jsregexp"
}

4
lua/truss/lazy/mason.lua Normal file
View File

@ -0,0 +1,4 @@
return {
-- Packager Manager (LSPs)
'williamboman/mason.nvim'
}

4
lua/truss/lazy/none.lua Normal file
View File

@ -0,0 +1,4 @@
return {
-- Formatter, Linter, etc bridge??
'nvimtools/none-ls.nvim'
}

View File

@ -0,0 +1,9 @@
return {
-- File navigation fuzzy finder
'nvim-telescope/telescope.nvim', version = '*',
dependencies = {
'nvim-lua/plenary.nvim',
-- optional but recommended
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' },
}
}

View File

@ -0,0 +1,4 @@
return {
-- Color Scheme
'folke/tokyonight.nvim'
}

View File

@ -0,0 +1,6 @@
return {
-- Syntax Highlighter
'nvim-treesitter/nvim-treesitter',
lazy = false,
build = ":TSUpdate"
}

View File

@ -0,0 +1,4 @@
return {
-- Undo.. tree
'mbbill/undotree'
}

View File

@ -0,0 +1,13 @@
return {
-- Keybind helper
'folke/which-key.nvim',
keys = {
{
"<leader>?",
function()
require("which-key").show({ global = false })
end,
desc = "Buffer Local Keymaps (which-key)",
},
},
}

28
lua/truss/lazyInit.lua Executable file
View File

@ -0,0 +1,28 @@
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
-- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct.
-- This is also a good place to setup other settings (vim.opt)
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
-- Setup lazy.nvim
require("lazy").setup({
spec = "truss.lazy",
checker = { enabled = true },
})