feat: Replaced packer with lazy. Added which-key & none-ls. Removed

mason-lspconfig, and completion tools
This commit is contained in:
Tristan Russell 2025-08-24 22:21:08 -04:00
parent db2fb54305
commit 992d7227db
Signed by: tristanr
GPG Key ID: 4495C92911DF04CA
3 changed files with 64 additions and 42 deletions

View File

@ -1,4 +1,4 @@
require("truss.packer")
require("truss.lazy")
require("truss.remap")
require("truss.set")

63
lua/truss/lazy.lua Normal file
View File

@ -0,0 +1,63 @@
-- 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 = 'master',
lazy = false, build = ":TSUpdate"
},
{ -- Packager Manager (LSPs)
'williamboman/mason.nvim'
},
{ -- Formatter, Linter, etc bridge??
'nvimtools/none-ls.nvim'
},
{ -- File navigation fuzzy finder
'nvim-telescope/telescope.nvim',
tag = '0.1.8',
dependencies = { 'nvim-lua/plenary.nvim' }
},
{ -- File navigation utility
'ThePrimeagen/harpoon'
},
{ -- Undo.. tree
'mbbill/undotree'
},
{ -- Git utility
'tpope/vim-fugitive'
},
{
'folke/which-key.nvim'
},
{ -- 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

@ -1,41 +0,0 @@
vim.cmd [[packadd packer.nvim]]
return require('packer').startup(function(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
-- Telescope
use({
'nvim-telescope/telescope.nvim',
tag = '0.1.8',
requires = { { 'nvim-lua/plenary.nvim' } }
})
-- Treesitter
use({
'nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' }
})
use 'nvim-treesitter/playground'
-- LSP / Autocompletion
use({'williamboman/mason.nvim'})
use({'williamboman/mason-lspconfig.nvim'})
use({'neovim/nvim-lspconfig'})
use({'hrsh7th/nvim-cmp'})
use({'hrsh7th/cmp-nvim-lsp'})
use({'hrsh7th/cmp-buffer'})
use({'hrsh7th/cmp-path'})
use({'hrsh7th/cmp-cmdline'})
-- Harpoon
use 'ThePrimeagen/harpoon'
-- Undo Tree
use 'mbbill/undotree'
-- Vim Fugitive
use 'tpope/vim-fugitive'
-- Color Scheme
use 'folke/tokyonight.nvim'
end)