summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorseth <[email protected]>2023-09-09 20:01:59 -0400
committerseth <[email protected]>2023-09-09 20:02:06 -0400
commite910460767dd835c7fb8aa7a59082e645c207cbd (patch)
tree66b0822e4760430c7ea112fc1e5be847d23349b5 /lua
parentd2c208b9d68396e0269faad2fc8bdf51be257b23 (diff)
plugins: add full lazy & mason support
Diffstat (limited to 'lua')
-rw-r--r--lua/getchoo/init.lua7
-rw-r--r--lua/getchoo/plugins/init.lua8
-rw-r--r--lua/getchoo/plugins/lazy.lua69
-rw-r--r--lua/getchoo/plugins/lsp.lua2
-rw-r--r--lua/getchoo/plugins/mason.lua7
5 files changed, 72 insertions, 21 deletions
diff --git a/lua/getchoo/init.lua b/lua/getchoo/init.lua
index 461d217..d33f072 100644
--- a/lua/getchoo/init.lua
+++ b/lua/getchoo/init.lua
@@ -7,7 +7,7 @@ opt.shiftwidth = 2
opt.expandtab = false
opt.smartindent = true
opt.wrap = true
-opt.relativenumer = true
+opt.relativenumber = true
-- appearance
opt.syntax = "on"
@@ -15,4 +15,7 @@ cmd("filetype plugin indent on")
opt.termguicolors = true
require("getchoo.keybinds")
-require("getchoo.plugins")
+
+if vim.g.use_plugins then
+ require("getchoo.plugins")
+end
diff --git a/lua/getchoo/plugins/init.lua b/lua/getchoo/plugins/init.lua
index 95883c7..43daa5b 100644
--- a/lua/getchoo/plugins/init.lua
+++ b/lua/getchoo/plugins/init.lua
@@ -1,3 +1,11 @@
+if vim.g.use_lazy then
+ require("getchoo.plugins.lazy")
+end
+
require("getchoo.plugins.general")
require("getchoo.plugins.lsp")
require("getchoo.plugins.ui")
+
+if vim.g.auto_install then
+ require("getchoo.plugins.mason")
+end
diff --git a/lua/getchoo/plugins/lazy.lua b/lua/getchoo/plugins/lazy.lua
index e11572c..917bf33 100644
--- a/lua/getchoo/plugins/lazy.lua
+++ b/lua/getchoo/plugins/lazy.lua
@@ -1,22 +1,46 @@
-local lazy_path = vim.fn.stdpath("data") .. "/lazy/lazy.vim"
+local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
-- bootstrap lazy
-if not vim.loop.fs_stat(lazy_path) then
+if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
- "--branch=stable",
- lazy_path,
+ "--branch=stable", -- latest stable release
+ lazypath,
})
end
-vim.opt.rtp:prepend(lazy_path)
+vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
- { "akinsho/bufferline.nvim", version = "*", dependencies = "nvim-tree/nvim-web-devicons" },
+ --- general
+
{ "catppuccin/nvim", name = "catppuccin", priority = 1000 },
+
+ { "j-hui/fidget.nvim", tag = "legacy" },
+ { "folke/flash.nvim", event = "VeryLazy" },
+
+ "lewis6991/gitsigns.nvim",
+ "lukas-reineke/indent-blankline.nvim",
+
+ { "nvim-lualine/lualine.nvim", dependencies = "nvim-tree/nvim-web-devicons" },
+
+ {
+ "nvim-neo-tree/neo-tree.nvim",
+ branch = "v3.x",
+ dependencies = {
+ "nvim-lua/plenary.nvim",
+ "nvim-tree/nvim-web-devicons",
+ "MunifTanjim/nui.nvim",
+ },
+ },
+
+ { "echasnovski/mini.nvim", version = false, event = "VeryLazy" },
+
+ --- completion
+
{
"hrsh7th/nvim-cmp",
dependencies = {
@@ -27,33 +51,42 @@ require("lazy").setup({
"L3MON4D3/LuaSnip",
},
},
+
+ --- ui
+
{ "stevearc/dressing.nvim", lazy = true },
- { "j-hui/fidget.nvim", tag = "legacy" },
- "lewis6991/gitsigns.nvim",
- { "folke/flash.nvim", event = "VeryLazy" },
- "lukas-reineke/indent-blankline.nvim",
- { "nvim-lualine/lualine.nvim", dependencies = "nvim-tree/nvim-web-devicons" },
- { "echasnovski/mini.nvim", version = false, event = "VeryLazy" },
{ "folke/noice.nvim", event = "VeryLazy" },
{ "MunifTanjim/nui.nvim", lazy = true },
- "neovim/nvim-lspconfig",
"rcarriga/nvim-notify",
+
+ --- lsp
+
+ "neovim/nvim-lspconfig",
+
{
"nvim-treesitter/nvim-treesitter",
dependencies = {
"JoosepAlviste/nvim-ts-context-commentstring",
},
},
- "nvim-lua/plenary.nvim",
{
- "nvim-neo-tree/neo-tree.nvim",
- branch = "v3.x",
+ "jose-elias-alvarez/null-ls.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
- "nvim-tree/nvim-web-devicons",
- "MunifTanjim/nui.nvim",
},
},
+
+ {
+ "williamboman/mason.nvim",
+ dependencies = {
+ "williamboman/mason-lspconfig.nvim",
+ "jay-babu/mason-null-ls.nvim",
+ },
+ },
+
+ --- utils
+
+ { "akinsho/bufferline.nvim", version = "*", dependencies = "nvim-tree/nvim-web-devicons" },
{ "nvim-telescope/telescope.nvim", tag = "0.1.2" },
{ "folke/trouble.nvim", dependencies = { "nvim-tree/nvim-web-devicons" } },
{ "folke/which-key.nvim", event = "VeryLazy" },
diff --git a/lua/getchoo/plugins/lsp.lua b/lua/getchoo/plugins/lsp.lua
index 82511dc..e19b53b 100644
--- a/lua/getchoo/plugins/lsp.lua
+++ b/lua/getchoo/plugins/lsp.lua
@@ -170,7 +170,7 @@ require("null-ls").setup({
})
require("nvim-treesitter.configs").setup({
- auto_install = false,
+ auto_install = (not vim.g.auto_install == nil) and vim.g.auto_install,
highlight = { enable = true },
indent = { enable = true },
context_commentstring = {
diff --git a/lua/getchoo/plugins/mason.lua b/lua/getchoo/plugins/mason.lua
new file mode 100644
index 0000000..083d97c
--- /dev/null
+++ b/lua/getchoo/plugins/mason.lua
@@ -0,0 +1,7 @@
+local commonArgs = {
+ automatic_installation = true,
+}
+
+require("mason").setup()
+require("mason-null-ls").setup(commonArgs)
+require("mason-lspconfig").setup(commonArgs)