diff --git a/vim/.config/nvim/init.lua b/vim/.config/nvim/init.lua index 3a99a8d..39eb634 100644 --- a/vim/.config/nvim/init.lua +++ b/vim/.config/nvim/init.lua @@ -2,8 +2,6 @@ -- License: WTFPL -- Description: Personal neovim configuration -vim.g.mapleader = ' ' - require('builtins') require('filetypes') require('settings') diff --git a/vim/.config/nvim/lua/builtins.lua b/vim/.config/nvim/lua/builtins.lua index 1f356ed..f70883b 100644 --- a/vim/.config/nvim/lua/builtins.lua +++ b/vim/.config/nvim/lua/builtins.lua @@ -15,7 +15,3 @@ vim.g.loaded_matchit = 1 vim.g.loaded_matchparen = 1 vim.g.loaded_logiPat = 1 vim.g.loaded_rrhelper = 1 - -vim.g.loaded_netrw = 1 -vim.g.loaded_netrwPlugin = 1 -vim.g.loaded_netrwSettings = 1 diff --git a/vim/.config/nvim/lua/filetypes.lua b/vim/.config/nvim/lua/filetypes.lua index 9c60510..be9002f 100644 --- a/vim/.config/nvim/lua/filetypes.lua +++ b/vim/.config/nvim/lua/filetypes.lua @@ -2,23 +2,22 @@ if not vim.filetype then return end -vim.g.did_load_filetypes = 0 -- deactivate vim based filetype detection -vim.g.do_filetype_lua = 1 -- enable - -vim.filetype.add({ - extension = { - lock = 'yaml', - }, - filename = { - ['.gitignore'] = 'conf', - ['launch.json'] = 'jsonc', - Podfile = 'ruby', - Brewfile = 'ruby', - Vagrantfile = 'ruby', - }, - pattern = { - ['*.gradle'] = 'groovy', - ['*.env.*'] = 'env', - }, -}) - +-- vim.g.did_load_filetypes = 0 -- deactivate vim based filetype detection +-- vim.g.do_filetype_lua = 1 -- enable lua ft detection +-- +-- vim.filetype.add({ +-- extension = { +-- -- yml = 'yaml', +-- docker = 'dockerfile', +-- }, +-- filename = { +-- ['.gitignore'] = 'conf', +-- Podfile = 'ruby', +-- Brewfile = 'ruby', +-- Vagrantfile = 'ruby', +-- }, +-- pattern = { +-- ['*.gradle'] = 'groovy', +-- ['*.env.*'] = 'env', +-- }, +-- }) diff --git a/vim/.config/nvim/lua/mappings.lua b/vim/.config/nvim/lua/mappings.lua index 3b24c7f..cfe116d 100644 --- a/vim/.config/nvim/lua/mappings.lua +++ b/vim/.config/nvim/lua/mappings.lua @@ -10,6 +10,8 @@ end --- Mappings -- Essentials +vim.g.mapleader = ' ' + nmap(';', ':') nmap(',,', '') nmap('w', ':w') -- TODO: stop this madness, :h autowrite @@ -46,19 +48,21 @@ map('v', 'K', ':m \'<-2gv=gv') map('v', '<', '', '>gv') --- fzf -nmap('ff', ':Files') -nmap('ft', ':Files ~/Tmp') --- TODO: make the path relative to ~/Syncthing/Obsidian/Personal -nmap('fo', ":call fzf#run(fzf#wrap(fzf#vim#with_preview({ 'source': 'fd . --type f --extension=md --follow --exclude .git ~/Syncthing/Obsidian/Personal' })))", { silent = true }) +-- Telescope +nmap('ff', ':lua require("telescope.builtin").find_files({ hidden = true })') +-- TODO: change to Telescope +-- nmap('ft', ':Files ~/Tmp') +-- nmap('fo', ":call fzf#run(fzf#wrap(fzf#vim#with_preview({ 'source': 'fd . --type f --extension=md --follow --exclude .git ~/Syncthing/Obsidian/Personal' })))", { silent = true }) -- vim-easy-align map('x', 'ga', ':EasyAlign') -- TODO: this should allow for gaip, but does not map('v', 'ga', ':EasyAlign') -- nvim-tree.lua -nmap('n', ':NERDTreeToggle') -nmap('N', ':NERDTreeFind') +-- nmap('n', ':NERDTreeToggle') +-- nmap('N', ':NERDTreeFind') +nmap('n', ':NvimTreeToggle') +nmap('N', ':NvimTreeFindFile') -- glow.vim nmap('p', ':Glow') diff --git a/vim/.config/nvim/lua/plugins/cmp.lua b/vim/.config/nvim/lua/plugins/cmp.lua new file mode 100644 index 0000000..80328bd --- /dev/null +++ b/vim/.config/nvim/lua/plugins/cmp.lua @@ -0,0 +1,63 @@ +local cmp = require 'cmp' +local luasnip = require 'luasnip' + +local has_words_before = function() + local line, col = unpack(vim.api.nvim_win_get_cursor(0)) + return col ~= 0 and + vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub( + col, col):match("%s") == nil +end + +cmp.setup({ + snippet = { + expand = function(args) + require('luasnip').lsp_expand(args.body) -- For `luasnip` users. + end, + }, + window = { + -- completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), + }, + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.abort(), + [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + elseif has_words_before() then + cmp.complete() + else + fallback() + end + end, { "i", "s" }), + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { "i", "s" }), + }), + sources = cmp.config.sources({ + { name = 'nvim_lsp' }, + { name = 'luasnip' }, -- For luasnip users. + }, { + { name = 'buffer' }, + }) +}) + +-- Set up lspconfig. +local capabilities = require('cmp_nvim_lsp').default_capabilities() +require('lspconfig')['solargraph'].setup({ capabilities = capabilities }) + +-- require("luasnip.loaders.from_lua").lazy_load() + +require('luasnip').filetype_extend("ruby", {"rails"}) +require('luasnip.loaders.from_vscode').lazy_load() diff --git a/vim/.config/nvim/lua/plugins/comment.lua b/vim/.config/nvim/lua/plugins/comment.lua new file mode 100644 index 0000000..a844323 --- /dev/null +++ b/vim/.config/nvim/lua/plugins/comment.lua @@ -0,0 +1 @@ +require('Comment').setup() diff --git a/vim/.config/nvim/lua/plugins/init.lua b/vim/.config/nvim/lua/plugins/init.lua index bc2eede..ca6260d 100644 --- a/vim/.config/nvim/lua/plugins/init.lua +++ b/vim/.config/nvim/lua/plugins/init.lua @@ -7,9 +7,8 @@ end require('packer').startup(function() use 'wbthomason/packer.nvim' - use 'arcticicestudio/nord-vim' + use 'shaunsingh/nord.nvim' use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' } - use 'tpope/vim-commentary' use 'tpope/vim-surround' use { 'junegunn/fzf', run = 'cd ~/.fzf && ./install --all' } use 'junegunn/fzf.vim' @@ -17,20 +16,23 @@ require('packer').startup(function() use 'christoomey/vim-tmux-navigator' use 'airblade/vim-gitgutter' use 'tpope/vim-repeat' - use 'scrooloose/nerdtree' -- other file tree plugins are too fancy + use 'nvim-tree/nvim-tree.lua' + use 'numtostr/comment.nvim' use 'ellisonleao/glow.nvim' -- Snippets use 'L3MON4D3/LuaSnip' use 'hrsh7th/nvim-cmp' + use 'hrsh7th/cmp-nvim-lsp' use 'saadparwaiz1/cmp_luasnip' - use 'rafamadriz/friendly-snippets' + use "rafamadriz/friendly-snippets" use 'neovim/nvim-lspconfig' -- tpope use 'tpope/vim-fugitive' use 'tpope/vim-rails' + use 'tpope/vim-rhubarb' -- tests use 'vim-test/vim-test' @@ -38,25 +40,32 @@ require('packer').startup(function() use 'dyng/ctrlsf.vim' - use 'nvim-lua/plenary.nvim' - use 'nvim-telescope/telescope.nvim' + -- Fuzzy Finder Algorithm which requires local dependencies to be built. Only load if `make` is available + use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make', cond = vim.fn.executable "make" == 1 } + use { 'nvim-telescope/telescope.nvim', branch = '0.1.x', requires = { 'nvim-lua/plenary.nvim' } } + + use "williamboman/mason.nvim" + use "WhoIsSethDaniel/mason-tool-installer.nvim" + use "jose-elias-alvarez/null-ls.nvim" + use({ + "williamboman/mason-lspconfig.nvim", + requires = { + "neovim/nvim-lspconfig", + } + }) + use 'AndrewRadev/splitjoin.vim' end) require 'plugins/treesitter' require 'plugins/gitgutter' require 'plugins/lsp' -require 'plugins/luasnip' - --- fzf -g.fzf_preview_window = '' -g.fzf_layout = { window = { width = 0.6, height = 0.6, border = 'sharp' } } - --- NERDTree -g.NERDTreeWinPos = "right" -g.NERDTreeMinimalUI = 1 -g.NERDTreeDirArrows = 1 -g.NERDTreeAutoDeleteBuffer = 1 -g.NERDTreeHijackNetrw = 1 +require 'plugins/cmp' +require 'plugins/nord' +require 'plugins/nvim-tree' +require 'plugins/comment' +require 'plugins/mason' +require 'plugins/null-ls' +require 'plugins/telescope' -- vim-test g['test#strategy'] = 'vimux' @@ -73,7 +82,3 @@ g.ctrlsf_mapping = { next = 'n', prev = 'N', } - --- fzf -g.fzf_preview_window = '' -g.fzf_layout = { window = { width = 0.6, height = 0.6, border = 'sharp' } } diff --git a/vim/.config/nvim/lua/plugins/lsp.lua b/vim/.config/nvim/lua/plugins/lsp.lua index 4e7b171..9214df8 100644 --- a/vim/.config/nvim/lua/plugins/lsp.lua +++ b/vim/.config/nvim/lua/plugins/lsp.lua @@ -1,77 +1,47 @@ ------------ LSP -require'lspconfig'.solargraph.setup{} -local nvim_lsp = require('lspconfig') +require("mason-lspconfig").setup() +local lspconfig = require('lspconfig') +lspconfig.ansiblels.setup({}) +lspconfig.bashls.setup({}) +lspconfig.dockerls.setup({}) +lspconfig.gopls.setup({}) +lspconfig.jsonls.setup({}) +lspconfig.solargraph.setup({}) +lspconfig.marksman.setup({}) +lspconfig.terraformls.setup({}) +lspconfig.vimls.setup({}) +lspconfig.pylsp.setup({}) +lspconfig.yamlls.setup({}) --- Use an on_attach function to only map the following keys --- after the language server attaches to the current buffer -local on_attach = function(client, bufnr) - local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end - local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end +-- Provide settings that should only apply to the "sumneko_lua" server +local lua_runtime_path = vim.split(package.path, ';') +table.insert(lua_runtime_path, "lua/?.lua") +table.insert(lua_runtime_path, "lua/?/init.lua") +table.insert(lua_runtime_path, vim.fn.stdpath('config') .. "lua/?.lua") - -- Enable completion triggered by - buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') - - -- Mappings. - local opts = { noremap=true, silent=true } - - -- See `:help vim.lsp.*` for documentation on any of the below functions - buf_set_keymap('n', 'gd', 'lua vim.lsp.buf.definition()', opts) - buf_set_keymap('n', 'gr', 'lua vim.lsp.buf.references()', opts) - buf_set_keymap('n', 'K', 'lua vim.lsp.buf.hover()', opts) - buf_set_keymap('n', '=', 'lua vim.lsp.buf.formatting()', opts) -end - --- Use a loop to conveniently call 'setup' on multiple servers and --- map buffer local keybindings when the language server attaches -local servers = { 'solargraph' } -for _, lsp in ipairs(servers) do - nvim_lsp[lsp].setup { - on_attach = on_attach, - flags = { - debounce_text_changes = 150, - } - } -end - -local cmp = require 'cmp' -cmp.setup { - snippet = { - expand = function(args) - require('luasnip').lsp_expand(args.body) - end, - }, - mapping = { - [''] = cmp.mapping.select_prev_item(), - [''] = cmp.mapping.select_next_item(), - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.complete(), - [''] = cmp.mapping.close(), - [''] = cmp.mapping.confirm { - behavior = cmp.ConfirmBehavior.Replace, - select = true, +lspconfig.sumneko_lua.setup({ + settings = { + Lua = { + runtime = { + -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) + version = 'LuaJIT', + -- Setup your lua path + path = lua_runtime_path, + }, + format = { + enable = true, + defaultConfig = { + keep_one_space_between_table_and_bracket = "false", + } + }, + diagnostics = { + -- Get the language server to recognize the `vim` global + globals = {'vim'}, + ["codestyle-check"] = "Any", + }, + -- Do not send telemetry data containing a randomized but unique identifier + telemetry = { + enable = false, + }, }, - [''] = function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.expand_or_jumpable() then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes('luasnip-expand-or-jump', true, true, true), '') - else - fallback() - end - end, - [''] = function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif luasnip.jumpable(-1) then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes('luasnip-jump-prev', true, true, true), '') - else - fallback() - end - end, - }, - sources = { - { name = 'nvim_lsp' }, - { name = 'luasnip' }, - }, -} + } +}) diff --git a/vim/.config/nvim/lua/plugins/mason.lua b/vim/.config/nvim/lua/plugins/mason.lua new file mode 100644 index 0000000..d619aec --- /dev/null +++ b/vim/.config/nvim/lua/plugins/mason.lua @@ -0,0 +1,11 @@ +require("mason").setup({}) +require("mason-tool-installer").setup({ + -- https://github.com/williamboman/mason-lspconfig.nvim/blob/main/doc/server-mapping.md + ensure_installed = { "bash-language-server", "black", "dockerfile-language-server", + "isort", "json-lsp", "jsonlint", "lua-language-server", "marksman", "prettierd", + "python-lsp-server", "rubocop", "shfmt", "solargraph", "terraform-ls", + "vim-language-server", "yaml-language-server", + }, + auto_update = true, + run_on_start = true +}) diff --git a/vim/.config/nvim/lua/plugins/nord.lua b/vim/.config/nvim/lua/plugins/nord.lua new file mode 100644 index 0000000..5962f04 --- /dev/null +++ b/vim/.config/nvim/lua/plugins/nord.lua @@ -0,0 +1,30 @@ +-- https://github.com/shaunsingh/nord.nvim#%EF%B8%8F-configuration + +-- Make sidebars and popup menus like nvim-tree and telescope +-- have a different background +vim.g.nord_contrast = true + +-- Enable the border between verticaly split windows visable +vim.g.nord_borders = true + +-- Disable the setting of background color so that NeoVim +-- can use your terminal background +vim.g.nord_disable_background = false + +-- Set the cursorline transparent/visible +vim.g.nord_cursorline_transparent = false + +-- Re-enables the background of the sidebar if you disabled the background of everything +vim.g.nord_enable_sidebar_background = false + +-- Enables/disables italics +vim.g.nord_italic = true + +-- Enables/disables colorful backgrounds when used in diff mode +vim.g.nord_uniform_diff_background = true + +-- Enables/disables bold +vim.g.nord_bold = false + +-- Load the colorscheme +require('nord').set() diff --git a/vim/.config/nvim/lua/plugins/null-ls.lua b/vim/.config/nvim/lua/plugins/null-ls.lua new file mode 100644 index 0000000..84cd5dd --- /dev/null +++ b/vim/.config/nvim/lua/plugins/null-ls.lua @@ -0,0 +1,29 @@ +local augroup = vim.api.nvim_create_augroup("LspFormatting", {}) +require("null-ls").setup({ + sources = { + require("null-ls").builtins.formatting.jq, + require("null-ls").builtins.formatting.gofmt, + require("null-ls").builtins.formatting.prettierd, + require("null-ls").builtins.formatting.terraform_fmt, + require("null-ls").builtins.diagnostics.jsonlint, + }, + -- you can reuse a shared lspconfig on_attach callback here + on_attach = function(client, bufnr) + if client.supports_method("textDocument/formatting") then + vim.api.nvim_clear_autocmds({group = augroup, buffer = bufnr}) + vim.api.nvim_create_autocmd("BufWritePre", { + group = augroup, + buffer = bufnr, + callback = function() + vim.lsp.buf.format({ + bufnr = bufnr, + async = false, + filter = function(client) + return client.name == "null-ls" + end + }) + end, + }) + end + end, +}) diff --git a/vim/.config/nvim/lua/plugins/nvim-tree.lua b/vim/.config/nvim/lua/plugins/nvim-tree.lua new file mode 100644 index 0000000..c00b33a --- /dev/null +++ b/vim/.config/nvim/lua/plugins/nvim-tree.lua @@ -0,0 +1,14 @@ +require("nvim-tree").setup({ + sort_by = "case_sensitive", + renderer = { + icons = { + show = { + file = false, + folder = false, + folder_arrow = false, + git = false, + } + }, + group_empty = true, + } +}) diff --git a/vim/.config/nvim/lua/plugins/telescope.lua b/vim/.config/nvim/lua/plugins/telescope.lua new file mode 100644 index 0000000..1411903 --- /dev/null +++ b/vim/.config/nvim/lua/plugins/telescope.lua @@ -0,0 +1,2 @@ +-- Enable telescope fzf native, if installed +pcall(require('telescope').load_extension, 'fzf') diff --git a/vim/.config/nvim/lua/plugins/treesitter.lua b/vim/.config/nvim/lua/plugins/treesitter.lua index 32401dc..db9561e 100644 --- a/vim/.config/nvim/lua/plugins/treesitter.lua +++ b/vim/.config/nvim/lua/plugins/treesitter.lua @@ -6,7 +6,22 @@ require('nvim-treesitter.configs').setup { 'javascript', 'json', 'kotlin', 'latex', 'lua', 'make', 'markdown', 'perl', 'php', 'python', 'ruby', 'rust', 'scss', 'swift', 'toml', 'tsx', 'vim', 'vue', 'yaml' }, -- ignore_install = { 'norg' }, - highlight = { enable = true }, - indent = { enable = true }, + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, + context_commentstring = { + enable = true, + enable_autocmd = false, + }, + rainbow = { + enable = true, + disable = { "html" }, + extended_mode = false, + max_file_lines = nil, + }, + indent = { enable = false }, autopairs = { enable = true }, + autotag = { enable = true }, + incremental_selection = { enable = true }, } diff --git a/vim/.config/nvim/lua/settings.lua b/vim/.config/nvim/lua/settings.lua index b5af736..7ec0f8d 100644 --- a/vim/.config/nvim/lua/settings.lua +++ b/vim/.config/nvim/lua/settings.lua @@ -12,6 +12,7 @@ cmd('au TextYankPost * lua vim.highlight.on_yank { timeout = 250 }') cmd('colorscheme nord') opt.smartindent = true -- Autoindenting when starting a new line +opt.completeopt = {'menu', 'menuone', 'noselect'} opt.tabstop = 2 -- Tab counts as 2 columns opt.shiftwidth = 2 -- Numbers of spaces to (auto)indent opt.expandtab = true -- Tabs to spaces @@ -47,6 +48,8 @@ opt.listchars = { trail = 'ยท', tab = '->' } opt.timeoutlen = 1000 -- Delay for mappings opt.ttimeoutlen = 0 -- Delay between modes opt.shellcmdflag = '-ic' -- Enables aliases from .bashrc in :! commands +opt.termguicolors = true -- 24-bit RGB color + if vim.fn.executable('rg') > 0 then vim.o.grepprg = [[rg --glob "!.git" --no-heading --vimgrep --follow $*]] diff --git a/vim/.config/nvim/plugin/packer_compiled.lua b/vim/.config/nvim/plugin/packer_compiled.lua index 5c47f52..331dbe5 100644 --- a/vim/.config/nvim/plugin/packer_compiled.lua +++ b/vim/.config/nvim/plugin/packer_compiled.lua @@ -9,23 +9,26 @@ vim.api.nvim_command('packadd packer.nvim') local no_errors, error_msg = pcall(function() - local time - local profile_info - local should_profile = false - if should_profile then - local hrtime = vim.loop.hrtime - profile_info = {} - time = function(chunk, start) - if start then - profile_info[chunk] = hrtime() - else - profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 - end +_G._packer = _G._packer or {} +_G._packer.inside_compile = true + +local time +local profile_info +local should_profile = false +if should_profile then + local hrtime = vim.loop.hrtime + profile_info = {} + time = function(chunk, start) + if start then + profile_info[chunk] = hrtime() + else + profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 end - else - time = function(chunk, start) end end - +else + time = function(chunk, start) end +end + local function save_profiles(threshold) local sorted_times = {} for chunk_name, time_taken in pairs(profile_info) do @@ -38,8 +41,10 @@ local function save_profiles(threshold) results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms' end end + if threshold then + table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)') + end - _G._packer = _G._packer or {} _G._packer.profile_output = results end @@ -74,11 +79,21 @@ _G.packer_plugins = { path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/LuaSnip", url = "https://github.com/L3MON4D3/LuaSnip" }, + ["cmp-nvim-lsp"] = { + loaded = true, + path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", + url = "https://github.com/hrsh7th/cmp-nvim-lsp" + }, cmp_luasnip = { loaded = true, path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/cmp_luasnip", url = "https://github.com/saadparwaiz1/cmp_luasnip" }, + ["comment.nvim"] = { + loaded = true, + path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/comment.nvim", + url = "https://github.com/numtostr/comment.nvim" + }, ["ctrlsf.vim"] = { loaded = true, path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/ctrlsf.vim", @@ -104,15 +119,30 @@ _G.packer_plugins = { path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/glow.nvim", url = "https://github.com/ellisonleao/glow.nvim" }, - nerdtree = { + ["mason-lspconfig.nvim"] = { loaded = true, - path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/nerdtree", - url = "https://github.com/scrooloose/nerdtree" + path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim", + url = "https://github.com/williamboman/mason-lspconfig.nvim" }, - ["nord-vim"] = { + ["mason-tool-installer.nvim"] = { loaded = true, - path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/nord-vim", - url = "https://github.com/arcticicestudio/nord-vim" + path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/mason-tool-installer.nvim", + url = "https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim" + }, + ["mason.nvim"] = { + loaded = true, + path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/mason.nvim", + url = "https://github.com/williamboman/mason.nvim" + }, + ["nord.nvim"] = { + loaded = true, + path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/nord.nvim", + url = "https://github.com/shaunsingh/nord.nvim" + }, + ["null-ls.nvim"] = { + loaded = true, + path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/null-ls.nvim", + url = "https://github.com/jose-elias-alvarez/null-ls.nvim" }, ["nvim-cmp"] = { loaded = true, @@ -124,6 +154,11 @@ _G.packer_plugins = { path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", url = "https://github.com/neovim/nvim-lspconfig" }, + ["nvim-tree.lua"] = { + loaded = true, + path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/nvim-tree.lua", + url = "https://github.com/nvim-tree/nvim-tree.lua" + }, ["nvim-treesitter"] = { loaded = true, path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/nvim-treesitter", @@ -139,16 +174,24 @@ _G.packer_plugins = { path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/plenary.nvim", url = "https://github.com/nvim-lua/plenary.nvim" }, + ["splitjoin.vim"] = { + loaded = true, + path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/splitjoin.vim", + url = "https://github.com/AndrewRadev/splitjoin.vim" + }, + ["telescope-fzf-native.nvim"] = { + cond = { true }, + loaded = false, + needs_bufread = false, + only_cond = true, + path = "/Users/madundead/.local/share/nvim/site/pack/packer/opt/telescope-fzf-native.nvim", + url = "https://github.com/nvim-telescope/telescope-fzf-native.nvim" + }, ["telescope.nvim"] = { loaded = true, path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/telescope.nvim", url = "https://github.com/nvim-telescope/telescope.nvim" }, - ["vim-commentary"] = { - loaded = true, - path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/vim-commentary", - url = "https://github.com/tpope/vim-commentary" - }, ["vim-easy-align"] = { loaded = true, path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/vim-easy-align", @@ -174,6 +217,11 @@ _G.packer_plugins = { path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/vim-repeat", url = "https://github.com/tpope/vim-repeat" }, + ["vim-rhubarb"] = { + loaded = true, + path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/vim-rhubarb", + url = "https://github.com/tpope/vim-rhubarb" + }, ["vim-surround"] = { loaded = true, path = "/Users/madundead/.local/share/nvim/site/pack/packer/start/vim-surround", @@ -197,6 +245,17 @@ _G.packer_plugins = { } time([[Defining packer_plugins]], false) +-- Conditional loads +time([[Conditional loading of telescope-fzf-native.nvim]], true) + require("packer.load")({"telescope-fzf-native.nvim"}, {}, _G.packer_plugins) +time([[Conditional loading of telescope-fzf-native.nvim]], false) + +_G._packer.inside_compile = false +if _G._packer.needs_bufread == true then + vim.cmd("doautocmd BufRead") +end +_G._packer.needs_bufread = false + if should_profile then save_profiles() end end)