diff --git a/init.fnl b/init.fnl index 3ccb0e2..dcaa6ab 100644 --- a/init.fnl +++ b/init.fnl @@ -509,6 +509,8 @@ (use! :neovim/nvim-lspconfig :after :cmp-nvim-lsp :config lsp_config_callback) + + ;; nvim-jdtls (fn jdtls_config_callback [] (hook! :FileType :java #(let [root_dir ((. (require :jdtls.setup) :find_root) @@ -524,8 +526,11 @@ :jdtls root_dir) ]})))) (use! :mfussenegger/nvim-jdtls :after :nvim-lspconfig - :config jdtls_config_callback)) + :config jdtls_config_callback) + + ;; Sync all packages on first launch + (if _G.zander.first_launch + ((. (require :packer) :sync)))) -(vim.cmd.packadd "packer.nvim") (let [packer (require :packer)] (packer.startup packer_init_callback)) diff --git a/init.lua b/init.lua index 6387dc8..2cd602a 100644 --- a/init.lua +++ b/init.lua @@ -3,10 +3,13 @@ local function bootstrap(pkg, repo) if vim.fn.isdirectory(plug_dir) ~= 1 then vim.fn.system({ 'git', 'clone', '--depth', '1', repo, plug_dir }) vim.cmd.packadd(pkg) + return true end + return false end -bootstrap('packer.nvim', 'https://github.com/wbthomason/packer.nvim') +_G.zander = {} +_G.zander.first_launch = bootstrap('packer.nvim', 'https://github.com/wbthomason/packer.nvim') bootstrap('tangerine.nvim', 'https://github.com/udayvir-singh/tangerine.nvim') require('tangerine').setup({