diff options
Diffstat (limited to 'lua/config/01-plugins.lua')
| -rw-r--r-- | lua/config/01-plugins.lua | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/lua/config/01-plugins.lua b/lua/config/01-plugins.lua new file mode 100644 index 0000000..e0acdd0 --- /dev/null +++ b/lua/config/01-plugins.lua @@ -0,0 +1,56 @@ +-- Core plugin list: Neovim 0.12+ built-in package manager. +-- GitHub shorthand (owner/repo) is not supported by vim.pack. +local github = function(repo) + return 'https://github.com/' .. repo .. '.git' +end + +-- Josher projects: local working checkout takes precedence over Git. +-- Change the root on each machine or override this helper locally. +local projects = vim.fn.expand('~/Projects') +local function josher(repo) + local path = projects .. '/' .. repo + if vim.fn.isdirectory(path) == 1 then + -- Place local checkout on runtimepath instead of downloading it. + vim.opt.rtp:prepend(path) + return nil + end + return 'git@git.josher.dev:' .. repo .. '.git' +end + +local plugins = { + -- Searching + github('nvim-lua/plenary.nvim'), + github('nvim-telescope/telescope.nvim'), + + -- Syntax / structural editing + github('nvim-treesitter/nvim-treesitter'), + github('nvim-treesitter/nvim-treesitter-textobjects'), + + -- Editing and navigation + github('lewis6991/gitsigns.nvim'), + github('kylechui/nvim-surround'), + github('smoka7/hop.nvim'), + + -- UI + github('nvim-lualine/lualine.nvim'), + github('nvim-tree/nvim-web-devicons'), + + -- LSP server presets only; native vim.lsp.enable/config is used elsewhere. + github('neovim/nvim-lspconfig'), + + -- Existing personal plugins; delete entries you no longer want. + josher('bulletjava.vim'), + josher('fieldmarshal.vim'), + josher('nvim-color-picker'), + josher('nvim-warp'), + josher('meltdown'), + josher('extregs.nvim'), + -- josher('rneovim-userregs'), -- Optional experimental branch/plugin. +} + +-- Local projects return nil; remove holes before calling vim.pack. +local install = {} +for _, plugin in pairs(plugins) do + if plugin then install[#install + 1] = plugin end +end +vim.pack.add(install) |