Better startup time
This commit is contained in:
parent
04b7e02f88
commit
9139a25cad
@ -1 +1,2 @@
|
||||
pcall(require, 'impatient')
|
||||
require("main")
|
||||
|
@ -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" },
|
||||
}),
|
||||
})
|
||||
|
@ -1 +1,2 @@
|
||||
require("plugins.plugins")
|
||||
require('packer_compiled')
|
||||
|
@ -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'
|
||||
},
|
||||
})
|
||||
|
@ -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',
|
||||
\ })))
|
Loading…
Reference in New Issue
Block a user