refactor: Moved all plugin specs to their own file under truss/lazy
directory.
This commit is contained in:
parent
7c6700711d
commit
d0291709a9
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
})
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
return {
|
||||
-- Buffer source for code completion
|
||||
'hrsh7th/cmp-buffer'
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
return {
|
||||
-- Cmdline source for code completion
|
||||
'hrsh7th/cmp-cmdline'
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
return {
|
||||
-- Utility thing for code completion
|
||||
'hrsh7th/cmp-nvim-lsp'
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
return {
|
||||
-- Path source for code completion
|
||||
'hrsh7th/cmp-path'
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
return {
|
||||
-- Code completion
|
||||
'hrsh7th/nvim-cmp'
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
return {
|
||||
-- Hex colors
|
||||
'norcalli/nvim-colorizer.lua',
|
||||
config=true
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
return {
|
||||
-- Git utility
|
||||
'tpope/vim-fugitive'
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
return {
|
||||
-- File navigation utility
|
||||
'ThePrimeagen/harpoon'
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
return {
|
||||
-- LSP Configuration tool
|
||||
'neovim/nvim-lspconfig'
|
||||
}
|
||||
|
|
@ -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"
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
return {
|
||||
-- Packager Manager (LSPs)
|
||||
'williamboman/mason.nvim'
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
return {
|
||||
-- Formatter, Linter, etc bridge??
|
||||
'nvimtools/none-ls.nvim'
|
||||
}
|
||||
|
|
@ -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' },
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
return {
|
||||
-- Color Scheme
|
||||
'folke/tokyonight.nvim'
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
-- Syntax Highlighter
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
lazy = false,
|
||||
build = ":TSUpdate"
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
return {
|
||||
-- Undo.. tree
|
||||
'mbbill/undotree'
|
||||
}
|
||||
|
|
@ -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)",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -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 },
|
||||
})
|
||||
Loading…
Reference in New Issue