Better startup time

This commit is contained in:
Price Hiller 2022-01-15 07:54:02 -06:00
parent 04b7e02f88
commit 9139a25cad
5 changed files with 26 additions and 92 deletions

View File

@ -1 +1,2 @@
pcall(require, 'impatient')
require("main")

View File

@ -42,17 +42,17 @@ cmp.setup({
})
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
-- cmp.setup.cmdline("/", {
-- sources = {
-- { name = "buffer" },
-- },
-- })
--
-- -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
-- cmp.setup.cmdline(":", {
-- sources = cmp.config.sources({
-- { name = "path" },
-- }, {
-- { name = "cmdline" },
-- }),
-- })
cmp.setup.cmdline("/", {
sources = {
{ name = "buffer" },
},
})
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline(":", {
sources = cmp.config.sources({
{ name = "path" },
}, {
{ name = "cmdline" },
}),
})

View File

@ -1 +1,2 @@
require("plugins.plugins")
require('packer_compiled')

View File

@ -15,12 +15,13 @@ end
return require("packer").startup({
function(use)
use({ "wbthomason/packer.nvim" })
-- Performance boost on startup
-- keep at top of plugins
use({ "lewis6991/impatient.nvim" })
-- Packer Itself
use({ "wbthomason/packer.nvim" })
-- Commonly used library
use({
"nvim-lua/plenary.nvim",
@ -62,7 +63,10 @@ return require("packer").startup({
-- Statusline.
use({
"nvim-lualine/lualine.nvim",
after = "nvim-bufferline.lua",
after = {
"nvim-bufferline.lua",
"tokyonight.nvim"
},
config = function()
require("plugins.configs.statusline")
end,
@ -81,7 +85,6 @@ return require("packer").startup({
use({
"nvim-treesitter/nvim-treesitter",
run = ":TSUpdate",
event = "BufEnter",
config = function()
require("plugins.configs.treesitter")
end,
@ -118,16 +121,6 @@ return require("packer").startup({
-- Telescope
use({
"nvim-telescope/telescope.nvim",
-- requires = {
-- { "nvim-lua/plenary.lua" },
-- { "artart222/telescope_find_directories" },
-- { "nvim-telescope/telescope-file-browser.nvim" },
-- {
-- "nvim-telescope/telescope-fzf-native.nvim",
-- opt = true,
-- run = "make",
-- },
-- },
config = function()
require("plugins.configs.telescope-nvim")
end,
@ -168,17 +161,6 @@ return require("packer").startup({
end,
})
-- Completion Engine
-- use({
-- "ms-jpq/coq_nvim",
-- config = function()
-- require("plugins.configs.coq")
-- end,
-- requires = {
-- "ms-jpq/coq.artifacts",
-- "ms-jpq/coq.thirdparty",
-- },
-- })
use({
"rafamadriz/friendly-snippets",
event = "InsertEnter",
@ -186,6 +168,7 @@ return require("packer").startup({
use({
"hrsh7th/nvim-cmp",
even = "InsertEnter",
requires = {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
@ -393,11 +376,6 @@ return require("packer").startup({
after = "nvim-treesitter",
})
-- Completions for /, :, ?
use({
"gelguy/wilder.nvim",
})
-- Leave at end!!!
if packer_bootstrap then
require("packer").sync()
@ -409,5 +387,6 @@ return require("packer").startup({
return require("packer.util").float({ border = "double" })
end,
},
compile_path = vim.fn.stdpath('config') .. '/lua/packer_compiled.lua'
},
})

View File

@ -1,47 +0,0 @@
call wilder#enable_cmdline_enter()
set wildcharm=<Tab>
cmap <expr> <Tab> wilder#in_context() ? wilder#next() : "\<Tab>"
cmap <expr> <S-Tab> wilder#in_context() ? wilder#previous() : "\<S-Tab>"
call wilder#set_option('modes', ['/', '?', ':'])
call wilder#set_option('pipeline', [
\ wilder#branch(
\ wilder#python_file_finder_pipeline({
\ 'file_command': ['rg', '--files'],
\ 'dir_command': ['find', '.', '-type', 'd', '-printf', '%P\n'],
\ 'filters': ['fuzzy_filter', 'difflib_sorter'],
\ }),
\ wilder#cmdline_pipeline({
\ 'fuzzy': 1,
\ 'fuzzy_filter': wilder#vim_fuzzy_filter(),
\ }),
\ wilder#python_search_pipeline({
\ 'pattern': 'fuzzy',
\ }),
\ ),
\ ])
let s:highlighters = [
\ wilder#pcre2_highlighter(),
\ wilder#basic_highlighter(),
\ ]
call wilder#set_option('renderer', wilder#popupmenu_renderer(wilder#popupmenu_border_theme({
\ 'highlighter': s:highlighters,
\ 'highlights': {
\ 'accent': wilder#make_hl('WilderAccent', 'Pmenu', [{}, {}, {'foreground': '#00b6ff'}]),
\ },
\ 'left': [
\ wilder#popupmenu_devicons(),
\ ],
\ 'right': [
\ ' ',
\ wilder#popupmenu_scrollbar(),
\ ],
\ 'min_width': '30%',
\ 'min_height': '0%',
\ 'max_height': '50%',
\ 'reverse': 1,
\ 'border': 'rounded',
\ })))