From eb17f0ab2559a521ee3a3fadcb95eeff93dd877e Mon Sep 17 00:00:00 2001 From: Fabian Becker Date: Tue, 27 Sep 2022 10:33:01 +0300 Subject: [PATCH] Various refactors on nvim config --- .config/nvim/after/plugin/lsp.lua | 9 - .config/nvim/after/plugin/lspsaga.lua | 22 +-- .config/nvim/after/plugin/orgmode.lua | 23 --- .config/nvim/after/plugin/telescope.lua | 9 +- .../{after/plugin => lua/halfdan}/cmp.lua | 11 +- .config/nvim/lua/halfdan/init.lua | 3 + .../{after/plugin => lua/halfdan}/luasnip.lua | 0 .config/nvim/lua/halfdan/neorg.lua | 32 ++++ .config/nvim/lua/halfdan/packer.lua | 66 ++++++-- .config/nvim/lua/halfdan/settings.lua | 7 +- .config/nvim/lua/halfdan/telescope.lua | 120 ++++++------- .config/nvim/lua/halfdan/treesitter.lua | 2 +- .config/nvim/plugin/packer_compiled.lua | 160 ++++++++++++++---- 13 files changed, 297 insertions(+), 167 deletions(-) delete mode 100644 .config/nvim/after/plugin/orgmode.lua rename .config/nvim/{after/plugin => lua/halfdan}/cmp.lua (92%) rename .config/nvim/{after/plugin => lua/halfdan}/luasnip.lua (100%) create mode 100644 .config/nvim/lua/halfdan/neorg.lua diff --git a/.config/nvim/after/plugin/lsp.lua b/.config/nvim/after/plugin/lsp.lua index 6848d74..9aee52f 100644 --- a/.config/nvim/after/plugin/lsp.lua +++ b/.config/nvim/after/plugin/lsp.lua @@ -195,12 +195,3 @@ require('rust-tools').setup({ } }) --- vim.cmd([[ --- augroup --- autocmd! --- autocmd BufWritePre *.go lua vim.lsp.buf.formatting_sync(nil, 100) --- autocmd BufWritePre *.rs lua vim.lsp.buf.formatting_sync(nil, 100) --- autocmd BufWritePre *.ex,*.exs lua vim.lsp.buf.formatting_sync(nil, 100) --- autocmd BufWritePre *.py lua vim.lsp.buf.formatting_sync(nil, 100) --- augroup END --- ]]) diff --git a/.config/nvim/after/plugin/lspsaga.lua b/.config/nvim/after/plugin/lspsaga.lua index 554ac45..644ac6c 100644 --- a/.config/nvim/after/plugin/lspsaga.lua +++ b/.config/nvim/after/plugin/lspsaga.lua @@ -45,14 +45,14 @@ local function config_winbar() end end -local events = { 'BufEnter', 'BufWinEnter', 'CursorMoved' } - -vim.api.nvim_create_autocmd(events, { - pattern = '*', - callback = function() config_winbar() end, -}) - -vim.api.nvim_create_autocmd('User', { - pattern = 'LspsagaUpdateSymbol', - callback = function() config_winbar() end, -}) +-- local events = { 'BufEnter', 'BufWinEnter', 'CursorMoved' } +-- +-- vim.api.nvim_create_autocmd(events, { +-- pattern = '*', +-- callback = function() config_winbar() end, +-- }) +-- +-- vim.api.nvim_create_autocmd('User', { +-- pattern = 'LspsagaUpdateSymbol', +-- callback = function() config_winbar() end, +-- }) diff --git a/.config/nvim/after/plugin/orgmode.lua b/.config/nvim/after/plugin/orgmode.lua deleted file mode 100644 index d45e649..0000000 --- a/.config/nvim/after/plugin/orgmode.lua +++ /dev/null @@ -1,23 +0,0 @@ -local orgmode = require('orgmode') - -orgmode.setup_ts_grammar() - -orgmode.setup({ - org_agenda_files = { '~/org/*' }, - org_default_notes_file = '~/org/inbox.org', - org_todo_keywords = {'TODO(t)', 'WAITING(w)', '|', 'DONE(d)', 'CANCELLED(c)'}, - org_capture_templates = { - t = { - description = 'Todo', - template = '* TODO %?\n %u', - target = '~/org/inbox.org' - }, - j = { - description = 'Journal', - template = '\n*** %<%Y-%m-%d> %<%A>\n**** %U\n\n%?', - target = '~/org/journal.org' - }, - }, - -}) - diff --git a/.config/nvim/after/plugin/telescope.lua b/.config/nvim/after/plugin/telescope.lua index 8579650..818a238 100644 --- a/.config/nvim/after/plugin/telescope.lua +++ b/.config/nvim/after/plugin/telescope.lua @@ -3,7 +3,7 @@ local nnoremap = Remap.nnoremap local builtin = require("telescope.builtin") nnoremap("pg", function() - builtin.grep_string({ search = vim.fn.input("Grep For > ")}) + builtin.live_grep() end) nnoremap("", function() if not pcall(builtin.git_files) then @@ -26,10 +26,13 @@ end) nnoremap("vh", function() builtin.help_tags() end) -nnoremap("gw", function() + +nnoremap("wc", function() + require('telescope').extensions.git_worktree.create_git_worktree() +end) +nnoremap("ws", function() require('telescope').extensions.git_worktree.git_worktrees() end) nnoremap("gc", function() builtin.git_branches() end) - diff --git a/.config/nvim/after/plugin/cmp.lua b/.config/nvim/lua/halfdan/cmp.lua similarity index 92% rename from .config/nvim/after/plugin/cmp.lua rename to .config/nvim/lua/halfdan/cmp.lua index da5a1b1..276d2dd 100644 --- a/.config/nvim/after/plugin/cmp.lua +++ b/.config/nvim/lua/halfdan/cmp.lua @@ -1,6 +1,5 @@ local cmp = require'cmp' local lspkind = require('lspkind') -local luasnip = require 'luasnip' local source_mapping = { buffer = "[Buffer]", @@ -22,7 +21,7 @@ end cmp.setup({ snippet = { expand = function(args) - luasnip.lsp_expand(args.body) + require'luasnip'.lsp_expand(args.body) end, }, mapping = { @@ -39,8 +38,8 @@ cmp.setup({ [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() + elseif require'luasnip'.expand_or_jumpable() then + require'luasnip'.expand_or_jump() elseif has_words_before() then cmp.complete() else @@ -51,8 +50,8 @@ cmp.setup({ [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_prev_item() - elseif luasnip.jumpable(-1) then - luasnip.jump(-1) + elseif require'luasnip'.jumpable(-1) then + require'luasnip'.jump(-1) else fallback() end diff --git a/.config/nvim/lua/halfdan/init.lua b/.config/nvim/lua/halfdan/init.lua index 4a47a5d..85600c5 100644 --- a/.config/nvim/lua/halfdan/init.lua +++ b/.config/nvim/lua/halfdan/init.lua @@ -1,5 +1,8 @@ require("halfdan.settings") require("halfdan.packer") + +require("impatient") + require("halfdan.neogit") require('halfdan.globals') diff --git a/.config/nvim/after/plugin/luasnip.lua b/.config/nvim/lua/halfdan/luasnip.lua similarity index 100% rename from .config/nvim/after/plugin/luasnip.lua rename to .config/nvim/lua/halfdan/luasnip.lua diff --git a/.config/nvim/lua/halfdan/neorg.lua b/.config/nvim/lua/halfdan/neorg.lua new file mode 100644 index 0000000..990103c --- /dev/null +++ b/.config/nvim/lua/halfdan/neorg.lua @@ -0,0 +1,32 @@ +local neorg = require("neorg") + +neorg.setup({ + load = { + ["core.defaults"] = {}, + ["core.norg.dirman"] = { + config = { + workspaces = { + work = "~/org/work", + home = "~/org/home", + } + } + }, + ["core.gtd.base"] = { + config = { + workspace = "work", + }, + }, + ["core.norg.completion"] = { + config = { + engine = "nvim-cmp", + }, + }, + ["core.norg.concealer"] = {}, + ["core.norg.journal"] = { + config = { + strategy = "flat", + }, + }, + ["core.integrations.telescope"] = {}, + } +}) diff --git a/.config/nvim/lua/halfdan/packer.lua b/.config/nvim/lua/halfdan/packer.lua index 1461882..6ee74bb 100644 --- a/.config/nvim/lua/halfdan/packer.lua +++ b/.config/nvim/lua/halfdan/packer.lua @@ -35,6 +35,8 @@ return require("packer").startup({ -- Packer can manage itself as an optional plugin use "wbthomason/packer.nvim" + use 'lewis6991/impatient.nvim' + use {'TimUntersberger/neogit' } use {'airblade/vim-gitgutter'} -- use {'andymass/vim-matchup'} @@ -49,6 +51,15 @@ return require("packer").startup({ use {'tpope/vim-surround'} -- ✅ use {'tpope/vim-dispatch'} + -- Treesitter + + use { + 'nvim-treesitter/nvim-treesitter', + run = ':TSUpdate', + } + use { 'nvim-treesitter/playground', after = 'nvim-treesitter' } + use { 'nvim-treesitter/nvim-treesitter-textobjects', after = 'nvim-treesitter' } + -- Testing use {'vim-test/vim-test'} use { @@ -63,9 +74,6 @@ return require("packer").startup({ } use {"nvim-neotest/neotest-vim-test" } - -- Treesitter - use {"nvim-treesitter/nvim-treesitter", run = ":TSUpdate"} - use {"nvim-treesitter/nvim-treesitter-textobjects"} use {'preservim/tagbar'} vim.g.tagbar_ctags_bin = '/usr/local/bin/ctags' @@ -78,7 +86,15 @@ return require("packer").startup({ use {'rcarriga/nvim-notify'} - use {'nvim-orgmode/orgmode'} + use { + "nvim-neorg/neorg", + event = "BufEnter", + after = "nvim-treesitter", + config = function() + require 'halfdan.neorg' + end + } + use {'nvim-neorg/neorg-telescope', after = "neorg"} use {'justinmk/vim-sneak'} @@ -91,18 +107,33 @@ return require("packer").startup({ 'williamboman/nvim-lsp-installer', } - use {'hrsh7th/cmp-nvim-lsp'} - use {'hrsh7th/cmp-buffer'} - use {'hrsh7th/cmp-path'} - use {'hrsh7th/cmp-cmdline'} - use {'hrsh7th/nvim-cmp'} - use {'tzachar/cmp-tabnine', run = './install.sh'} - use {'onsails/lspkind-nvim'} -- Display symbol with cmp suggestions use { - 'L3MON4D3/LuaSnip', - requires = {"rafamadriz/friendly-snippets"}, - } - use {'saadparwaiz1/cmp_luasnip'} + 'L3MON4D3/LuaSnip', + event = "InsertEnter", + config = function() + require 'halfdan.luasnip' + end, + } + use {"rafamadriz/friendly-snippets", after="LuaSnip"} + + use { + 'hrsh7th/nvim-cmp', + requires = { + { 'hrsh7th/cmp-buffer', after = 'nvim-cmp' }, + 'hrsh7th/cmp-nvim-lsp', + 'onsails/lspkind.nvim', + { 'hrsh7th/cmp-path', after = 'nvim-cmp' }, + { 'hrsh7th/cmp-nvim-lua', after = 'nvim-cmp' }, + { 'saadparwaiz1/cmp_luasnip', after = 'nvim-cmp' }, + { 'hrsh7th/cmp-cmdline', after = 'nvim-cmp', event = 'CmdlineEnter' }, + {'tzachar/cmp-tabnine', run = './install.sh', after = 'nvim-cmp' } + }, + config = function() + require 'halfdan.cmp' + end, + event = 'InsertEnter', + after = 'LuaSnip', + } use {'glepnir/lspsaga.nvim'} @@ -119,9 +150,9 @@ return require("packer").startup({ -- Telescope fuzzy find files/grep use {'nvim-lua/popup.nvim'} use {'nvim-lua/plenary.nvim'} + use {'nvim-telescope/telescope.nvim'} - use {'nvim-telescope/telescope-project.nvim'} - use {'nvim-telescope/telescope-fzy-native.nvim'} + use {'theprimeagen/git-worktree.nvim'} @@ -134,6 +165,7 @@ return require("packer").startup({ use {'rust-lang/rust.vim'} use {'simrat39/rust-tools.nvim'} use({ "mhanberg/elixir.nvim", requires = { "neovim/nvim-lspconfig", "nvim-lua/plenary.nvim" }}) + use {'tpope/vim-projectionist'} -- use {'JuliaEditorSupport/julia-vim', opt=true} -- vim.g.latex_to_unicode_auto = 1 diff --git a/.config/nvim/lua/halfdan/settings.lua b/.config/nvim/lua/halfdan/settings.lua index 976b7f9..8a5d163 100644 --- a/.config/nvim/lua/halfdan/settings.lua +++ b/.config/nvim/lua/halfdan/settings.lua @@ -37,10 +37,9 @@ vim.o.updatetime = 300 -- Faster completion vim.o.timeoutlen = 500 -- By default timeoutlen is 1000 ms vim.o.clipboard = "unnamedplus" -- Copy paste between vim and everything else vim.o.laststatus = 3 -- Set global status bar - +vim.b.did_ftplugin = 1 -- Enable telescope theme --- vim.g.gruvbox_baby_telescope_theme = 1 --- vim.g.gruvbox_baby_background_color = "dark" +vim.g.gruvbox_baby_telescope_theme = 1 +vim.g.gruvbox_baby_background_color = "dark" -vim.g.colorscheme = "gruvbox-baby" -- Set colorscheme vim.g.mapleader = ' ' diff --git a/.config/nvim/lua/halfdan/telescope.lua b/.config/nvim/lua/halfdan/telescope.lua index 0b256cd..e46f5d9 100644 --- a/.config/nvim/lua/halfdan/telescope.lua +++ b/.config/nvim/lua/halfdan/telescope.lua @@ -4,68 +4,68 @@ require("telescope").load_extension("git_worktree") -- Global remapping require('telescope').setup { - defaults = { - find_command = {'rg', '--no-heading', '--with-filename', '--line-number', '--column', '--smart-case'}, - file_ignore_patterns = {"_build", "node_modules", "deps" }, - prompt_position = "bottom", - --prompt_prefix = " ", - prompt_prefix = "  ", - selection_caret = " ", - entry_prefix = " ", - initial_mode = "insert", - selection_strategy = "reset", - sorting_strategy = "descending", - layout_strategy = "horizontal", - layout_defaults = {horizontal = {mirror = false}, vertical = {mirror = false}}, - file_sorter = require'telescope.sorters'.get_fuzzy_file, - generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter, - shorten_path = true, - winblend = 0, - width = 0.75, - preview_cutoff = 120, - results_height = 1, - results_width = 0.8, - border = {}, - borderchars = {'─', '│', '─', '│', '╭', '╮', '╯', '╰'}, - color_devicons = true, - use_less = true, - set_env = {['COLORTERM'] = 'truecolor'}, -- default = nil, - file_previewer = require'telescope.previewers'.vim_buffer_cat.new, - grep_previewer = require'telescope.previewers'.vim_buffer_vimgrep.new, - qflist_previewer = require'telescope.previewers'.vim_buffer_qflist.new, - -- Developer configurations: Not meant for general override - buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker, - mappings = { - i = { - [""] = actions.move_selection_next, - [""] = actions.move_selection_previous, - [""] = actions.smart_send_to_qflist + actions.open_qflist, - -- To disable a keymap, put [map] = false - -- So, to not map "", just put - -- [""] = false, + defaults = { + find_command = {'rg', '--no-heading', '--with-filename', '--line-number', '--column', '--smart-case'}, + file_ignore_patterns = {"_build", "node_modules", "deps" }, + prompt_position = "bottom", + --prompt_prefix = " ", + prompt_prefix = "  ", + selection_caret = " ", + entry_prefix = " ", + initial_mode = "insert", + selection_strategy = "reset", + sorting_strategy = "descending", + layout_strategy = "horizontal", + layout_defaults = {horizontal = {mirror = false}, vertical = {mirror = false}}, + file_sorter = require'telescope.sorters'.get_fuzzy_file, + generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter, + shorten_path = true, + winblend = 0, + width = 0.75, + preview_cutoff = 120, + results_height = 1, + results_width = 0.8, + border = {}, + borderchars = {'─', '│', '─', '│', '╭', '╮', '╯', '╰'}, + color_devicons = true, + use_less = true, + set_env = {['COLORTERM'] = 'truecolor'}, -- default = nil, + file_previewer = require'telescope.previewers'.vim_buffer_cat.new, + grep_previewer = require'telescope.previewers'.vim_buffer_vimgrep.new, + qflist_previewer = require'telescope.previewers'.vim_buffer_qflist.new, + -- Developer configurations: Not meant for general override + buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker, + mappings = { + i = { + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + [""] = actions.smart_send_to_qflist + actions.open_qflist, + -- To disable a keymap, put [map] = false + -- So, to not map "", just put + -- [""] = false, - -- Otherwise, just set the mapping to the function that you want it to be. - -- [""] = actions.select_horizontal, + -- Otherwise, just set the mapping to the function that you want it to be. + -- [""] = actions.select_horizontal, - -- Add up multiple actions - [""] = actions.select_default + actions.center + -- Add up multiple actions + [""] = actions.select_default + actions.center - -- You can perform as many actions in a row as you like - -- [""] = actions.select_default + actions.center + my_cool_custom_action, - }, - n = { - [""] = actions.move_selection_next, - [""] = actions.move_selection_previous, - [""] = actions.smart_send_to_qflist + actions.open_qflist, - [""] = actions.close, - -- [""] = my_cool_custom_action, - } - } - }, - extensions = { - fzy_native = { - override_generic_sorter = false, - override_file_sorter = true, - } + -- You can perform as many actions in a row as you like + -- [""] = actions.select_default + actions.center + my_cool_custom_action, + }, + n = { + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + [""] = actions.smart_send_to_qflist + actions.open_qflist, + [""] = actions.close, + -- [""] = my_cool_custom_action, + } } + }, + extensions = { + fzy_native = { + override_generic_sorter = false, + override_file_sorter = true, + } + } } diff --git a/.config/nvim/lua/halfdan/treesitter.lua b/.config/nvim/lua/halfdan/treesitter.lua index 598cb71..6d1e96f 100644 --- a/.config/nvim/lua/halfdan/treesitter.lua +++ b/.config/nvim/lua/halfdan/treesitter.lua @@ -10,7 +10,7 @@ require('nvim-treesitter.configs').setup({ disable = { 'org' }, }, incremental_selection = { - enable = true, + enable = false, keymaps = { init_selection = "gnn", node_incremental = "grn", diff --git a/.config/nvim/plugin/packer_compiled.lua b/.config/nvim/plugin/packer_compiled.lua index 4f83299..1dbed59 100644 --- a/.config/nvim/plugin/packer_compiled.lua +++ b/.config/nvim/plugin/packer_compiled.lua @@ -86,18 +86,33 @@ _G.packer_plugins = { url = "https://github.com/antoinemadec/FixCursorHold.nvim" }, LuaSnip = { - loaded = true, - path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/LuaSnip", + after = { "friendly-snippets", "nvim-cmp" }, + config = { "\27LJ\2\n/\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\20halfdan.luasnip\frequire\0" }, + loaded = false, + needs_bufread = true, + only_cond = false, + path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/opt/LuaSnip", url = "https://github.com/L3MON4D3/LuaSnip" }, ["cmp-buffer"] = { - loaded = true, - path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/cmp-buffer", + after_files = { "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/opt/cmp-buffer/after/plugin/cmp_buffer.lua" }, + load_after = { + ["nvim-cmp"] = true + }, + loaded = false, + needs_bufread = false, + path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/opt/cmp-buffer", url = "https://github.com/hrsh7th/cmp-buffer" }, ["cmp-cmdline"] = { - loaded = true, - path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/cmp-cmdline", + after_files = { "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/opt/cmp-cmdline/after/plugin/cmp_cmdline.lua" }, + load_after = { + ["nvim-cmp"] = true + }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/opt/cmp-cmdline", url = "https://github.com/hrsh7th/cmp-cmdline" }, ["cmp-nvim-lsp"] = { @@ -105,19 +120,44 @@ _G.packer_plugins = { path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", url = "https://github.com/hrsh7th/cmp-nvim-lsp" }, + ["cmp-nvim-lua"] = { + after_files = { "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/opt/cmp-nvim-lua/after/plugin/cmp_nvim_lua.lua" }, + load_after = { + ["nvim-cmp"] = true + }, + loaded = false, + needs_bufread = false, + path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/opt/cmp-nvim-lua", + url = "https://github.com/hrsh7th/cmp-nvim-lua" + }, ["cmp-path"] = { - loaded = true, - path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/cmp-path", + after_files = { "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/opt/cmp-path/after/plugin/cmp_path.lua" }, + load_after = { + ["nvim-cmp"] = true + }, + loaded = false, + needs_bufread = false, + path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/opt/cmp-path", url = "https://github.com/hrsh7th/cmp-path" }, ["cmp-tabnine"] = { - loaded = true, - path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/cmp-tabnine", + after_files = { "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/opt/cmp-tabnine/after/plugin/cmp-tabnine.lua" }, + load_after = { + ["nvim-cmp"] = true + }, + loaded = false, + needs_bufread = false, + path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/opt/cmp-tabnine", url = "https://github.com/tzachar/cmp-tabnine" }, cmp_luasnip = { - loaded = true, - path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/cmp_luasnip", + after_files = { "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/opt/cmp_luasnip/after/plugin/cmp_luasnip.lua" }, + load_after = { + ["nvim-cmp"] = true + }, + loaded = false, + needs_bufread = false, + path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/opt/cmp_luasnip", url = "https://github.com/saadparwaiz1/cmp_luasnip" }, ["editorconfig-vim"] = { @@ -130,6 +170,15 @@ _G.packer_plugins = { path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/elixir.nvim", url = "https://github.com/mhanberg/elixir.nvim" }, + ["friendly-snippets"] = { + load_after = { + LuaSnip = true + }, + loaded = false, + needs_bufread = false, + path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/opt/friendly-snippets", + url = "https://github.com/rafamadriz/friendly-snippets" + }, ["git-worktree.nvim"] = { loaded = true, path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/git-worktree.nvim", @@ -145,15 +194,20 @@ _G.packer_plugins = { path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/gruvbox-baby", url = "https://github.com/luisiacc/gruvbox-baby" }, + ["impatient.nvim"] = { + loaded = true, + path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/impatient.nvim", + url = "https://github.com/lewis6991/impatient.nvim" + }, ["lsp-status.nvim"] = { loaded = true, path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/lsp-status.nvim", url = "https://github.com/nvim-lua/lsp-status.nvim" }, - ["lspkind-nvim"] = { + ["lspkind.nvim"] = { loaded = true, - path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/lspkind-nvim", - url = "https://github.com/onsails/lspkind-nvim" + path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/lspkind.nvim", + url = "https://github.com/onsails/lspkind.nvim" }, ["lspsaga.nvim"] = { loaded = true, @@ -170,6 +224,25 @@ _G.packer_plugins = { path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/neogit", url = "https://github.com/TimUntersberger/neogit" }, + neorg = { + after = { "neorg-telescope" }, + config = { "\27LJ\2\n-\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\18halfdan.neorg\frequire\0" }, + load_after = {}, + loaded = false, + needs_bufread = true, + only_cond = false, + path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/opt/neorg", + url = "https://github.com/nvim-neorg/neorg" + }, + ["neorg-telescope"] = { + load_after = { + neorg = true + }, + loaded = false, + needs_bufread = false, + path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/opt/neorg-telescope", + url = "https://github.com/nvim-neorg/neorg-telescope" + }, neotest = { loaded = true, path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/neotest", @@ -191,8 +264,15 @@ _G.packer_plugins = { url = "https://github.com/arcticicestudio/nord-vim" }, ["nvim-cmp"] = { - loaded = true, - path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/nvim-cmp", + after = { "cmp-buffer", "cmp-nvim-lua", "cmp-tabnine", "cmp-path", "cmp_luasnip", "cmp-cmdline" }, + config = { "\27LJ\2\n+\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\16halfdan.cmp\frequire\0" }, + load_after = { + LuaSnip = true + }, + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/opt/nvim-cmp", url = "https://github.com/hrsh7th/nvim-cmp" }, ["nvim-dap"] = { @@ -231,8 +311,10 @@ _G.packer_plugins = { url = "https://github.com/nvim-treesitter/nvim-treesitter" }, ["nvim-treesitter-textobjects"] = { + load_after = {}, loaded = true, - path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/nvim-treesitter-textobjects", + needs_bufread = false, + path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/opt/nvim-treesitter-textobjects", url = "https://github.com/nvim-treesitter/nvim-treesitter-textobjects" }, ["nvim-web-devicons"] = { @@ -245,16 +327,18 @@ _G.packer_plugins = { path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/onedark.vim", url = "https://github.com/joshdick/onedark.vim" }, - orgmode = { - loaded = true, - path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/orgmode", - url = "https://github.com/nvim-orgmode/orgmode" - }, ["packer.nvim"] = { loaded = true, path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/packer.nvim", url = "https://github.com/wbthomason/packer.nvim" }, + playground = { + load_after = {}, + loaded = true, + needs_bufread = true, + path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/opt/playground", + url = "https://github.com/nvim-treesitter/playground" + }, ["plenary.nvim"] = { loaded = true, path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/plenary.nvim", @@ -280,16 +364,6 @@ _G.packer_plugins = { path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/tagbar", url = "https://github.com/preservim/tagbar" }, - ["telescope-fzy-native.nvim"] = { - loaded = true, - path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/telescope-fzy-native.nvim", - url = "https://github.com/nvim-telescope/telescope-fzy-native.nvim" - }, - ["telescope-project.nvim"] = { - loaded = true, - path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/telescope-project.nvim", - url = "https://github.com/nvim-telescope/telescope-project.nvim" - }, ["telescope.nvim"] = { loaded = true, path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/telescope.nvim", @@ -320,6 +394,11 @@ _G.packer_plugins = { path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/vim-highlightedyank", url = "https://github.com/machakann/vim-highlightedyank" }, + ["vim-projectionist"] = { + loaded = true, + path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/vim-projectionist", + url = "https://github.com/tpope/vim-projectionist" + }, ["vim-sneak"] = { loaded = true, path = "/Users/matthiasnienaber/.local/share/nvim/site/pack/packer/start/vim-sneak", @@ -342,6 +421,21 @@ time([[Defining packer_plugins]], false) time([[Config for Comment.nvim]], true) try_loadstring("\27LJ\2\n5\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\fComment\frequire\0", "config", "Comment.nvim") time([[Config for Comment.nvim]], false) +-- Load plugins in order defined by `after` +time([[Sequenced loading]], true) +vim.cmd [[ packadd nvim-treesitter ]] +vim.cmd [[ packadd nvim-treesitter-textobjects ]] +vim.cmd [[ packadd playground ]] +time([[Sequenced loading]], false) +vim.cmd [[augroup packer_load_aucmds]] +vim.cmd [[au!]] + -- Event lazy-loads +time([[Defining lazy-load event autocommands]], true) +vim.cmd [[au CmdlineEnter * ++once lua require("packer.load")({'cmp-cmdline'}, { event = "CmdlineEnter *" }, _G.packer_plugins)]] +vim.cmd [[au BufEnter * ++once lua require("packer.load")({'neorg'}, { event = "BufEnter *" }, _G.packer_plugins)]] +vim.cmd [[au InsertEnter * ++once lua require("packer.load")({'LuaSnip', 'nvim-cmp'}, { event = "InsertEnter *" }, _G.packer_plugins)]] +time([[Defining lazy-load event autocommands]], false) +vim.cmd("augroup END") _G._packer.inside_compile = false if _G._packer.needs_bufread == true then