Skip to content

Commit

Permalink
refactor: lock packages
Browse files Browse the repository at this point in the history
  • Loading branch information
henry40408 committed Jul 9, 2024
1 parent f1d4838 commit c93f16e
Showing 1 changed file with 30 additions and 15 deletions.
45 changes: 30 additions & 15 deletions home-manager/common/neovim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ vim.opt.rtp:prepend(lazypath)
-- NOTE: Here is where you install your plugins.
require('lazy').setup({
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
{ 'tpope/vim-sleuth', commit = '1cc4557420f215d02c4d2645a748a816c220e99b' }, -- Detect tabstop and shiftwidth automatically

-- NOTE: Plugins can also be added by using a table,
-- with the first argument being the link and the following
Expand All @@ -242,7 +242,7 @@ require('lazy').setup({
-- require('Comment').setup({})

-- "gc" to comment visual regions/lines
{ 'numToStr/Comment.nvim', opts = {} },
{ 'numToStr/Comment.nvim', commit = 'e30b7f2008e52442154b66f7c519bfd2f1e32acb', opts = {} },

-- Here is a more advanced example where we pass configuration
-- options to `gitsigns.nvim`. This is equivalent to the following Lua:
Expand All @@ -251,6 +251,7 @@ require('lazy').setup({
-- See `:help gitsigns` to understand what the configuration keys do
{ -- Adds git related signs to the gutter, as well as utilities for managing changes
'lewis6991/gitsigns.nvim',
commit = '220446c8c86a280180d852efac60991eaf1a21d4',
opts = {
signs = {
add = { text = '+' },
Expand Down Expand Up @@ -279,6 +280,7 @@ require('lazy').setup({

{ -- Useful plugin to show you pending keybinds.
'folke/which-key.nvim',
commit = 'af4ded85542d40e190014c732fa051bdbf88be3d',
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
config = function() -- This is the function that runs, AFTER loading
require('which-key').setup()
Expand Down Expand Up @@ -310,11 +312,12 @@ require('lazy').setup({
{ -- Fuzzy Finder (files, lsp, etc)
'nvim-telescope/telescope.nvim',
event = 'VimEnter',
branch = '0.1.x',
commit = 'a0bbec21143c7bc5f8bb02e0005fa0b982edc026',
dependencies = {
'nvim-lua/plenary.nvim',
{ 'nvim-lua/plenary.nvim', commit = 'a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683' },
{ -- If encountering errors, see telescope-fzf-native README for installation instructions
'nvim-telescope/telescope-fzf-native.nvim',
commit = 'cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b',

-- `build` is used to run some command when the plugin is installed/updated.
-- This is only run then, not every time Neovim starts up.
Expand All @@ -326,10 +329,10 @@ require('lazy').setup({
return vim.fn.executable 'make' == 1
end,
},
{ 'nvim-telescope/telescope-ui-select.nvim' },
{ 'nvim-telescope/telescope-ui-select.nvim', commit = '6e51d7da30bd139a6950adf2a47fda6df9fa06d2' },

-- Useful for getting pretty icons, but requires a Nerd Font.
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
{ 'nvim-tree/nvim-web-devicons', commit = 'c0cfc1738361b5da1cd0a962dd6f774cc444f856', enabled = vim.g.have_nerd_font },
},
config = function()
-- Telescope is a fuzzy finder that comes with a lot of different things that
Expand Down Expand Up @@ -414,19 +417,19 @@ require('lazy').setup({

{ -- LSP Configuration & Plugins
'neovim/nvim-lspconfig',
commit = 'cf97d2485fc3f6d4df1b79a3ea183e24c272215e',
dependencies = {
-- Automatically install LSPs and related tools to stdpath for Neovim
{ 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants
'williamboman/mason-lspconfig.nvim',
'WhoIsSethDaniel/mason-tool-installer.nvim',
{ 'williamboman/mason.nvim', commit = '2af3b574b68dc0273c7fb60369f3a48d5a16a857', config = true }, -- NOTE: Must be loaded before dependants
{ 'williamboman/mason-lspconfig.nvim', commit = '37a336b653f8594df75c827ed589f1c91d91ff6c' },

-- Useful status updates for LSP.
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
{ 'j-hui/fidget.nvim', opts = {} },
{ 'j-hui/fidget.nvim', commit = 'c12f8a58ee472ce5983c3a3f3aad0ff6c49a6a83', opts = {} },

-- `neodev` configures Lua LSP for your Neovim config, runtime and plugins
-- used for completion, annotations and signatures of Neovim apis
{ 'folke/neodev.nvim', opts = {} },
{ 'folke/neodev.nvim', commit = '46aa467dca16cf3dfe27098042402066d2ae242d', opts = {} },
},
config = function()
-- Brief aside: **What is LSP?**
Expand Down Expand Up @@ -631,6 +634,7 @@ require('lazy').setup({

{ -- Autoformat
'stevearc/conform.nvim',
commit = 'cd75be867f2331b22905f47d28c0c270a69466aa',
lazy = false,
keys = {
{
Expand Down Expand Up @@ -668,11 +672,13 @@ require('lazy').setup({

{ -- Autocompletion
'hrsh7th/nvim-cmp',
commit = 'a110e12d0b58eefcf5b771f533fc2cf3050680ac',
event = 'InsertEnter',
dependencies = {
-- Snippet Engine & its associated nvim-cmp source
{
'L3MON4D3/LuaSnip',
commit = 'ce0a05ab4e2839e1c48d072c5236cce846a387bc',
build = (function()
-- Build Step is needed for regex support in snippets.
-- This step is not supported in many windows environments.
Expand All @@ -694,13 +700,13 @@ require('lazy').setup({
-- },
},
},
'saadparwaiz1/cmp_luasnip',
{ 'saadparwaiz1/cmp_luasnip', commit = '05a9ab28b53f71d1aece421ef32fee2cb857a843' },

-- Adds other completion capabilities.
-- nvim-cmp does not ship with all sources by default. They are split
-- into multiple repos for maintenance purposes.
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-path',
{ 'hrsh7th/cmp-nvim-lsp', commit = '39e2eda76828d88b773cc27a3f61d2ad782c922d' },
{ 'hrsh7th/cmp-path', commit = '91ff86cd9c29299a64f968ebb45846c485725f23' },
},
config = function()
-- See `:help cmp`
Expand Down Expand Up @@ -783,6 +789,7 @@ require('lazy').setup({
--
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
'folke/tokyonight.nvim',
commit = '0a84c2df1dc65610ee0d9b516b2fb342e4b0ed6f',
priority = 1000, -- Make sure to load this before all the other start plugins.
init = function()
-- Load the colorscheme here.
Expand All @@ -796,10 +803,17 @@ require('lazy').setup({
},

-- Highlight todo, notes, etc in comments
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
{
'folke/todo-comments.nvim',
commit = '313b04e5b02d29ab9275c9295ff5e2b73921b0eb',
event = 'VimEnter',
dependencies = { 'nvim-lua/plenary.nvim' },
opts = { signs = false },
},

{ -- Collection of various small independent plugins/modules
'echasnovski/mini.nvim',
commit = '072ef026a538cf4a9dedba56ad8eecffa9e9abb6',
config = function()
-- Better Around/Inside textobjects
--
Expand Down Expand Up @@ -837,6 +851,7 @@ require('lazy').setup({
},
{ -- Highlight, edit, and navigate code
'nvim-treesitter/nvim-treesitter',
commit = 'c1ad655b6a0c83ab48e55240f367e2bc0c15af31',
build = ':TSUpdate',
opts = {
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'vim', 'vimdoc' },
Expand Down

0 comments on commit c93f16e

Please # to comment.