Speed up vim startup

pull/2/head
Ensar Sarajčić 2021-11-05 20:58:26 +01:00
parent 799a0b538b
commit 78aa03aef4
3 changed files with 24 additions and 7 deletions

View File

@ -2,6 +2,12 @@ if require('init.first_load')() then
return return
end end
-- Allow `require('impatient')` to fail, in case plugins are not yet installed
_ = pcall(require, 'impatient')
-- Speed up startup - quicker filetype.vim - should probably remove in future neovim versions
vim.g.did_load_filetypes = 1
vim.cmd [[filetype plugin on]] vim.cmd [[filetype plugin on]]
vim.cmd [[filetype indent on]] vim.cmd [[filetype indent on]]
vim.cmd [[syntax on]] vim.cmd [[syntax on]]

View File

@ -22,7 +22,6 @@ return require('packer').startup {
-- General improvements -- -- General improvements --
use 'airblade/vim-gitgutter' -- Git signs use 'airblade/vim-gitgutter' -- Git signs
use 'godlygeek/tabular' -- Tabular command for alignment use 'godlygeek/tabular' -- Tabular command for alignment
-- use { 'Shougo/vimproc.vim', run = 'make' } -- Not really used
use 'vim-scripts/utl.vim' -- Universal text linking use 'vim-scripts/utl.vim' -- Universal text linking
use { -- use { --
'mbbill/undotree', -- 'mbbill/undotree', --
@ -35,6 +34,8 @@ return require('packer').startup {
use 'romainl/vim-qf' -- Quickfix list upgrades use 'romainl/vim-qf' -- Quickfix list upgrades
use 'romainl/vim-devdocs' -- Quick DevDocs.io search using :DD use 'romainl/vim-devdocs' -- Quick DevDocs.io search using :DD
use 'gpanders/editorconfig.nvim' -- .editorconfig support use 'gpanders/editorconfig.nvim' -- .editorconfig support
use 'nathom/filetype.nvim' -- Quicker filetype.nvim file
use 'lewis6991/impatient.nvim' -- Caching lua modules for faster startup
-- Tools -- -- Tools --
use 'direnv/direnv.vim' -- Integration with Direnv use 'direnv/direnv.vim' -- Integration with Direnv
@ -57,7 +58,6 @@ return require('packer').startup {
end -- end --
-- Language support -- -- Language support --
use 'sheerun/vim-polyglot' -- All popular languages
use 'tpope/vim-rails' -- Enables all rails command through vim and integrates with projectionist use 'tpope/vim-rails' -- Enables all rails command through vim and integrates with projectionist
use 'c-brenn/phoenix.vim' -- Similar to vim-rails, but for phoenix use 'c-brenn/phoenix.vim' -- Similar to vim-rails, but for phoenix
use 'tpope/vim-salve' -- Clojure integration with projectionist use 'tpope/vim-salve' -- Clojure integration with projectionist
@ -71,6 +71,7 @@ return require('packer').startup {
use( -- Simpler keymaps for vim-sexp use( -- Simpler keymaps for vim-sexp
'tpope/vim-sexp-mappings-for-regular-people' 'tpope/vim-sexp-mappings-for-regular-people'
) )
use 'tridactyl/vim-tridactyl' -- Tridactyl config file support
-- Treesitter -- -- Treesitter --
use { -- use { --

View File

@ -119,11 +119,21 @@ _G.packer_plugins = {
path = "/home/ensar/.local/share/nvim/site/pack/packer/start/editorconfig.nvim", path = "/home/ensar/.local/share/nvim/site/pack/packer/start/editorconfig.nvim",
url = "https://github.com/gpanders/editorconfig.nvim" url = "https://github.com/gpanders/editorconfig.nvim"
}, },
["filetype.nvim"] = {
loaded = true,
path = "/home/ensar/.local/share/nvim/site/pack/packer/start/filetype.nvim",
url = "https://github.com/nathom/filetype.nvim"
},
["flutter-tools.nvim"] = { ["flutter-tools.nvim"] = {
loaded = true, loaded = true,
path = "/home/ensar/.local/share/nvim/site/pack/packer/start/flutter-tools.nvim", path = "/home/ensar/.local/share/nvim/site/pack/packer/start/flutter-tools.nvim",
url = "https://github.com/akinsho/flutter-tools.nvim" url = "https://github.com/akinsho/flutter-tools.nvim"
}, },
["impatient.nvim"] = {
loaded = true,
path = "/home/ensar/.local/share/nvim/site/pack/packer/start/impatient.nvim",
url = "https://github.com/lewis6991/impatient.nvim"
},
["lsp_extensions.nvim"] = { ["lsp_extensions.nvim"] = {
loaded = true, loaded = true,
path = "/home/ensar/.local/share/nvim/site/pack/packer/start/lsp_extensions.nvim", path = "/home/ensar/.local/share/nvim/site/pack/packer/start/lsp_extensions.nvim",
@ -332,11 +342,6 @@ _G.packer_plugins = {
path = "/home/ensar/.local/share/nvim/site/pack/packer/start/vim-obsession", path = "/home/ensar/.local/share/nvim/site/pack/packer/start/vim-obsession",
url = "https://github.com/tpope/vim-obsession" url = "https://github.com/tpope/vim-obsession"
}, },
["vim-polyglot"] = {
loaded = true,
path = "/home/ensar/.local/share/nvim/site/pack/packer/start/vim-polyglot",
url = "https://github.com/sheerun/vim-polyglot"
},
["vim-projectionist"] = { ["vim-projectionist"] = {
loaded = true, loaded = true,
path = "/home/ensar/.local/share/nvim/site/pack/packer/start/vim-projectionist", path = "/home/ensar/.local/share/nvim/site/pack/packer/start/vim-projectionist",
@ -407,6 +412,11 @@ _G.packer_plugins = {
path = "/home/ensar/.local/share/nvim/site/pack/packer/start/vim-test", path = "/home/ensar/.local/share/nvim/site/pack/packer/start/vim-test",
url = "https://github.com/vim-test/vim-test" url = "https://github.com/vim-test/vim-test"
}, },
["vim-tridactyl"] = {
loaded = true,
path = "/home/ensar/.local/share/nvim/site/pack/packer/start/vim-tridactyl",
url = "https://github.com/tridactyl/vim-tridactyl"
},
["vim-unimpaired"] = { ["vim-unimpaired"] = {
loaded = true, loaded = true,
path = "/home/ensar/.local/share/nvim/site/pack/packer/start/vim-unimpaired", path = "/home/ensar/.local/share/nvim/site/pack/packer/start/vim-unimpaired",