summaryrefslogtreecommitdiff
path: root/lua/plugins.lua
diff options
context:
space:
mode:
authorChristian Chiarulli <[email protected]>2021-07-13 21:13:55 -0400
committerGitHub <[email protected]>2021-07-13 21:13:55 -0400
commita097fa4c04e6db34bb409e0dea302c20629da8ec (patch)
treefb1c5bdd14cac82a363ea6c25b03a475050305f2 /lua/plugins.lua
parent04f9f53914a7dd999117ed73c5fa0ab3b0dc95e4 (diff)
LunarVim 0.4.8 (#919)0.4.8
Diffstat (limited to 'lua/plugins.lua')
-rw-r--r--lua/plugins.lua278
1 files changed, 80 insertions, 198 deletions
diff --git a/lua/plugins.lua b/lua/plugins.lua
index a9c625ce..129bc91d 100644
--- a/lua/plugins.lua
+++ b/lua/plugins.lua
@@ -14,6 +14,7 @@ if not packer_ok then
end
packer.init {
+ -- package_root = require("packer.util").join_paths(vim.fn.stdpath "data", "lvim", "pack"),
git = { clone_timeout = 300 },
display = {
open_fn = function()
@@ -26,50 +27,74 @@ return require("packer").startup(function(use)
-- Packer can manage itself as an optional plugin
use "wbthomason/packer.nvim"
- -- TODO refactor all of this (for now it works, but yes I know it could be wrapped in a simpler function)
+ -- TODO: refactor all of this (for now it works, but yes I know it could be wrapped in a simpler function)
use { "neovim/nvim-lspconfig" }
- use { "kabouzeid/nvim-lspinstall", event = "VimEnter" }
- -- Telescope
+ use {
+ "kabouzeid/nvim-lspinstall",
+ event = "VimEnter",
+ config = function()
+ require("lspinstall").setup()
+ end,
+ }
+
use { "nvim-lua/popup.nvim" }
use { "nvim-lua/plenary.nvim" }
use { "tjdevries/astronauta.nvim" }
+
+ -- Telescope
use {
"nvim-telescope/telescope.nvim",
- config = [[require('lv-telescope')]],
- --event = "BufEnter",
+ config = [[require('core.telescope').setup()]],
}
-- Autocomplete
use {
"hrsh7th/nvim-compe",
- event = "InsertEnter",
+ -- event = "InsertEnter",
+ config = function()
+ require("core.compe").setup()
+ end,
+ }
+
+ -- Autopairs
+ use {
+ "windwp/nvim-autopairs",
+ -- event = "InsertEnter",
+ after = { "telescope.nvim" },
config = function()
- require("lv-compe").config()
+ require "core.autopairs"
end,
}
+ -- Snippets
+
use { "hrsh7th/vim-vsnip", event = "InsertEnter" }
use { "rafamadriz/friendly-snippets", event = "InsertEnter" }
-- Treesitter
- use { "nvim-treesitter/nvim-treesitter" }
+ use {
+ "nvim-treesitter/nvim-treesitter",
+ config = function()
+ require("core.treesitter").setup()
+ end,
+ }
- -- Neoformat
+ -- Formatter.nvim
use {
- "sbdchd/neoformat",
+ "mhartington/formatter.nvim",
config = function()
- require "lv-neoformat"
+ require "core.formatter"
end,
- event = "BufRead",
}
+ -- NvimTree
use {
"kyazdani42/nvim-tree.lua",
- -- event = "BufEnter",
+ -- event = "BufWinOpen",
-- cmd = "NvimTreeToggle",
commit = "fd7f60e242205ea9efc9649101c81a07d5f458bb",
config = function()
- require("lv-nvimtree").config()
+ require("core.nvimtree").setup()
end,
}
@@ -77,7 +102,7 @@ return require("packer").startup(function(use)
"lewis6991/gitsigns.nvim",
config = function()
- require("lv-gitsigns").config()
+ require("core.gitsigns").setup()
end,
event = "BufRead",
}
@@ -86,25 +111,15 @@ return require("packer").startup(function(use)
use {
"folke/which-key.nvim",
config = function()
- require "lv-which-key"
+ require("core.which-key").setup()
end,
event = "BufWinEnter",
}
- -- Autopairs
- use {
- "windwp/nvim-autopairs",
- event = "InsertEnter",
- after = { "telescope.nvim" },
- config = function()
- require "lv-autopairs"
- end,
- }
-
-- Comments
use {
"terrortylor/nvim-comment",
- event = "BufWinEnter",
+ event = "BufRead",
config = function()
local status_ok, nvim_comment = pcall(require, "nvim_comment")
if not status_ok then
@@ -114,8 +129,13 @@ return require("packer").startup(function(use)
end,
}
- -- Color
- use { "christianchiarulli/nvcode-color-schemes.vim", opt = true }
+ -- vim-rooter
+ use {
+ "airblade/vim-rooter",
+ config = function()
+ vim.g.rooter_silent_chdir = 1
+ end,
+ }
-- Icons
use { "kyazdani42/nvim-web-devicons" }
@@ -124,171 +144,78 @@ return require("packer").startup(function(use)
use {
"glepnir/galaxyline.nvim",
config = function()
- require "lv-galaxyline"
+ require "core.galaxyline"
end,
- -- event = "VimEnter",
+ event = "BufWinEnter",
+ disable = not O.plugin.galaxyline.active,
}
use {
"romgrk/barbar.nvim",
config = function()
- require "lv-barbar"
+ require "core.bufferline"
end,
event = "BufWinEnter",
}
- -- Builtins, these do not load by default
-
- -- Dashboard
- use {
- "ChristianChiarulli/dashboard-nvim",
- event = "BufWinEnter",
- -- cmd = { "Dashboard", "DashboardNewFile", "DashboardJumpMarks" },
- -- config = function()
- -- require("lv-dashboard").config()
- -- end,
- disable = not O.plugin.dashboard.active,
- -- opt = true,
- }
- -- Zen Mode
- use {
- "folke/zen-mode.nvim",
- cmd = "ZenMode",
- -- event = "BufRead",
- config = function()
- require("lv-zen").config()
- end,
- disable = not O.plugin.zen.active,
- }
-
+ -- Debugging
use {
- "norcalli/nvim-colorizer.lua",
- event = "BufWinEnter",
+ "mfussenegger/nvim-dap",
+ -- event = "BufWinEnter",
config = function()
- require "lv-colorizer"
- -- vim.cmd "ColorizerReloadAllBuffers"
+ require("core.dap").setup()
end,
- disable = not O.plugin.colorizer.active,
+ disable = not O.plugin.dap.active,
}
- -- Treesitter playground
- use {
- "nvim-treesitter/playground",
- event = "BufRead",
- disable = not O.plugin.ts_playground.active,
- }
-
- use {
- "lukas-reineke/indent-blankline.nvim",
- event = "BufRead",
- setup = function()
- vim.g.indentLine_enabled = 1
- vim.g.indent_blankline_char = "▏"
-
- vim.g.indent_blankline_filetype_exclude = {
- "help",
- "terminal",
- "dashboard",
- }
- vim.g.indent_blankline_buftype_exclude = { "terminal" }
-
- vim.g.indent_blankline_show_trailing_blankline_indent = false
- vim.g.indent_blankline_show_first_indent_level = true
- end,
- disable = not O.plugin.indent_line.active,
- }
-
- -- comments in context
+ -- Debugger management
use {
- "JoosepAlviste/nvim-ts-context-commentstring",
- event = "BufRead",
- disable = not O.plugin.ts_context_commentstring.active,
+ "Pocco81/DAPInstall.nvim",
+ -- event = "BufWinEnter",
+ -- event = "BufRead",
+ disable = not O.plugin.dap.active,
}
- -- Symbol Outline
- use {
- "simrat39/symbols-outline.nvim",
- cmd = "SymbolsOutline",
- disable = not O.plugin.symbol_outline.active,
- }
- -- diagnostics
- use {
- "folke/trouble.nvim",
- cmd = "TroubleToggle",
- disable = not O.plugin.trouble.active,
- }
+ -- Builtins, these do not load by default
- -- Debugging
+ -- Dashboard
use {
- "mfussenegger/nvim-dap",
+ "ChristianChiarulli/dashboard-nvim",
+ event = "BufWinEnter",
config = function()
- require "lv-dap"
+ require("core.dashboard").setup()
end,
- disable = not O.plugin.debug.active,
+ disable = not O.plugin.dashboard.active,
}
+ -- TODO: remove in favor of akinsho/nvim-toggleterm.lua
-- Floating terminal
use {
"numToStr/FTerm.nvim",
event = "BufWinEnter",
config = function()
- require("lv-floatterm").config()
+ require("core.floatterm").setup()
end,
disable = not O.plugin.floatterm.active,
}
- -- Use fzy for telescope
- use {
- "nvim-telescope/telescope-fzy-native.nvim",
- event = "BufRead",
- disable = not O.plugin.telescope_fzy.active,
- }
-
- -- Use project for telescope
+ -- Zen Mode
use {
- "nvim-telescope/telescope-project.nvim",
+ "folke/zen-mode.nvim",
+ cmd = "ZenMode",
event = "BufRead",
- setup = function()
- vim.cmd [[packadd telescope.nvim]]
+ config = function()
+ require("core.zen").setup()
end,
- disable = not O.plugin.telescope_project.active,
- }
-
- -- Sane gx for netrw_gx bug
- use {
- "felipec/vim-sanegx",
- event = "BufRead",
- disable = not O.plugin.sanegx.active,
- }
-
- -- Diffview
- use {
- "sindrets/diffview.nvim",
- event = "BufRead",
- disable = not O.plugin.diffview.active,
- }
-
- -- Lush Create Color Schemes
- use {
- "rktjmp/lush.nvim",
- -- cmd = {"LushRunQuickstart", "LushRunTutorial", "Lushify"},
- disable = not O.plugin.lush.active,
+ disable = not O.plugin.zen.active,
}
- -- Debugger management
- use {
- "Pocco81/DAPInstall.nvim",
- -- event = "BufRead",
- disable = not O.plugin.dap_install.active,
- }
+ ---------------------------------------------------------------------------------
-- LANGUAGE SPECIFIC GOES HERE
use {
"lervag/vimtex",
ft = "tex",
- config = function()
- require "lv-vimtex"
- end,
}
-- Rust tools
@@ -316,56 +243,11 @@ return require("packer").startup(function(use)
use {
"mfussenegger/nvim-jdtls",
+ -- ft = { "java" },
disable = not O.lang.java.java_tools.active,
}
- -- use {
- -- "jose-elias-alvarez/null-ls.nvim",
- -- ft = {
- -- "javascript",
- -- "javascriptreact",
- -- "javascript.jsx",
- -- "typescript",
- -- "typescriptreact",
- -- "typescript.tsx",
- -- },
- -- config = function()
- -- require("null-ls").setup()
- -- end,
- -- }
-
- -- Pretty parentheses
- use {
- "p00f/nvim-ts-rainbow",
- disable = not O.plugin.ts_rainbow.active,
- }
-
- -- Autotags <div>|</div>
- use {
- "windwp/nvim-ts-autotag",
- event = "InsertEnter",
- disable = not O.plugin.ts_autotag.active,
- }
-
- -- Custom semantic text objects
- use {
- "nvim-treesitter/nvim-treesitter-textobjects",
- disable = not O.plugin.ts_textobjects.active,
- }
-
- -- Smart text objects
- use {
- "RRethy/nvim-treesitter-textsubjects",
- disable = not O.plugin.ts_textsubjects.active,
- }
-
- -- Text objects using hint labels
- use {
- "mfussenegger/nvim-ts-hint-textobject",
- event = "BufRead",
- disable = not O.plugin.ts_hintobjects.active,
- }
-
+ -- Install user plugins
for _, plugin in pairs(O.user_plugins) do
packer.use(plugin)
end