mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-22 08:53:31 +02:00
tuning startup time
This commit is contained in:
parent
e5686e4858
commit
368cce2a27
4 changed files with 82 additions and 32 deletions
|
@ -24,7 +24,7 @@
|
||||||
"lualine.nvim": { "branch": "master", "commit": "0050b308552e45f7128f399886c86afefc3eb988" },
|
"lualine.nvim": { "branch": "master", "commit": "0050b308552e45f7128f399886c86afefc3eb988" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "7a97a77eee486ae152d2c559a459eda7c8aa12aa" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "7a97a77eee486ae152d2c559a459eda7c8aa12aa" },
|
||||||
"mason-null-ls.nvim": { "branch": "main", "commit": "13c6ab4a4f810cbbb1799a9cf4d4a27fd862d885" },
|
"mason-null-ls.nvim": { "branch": "main", "commit": "13c6ab4a4f810cbbb1799a9cf4d4a27fd862d885" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "6f8f1ab3f4c5193578797b0d89afa7c497398bb1" },
|
"mason.nvim": { "branch": "main", "commit": "0efc7ceb29a933317e625544d3eb160e7c46dc81" },
|
||||||
"mini.indentscope": { "branch": "main", "commit": "cbabbf3be4a59c7f23725b74ed15e0fba951e328" },
|
"mini.indentscope": { "branch": "main", "commit": "cbabbf3be4a59c7f23725b74ed15e0fba951e328" },
|
||||||
"neoscroll.nvim": { "branch": "master", "commit": "d7601c26c8a183fa8994ed339e70c2d841253e93" },
|
"neoscroll.nvim": { "branch": "master", "commit": "d7601c26c8a183fa8994ed339e70c2d841253e93" },
|
||||||
"null-ls.nvim": { "branch": "main", "commit": "60b4a7167c79c7d04d1ff48b55f2235bf58158a7" },
|
"null-ls.nvim": { "branch": "main", "commit": "60b4a7167c79c7d04d1ff48b55f2235bf58158a7" },
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "077c59586d9d0726b0696dc5680eb863f4e04bc5" },
|
"todo-comments.nvim": { "branch": "main", "commit": "077c59586d9d0726b0696dc5680eb863f4e04bc5" },
|
||||||
"toggleterm.nvim": { "branch": "main", "commit": "2a787c426ef00cb3488c11b14f5dcf892bbd0bda" },
|
"toggleterm.nvim": { "branch": "main", "commit": "2a787c426ef00cb3488c11b14f5dcf892bbd0bda" },
|
||||||
"tokyonight.nvim": { "branch": "main", "commit": "e52c41314e83232840d6970e6b072f9fba242eb9" },
|
"tokyonight.nvim": { "branch": "main", "commit": "e52c41314e83232840d6970e6b072f9fba242eb9" },
|
||||||
"trouble.nvim": { "branch": "main", "commit": "83ec606e7065adf134d17f4af6bae510e3c491c1" },
|
"trouble.nvim": { "branch": "main", "commit": "2fceec1ee299689f42483252ca50b5ba44a0ebdb" },
|
||||||
"vim-bbye": { "branch": "master", "commit": "903f5eb17f72ebf7b0b1524bbb792c0b36761af6" },
|
"vim-bbye": { "branch": "master", "commit": "903f5eb17f72ebf7b0b1524bbb792c0b36761af6" },
|
||||||
"vim-illuminate": { "branch": "master", "commit": "d6ca7f77eeaf61b3e6ce9f0e5a978d606df44298" },
|
"vim-illuminate": { "branch": "master", "commit": "d6ca7f77eeaf61b3e6ce9f0e5a978d606df44298" },
|
||||||
"vim-startuptime": { "branch": "master", "commit": "5f52ed26e0296a3e1d1453935f417e5808eefab8" },
|
"vim-startuptime": { "branch": "master", "commit": "5f52ed26e0296a3e1d1453935f417e5808eefab8" },
|
||||||
|
|
|
@ -6,7 +6,7 @@ return {
|
||||||
-- plugin ini merupakan penyedia library neovim lua
|
-- plugin ini merupakan penyedia library neovim lua
|
||||||
{
|
{
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
event = "VeryLazy",
|
event = "BufRead",
|
||||||
},
|
},
|
||||||
-- color scheme
|
-- color scheme
|
||||||
{
|
{
|
||||||
|
@ -87,6 +87,7 @@ return {
|
||||||
-- coloring code
|
-- coloring code
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
event = "BufRead",
|
||||||
cmd = {
|
cmd = {
|
||||||
"TSBufDisable",
|
"TSBufDisable",
|
||||||
"TSBufEnable",
|
"TSBufEnable",
|
||||||
|
@ -138,7 +139,7 @@ return {
|
||||||
-- auto completion
|
-- auto completion
|
||||||
{
|
{
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
event = "InsertEnter",
|
event = "BufWinEnter",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
"hrsh7th/cmp-buffer",
|
"hrsh7th/cmp-buffer",
|
||||||
|
@ -148,15 +149,17 @@ return {
|
||||||
{
|
{
|
||||||
"tzachar/cmp-tabnine",
|
"tzachar/cmp-tabnine",
|
||||||
build = build,
|
build = build,
|
||||||
|
event = "BufWinEnter",
|
||||||
config = function()
|
config = function()
|
||||||
require("user.tabnine")
|
require("user.tabnine")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"hrsh7th/cmp-cmdline",
|
"hrsh7th/cmp-cmdline",
|
||||||
init = function()
|
event = "BufWinEnter",
|
||||||
require("user.cmdline")
|
-- config = function()
|
||||||
end,
|
-- require("user.cmdline")
|
||||||
|
-- end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
opts = function()
|
opts = function()
|
||||||
|
@ -188,7 +191,7 @@ return {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
-- for formater linter
|
-- for formater linter
|
||||||
{ "RRethy/vim-illuminate", event = "VeryLazy" },
|
{ "RRethy/vim-illuminate", event = "BufRead" },
|
||||||
{
|
{
|
||||||
"jayp0521/mason-null-ls.nvim",
|
"jayp0521/mason-null-ls.nvim",
|
||||||
dependencies = "jose-elias-alvarez/null-ls.nvim",
|
dependencies = "jose-elias-alvarez/null-ls.nvim",
|
||||||
|
@ -228,11 +231,11 @@ return {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
-- untuk comment
|
-- untuk comment
|
||||||
{ "JoosepAlviste/nvim-ts-context-commentstring" },
|
{ "JoosepAlviste/nvim-ts-context-commentstring", event = "BufRead" },
|
||||||
{
|
{
|
||||||
"numToStr/Comment.nvim",
|
"numToStr/Comment.nvim",
|
||||||
event = "InsertEnter",
|
event = "BufRead",
|
||||||
init = function()
|
config = function()
|
||||||
require("user.comment")
|
require("user.comment")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
@ -248,7 +251,7 @@ return {
|
||||||
{
|
{
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
event = "BufRead",
|
event = "BufRead",
|
||||||
init = function()
|
config = function()
|
||||||
require("user.indentline")
|
require("user.indentline")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
@ -298,14 +301,17 @@ return {
|
||||||
-- for file tab
|
-- for file tab
|
||||||
{
|
{
|
||||||
"akinsho/bufferline.nvim",
|
"akinsho/bufferline.nvim",
|
||||||
dependencies = { "kyazdani42/nvim-web-devicons", "famiu/bufdelete.nvim" },
|
dependencies = {
|
||||||
event = "VeryLazy",
|
"kyazdani42/nvim-web-devicons",
|
||||||
|
{ "famiu/bufdelete.nvim", event = "BufRead" },
|
||||||
|
},
|
||||||
|
event = "BufRead",
|
||||||
-- config = function()
|
-- config = function()
|
||||||
-- require("user.bufferline")
|
-- require("user.bufferline")
|
||||||
-- end,
|
-- end,
|
||||||
},
|
},
|
||||||
-- for delete buffers (close files) without closing your windows or messing up your layout.
|
-- for delete buffers (close files) without closing your windows or messing up your layout.
|
||||||
{ "moll/vim-bbye", event = "VeryLazy" },
|
{ "moll/vim-bbye", event = "BufRead" },
|
||||||
-- for view terminal
|
-- for view terminal
|
||||||
{
|
{
|
||||||
"akinsho/toggleterm.nvim",
|
"akinsho/toggleterm.nvim",
|
||||||
|
@ -319,8 +325,8 @@ return {
|
||||||
-- for Speed up loading Lua modules in Neovim to improve startup time.
|
-- for Speed up loading Lua modules in Neovim to improve startup time.
|
||||||
{
|
{
|
||||||
"lewis6991/impatient.nvim",
|
"lewis6991/impatient.nvim",
|
||||||
event = "VeryLazy",
|
event = "BufRead",
|
||||||
init = function()
|
config = function()
|
||||||
require("user.impatient")
|
require("user.impatient")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
@ -343,22 +349,22 @@ return {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
-- for live server html,css,js
|
-- for live server html,css,js
|
||||||
{ "manzeloth/live-server", cmd = { "LiveServer" }, event = "VeryLazy" },
|
{ "manzeloth/live-server", cmd = { "LiveServer" }, event = "BufRead" },
|
||||||
-- for multi cursor select
|
-- for multi cursor select
|
||||||
{ "mg979/vim-visual-multi", event = "BufWinEnter" },
|
{ "mg979/vim-visual-multi", event = "BufRead" },
|
||||||
-- for auto close tag
|
-- for auto close tag
|
||||||
{
|
{
|
||||||
"windwp/nvim-ts-autotag",
|
"windwp/nvim-ts-autotag",
|
||||||
event = "VeryLazy",
|
event = "BufRead",
|
||||||
dependencies = "nvim-treesitter/nvim-treesitter",
|
dependencies = "nvim-treesitter/nvim-treesitter",
|
||||||
init = function()
|
config = function()
|
||||||
require("nvim-ts-autotag").setup()
|
require("nvim-ts-autotag").setup()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
-- for auto detection file and run code
|
-- for auto detection file and run code
|
||||||
{
|
{
|
||||||
"CRAG666/code_runner.nvim",
|
"CRAG666/code_runner.nvim",
|
||||||
event = "VeryLazy",
|
event = "BufRead",
|
||||||
dependencies = "nvim-lua/plenary.nvim",
|
dependencies = "nvim-lua/plenary.nvim",
|
||||||
cmd = { "RunCode", "RunFile", "RunProject", "RunClose" },
|
cmd = { "RunCode", "RunFile", "RunProject", "RunClose" },
|
||||||
config = function()
|
config = function()
|
||||||
|
@ -367,7 +373,7 @@ return {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"is0n/jaq-nvim",
|
"is0n/jaq-nvim",
|
||||||
event = "CursorHold",
|
event = "BufRead",
|
||||||
config = function()
|
config = function()
|
||||||
require("user.jaq")
|
require("user.jaq")
|
||||||
end,
|
end,
|
||||||
|
@ -375,7 +381,7 @@ return {
|
||||||
-- for color view
|
-- for color view
|
||||||
{
|
{
|
||||||
"NvChad/nvim-colorizer.lua",
|
"NvChad/nvim-colorizer.lua",
|
||||||
event = "VeryLazy",
|
event = "BufRead",
|
||||||
opts = function()
|
opts = function()
|
||||||
require("user.colorizer")
|
require("user.colorizer")
|
||||||
end,
|
end,
|
||||||
|
@ -421,7 +427,7 @@ return {
|
||||||
-- mini scrollview
|
-- mini scrollview
|
||||||
{
|
{
|
||||||
"karb94/neoscroll.nvim",
|
"karb94/neoscroll.nvim",
|
||||||
event = "WinScrolled",
|
event = "BufRead",
|
||||||
config = function()
|
config = function()
|
||||||
require("user.neoscroll")
|
require("user.neoscroll")
|
||||||
end,
|
end,
|
||||||
|
@ -442,15 +448,15 @@ return {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
-- for check startuptime
|
-- for check startuptime
|
||||||
{ "dstein64/vim-startuptime", cmd = "StartupTime", event = "VeryLazy" },
|
{ "dstein64/vim-startuptime", cmd = "StartupTime", event = "BufRead" },
|
||||||
-- for coloring pairs
|
-- for coloring pairs
|
||||||
{ "p00f/nvim-ts-rainbow", event = "BufWinEnter", dependencies = "nvim-treesitter/nvim-treesitter" },
|
{ "p00f/nvim-ts-rainbow", event = "BufRead", dependencies = "nvim-treesitter/nvim-treesitter" },
|
||||||
-- for git
|
-- for git
|
||||||
{
|
{
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
enabled = vim.fn.executable("git") == 1,
|
enabled = vim.fn.executable("git") == 1,
|
||||||
ft = "gitcommit",
|
ft = "gitcommit",
|
||||||
event = "VeryLazy",
|
event = "BufRead",
|
||||||
config = function()
|
config = function()
|
||||||
require("user.gitsigns")
|
require("user.gitsigns")
|
||||||
end,
|
end,
|
||||||
|
@ -482,7 +488,7 @@ return {
|
||||||
-- better diagnostics list and others
|
-- better diagnostics list and others
|
||||||
{
|
{
|
||||||
"folke/trouble.nvim",
|
"folke/trouble.nvim",
|
||||||
event = "VeryLazy",
|
event = "BufRead",
|
||||||
cmd = { "TroubleToggle", "Trouble" },
|
cmd = { "TroubleToggle", "Trouble" },
|
||||||
opts = { use_diagnostic_signs = true },
|
opts = { use_diagnostic_signs = true },
|
||||||
keys = {
|
keys = {
|
||||||
|
@ -553,9 +559,26 @@ return {
|
||||||
-- for loading info
|
-- for loading info
|
||||||
{
|
{
|
||||||
"j-hui/fidget.nvim",
|
"j-hui/fidget.nvim",
|
||||||
event = "VeryLazy",
|
event = "BufRead",
|
||||||
config = function()
|
config = function()
|
||||||
require("fidget").setup()
|
require("fidget").setup()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
-- for auto complate commond mode
|
||||||
|
-- {
|
||||||
|
-- "gelguy/wilder.nvim",
|
||||||
|
-- event = "BufWinEnter",
|
||||||
|
-- config = function()
|
||||||
|
-- local wilder = require("wilder")
|
||||||
|
-- wilder.setup({ modes = { ":", "/", "?" } })
|
||||||
|
-- wilder.set_option(
|
||||||
|
-- "renderer",
|
||||||
|
-- wilder.popupmenu_renderer({
|
||||||
|
-- highlighter = wilder.basic_highlighter(),
|
||||||
|
-- left = { " ", wilder.popupmenu_devicons() },
|
||||||
|
-- right = { " ", wilder.popupmenu_scrollbar() },
|
||||||
|
-- })
|
||||||
|
-- )
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
require("cmp").setup.cmdline({ "/", "?" }, {
|
local status_ok, ncmp = pcall(require, "cmp")
|
||||||
|
if not status_ok then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
ncmp.setup.cmdline({ "/", "?" }, {
|
||||||
mapping = require("cmp").mapping.preset.cmdline({
|
mapping = require("cmp").mapping.preset.cmdline({
|
||||||
["<C-z>"] = {
|
["<C-z>"] = {
|
||||||
c = function()
|
c = function()
|
||||||
|
@ -15,7 +19,7 @@ require("cmp").setup.cmdline({ "/", "?" }, {
|
||||||
sources = require("cmp").config.sources({ { name = "buffer", keyword_length = 1 } }),
|
sources = require("cmp").config.sources({ { name = "buffer", keyword_length = 1 } }),
|
||||||
})
|
})
|
||||||
|
|
||||||
require("cmp").setup.cmdline(":", {
|
ncmp.setup.cmdline(":", {
|
||||||
mapping = require("cmp").mapping.preset.cmdline({
|
mapping = require("cmp").mapping.preset.cmdline({
|
||||||
["<C-z>"] = {
|
["<C-z>"] = {
|
||||||
c = function()
|
c = function()
|
||||||
|
|
|
@ -139,3 +139,26 @@ cmp.setup({
|
||||||
native_menu = false,
|
native_menu = false,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- for cmd line
|
||||||
|
cmp.setup.cmdline("/", {
|
||||||
|
mapping = cmp.mapping.preset.cmdline(),
|
||||||
|
sources = {
|
||||||
|
{ name = "buffer" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- `:` cmdline setup.
|
||||||
|
cmp.setup.cmdline(":", {
|
||||||
|
mapping = cmp.mapping.preset.cmdline(),
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = "path" },
|
||||||
|
}, {
|
||||||
|
{
|
||||||
|
name = "cmdline",
|
||||||
|
option = {
|
||||||
|
ignore_cmds = { "Man", "!" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue