From 992d7227db2ab1445bfa0cb0d1763d8a22c12493 Mon Sep 17 00:00:00 2001 From: Tristan Russell Date: Sun, 24 Aug 2025 22:21:08 -0400 Subject: [PATCH] feat: Replaced packer with lazy. Added which-key & none-ls. Removed mason-lspconfig, and completion tools --- lua/truss/init.lua | 2 +- lua/truss/lazy.lua | 63 ++++++++++++++++++++++++++++++++++++++++++++ lua/truss/packer.lua | 41 ---------------------------- 3 files changed, 64 insertions(+), 42 deletions(-) create mode 100644 lua/truss/lazy.lua delete mode 100644 lua/truss/packer.lua diff --git a/lua/truss/init.lua b/lua/truss/init.lua index cd8fa2b..c4acab2 100644 --- a/lua/truss/init.lua +++ b/lua/truss/init.lua @@ -1,4 +1,4 @@ -require("truss.packer") +require("truss.lazy") require("truss.remap") require("truss.set") diff --git a/lua/truss/lazy.lua b/lua/truss/lazy.lua new file mode 100644 index 0000000..b401971 --- /dev/null +++ b/lua/truss/lazy.lua @@ -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 }, +}) diff --git a/lua/truss/packer.lua b/lua/truss/packer.lua deleted file mode 100644 index 8cb8590..0000000 --- a/lua/truss/packer.lua +++ /dev/null @@ -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)