1
0
Fork 0

neovim: startup speed optimizations

This commit is contained in:
Luca Bilke 2024-06-18 08:45:19 +02:00
parent 6db2b1e039
commit 241c6fa689
No known key found for this signature in database
GPG Key ID: C9E851809C1A5BDE
3 changed files with 90 additions and 78 deletions

View File

@ -1,85 +1,28 @@
---@type LazySpec ---@type LazySpec
return { return {
{ { "debugloop/telescope-undo.nvim", lazy = true },
"debugloop/telescope-undo.nvim",
keys = {
{
"<leader>su",
"<cmd>Telescope undo<cr>",
desc = "Undo",
},
},
},
{
"nvim-telescope/telescope.nvim",
optional = true,
opts = function()
LazyVim.on_load("telescope.nvim", function()
require("telescope").load_extension("undo")
end)
end,
},
{
"echasnovski/mini.surround",
opts = {
custom_surroundings = {
B = {
input = { "{{ ().*() }}" },
output = { left = "{{ ", right = " }}" },
},
},
},
},
{
"echasnovski/mini.ai",
opts = {
custom_textobjects = {
B = {
require("mini.ai").gen_spec.pair("{{ ", " }}"),
},
},
},
},
{
"akinsho/bufferline.nvim",
keys = {
{ "<leader>bs", desc = "Sort Bufferline" },
{ "<leader>bsd", "<Cmd>BufferLineSortByDirectory<CR>", desc = "By Directory" },
{ "<leader>bse", "<Cmd>BufferLineSortByExtension<CR>", desc = "By Extension" },
{ "<leader>bsr", "<Cmd>BufferLineSortByRelativeDirectory<CR>", desc = "By Relative Directory" },
{ "<leader>bst", "<Cmd>BufferLineSortByTabs<CR>", desc = "By Tabs" },
},
},
{
"ggandor/flit.nvim",
enabled = false,
},
{
"NvChad/nvim-colorizer.lua",
cmd = { "ColorizerToggle", "ColorizerAttachToBuffer", "ColorizerDetachFromBuffer", "ColorizerReloadAllBuffers" },
opts = { user_default_options = { names = false } },
keys = { { "<leader>uH", "<cmd>ColorizerToggle<cr>", desc = "Toggle Colorizer" } },
},
{
"nvim-neo-tree/neo-tree.nvim",
opts = {
filesystem = {
window = {
mappings = require("lib").generate_shortcut_maps(),
},
},
},
},
{ {
"folke/todo-comments.nvim", "folke/todo-comments.nvim",
lazy = true,
event = "VeryLazy",
opts = { opts = {
highlight = { highlight = {
multiline = false, multiline = false,
}, },
}, },
}, },
{
"NvChad/nvim-colorizer.lua",
lazy = true,
cmd = { "ColorizerToggle", "ColorizerAttachToBuffer", "ColorizerDetachFromBuffer", "ColorizerReloadAllBuffers" },
opts = { user_default_options = { names = false } },
keys = {
{ "<leader>uH", "<cmd>ColorizerToggle<cr>", desc = "Toggle Colorizer" },
},
},
{ {
"zk-org/zk-nvim", "zk-org/zk-nvim",
lazy = true,
ft = { "markdown" }, ft = { "markdown" },
main = "zk", main = "zk",
dependencies = { dependencies = {
@ -131,4 +74,65 @@ return {
{ "<leader>zi", function() require("zk.commands").get("ZkInsertLinkAtSelection")() end, desc = "Insert Link", mode = { "n", "v" } }, { "<leader>zi", function() require("zk.commands").get("ZkInsertLinkAtSelection")() end, desc = "Insert Link", mode = { "n", "v" } },
}, },
}, },
{
"nvim-telescope/telescope.nvim",
optional = true,
opts = function()
LazyVim.on_load("telescope.nvim", function()
require("telescope").load_extension("undo")
end)
end,
keys = {
{
"<leader>su",
"<cmd>Telescope undo<cr>",
desc = "Undo",
},
},
},
{
"echasnovski/mini.surround",
optional = true,
opts = {
custom_surroundings = {
B = {
input = { "{{ ().*() }}" },
output = { left = "{{ ", right = " }}" },
},
},
},
},
{
"echasnovski/mini.ai",
optional = true,
opts = {
custom_textobjects = {
B = {
require("mini.ai").gen_spec.pair("{{ ", " }}"),
},
},
},
},
{
"akinsho/bufferline.nvim",
optional = true,
keys = {
{ "<leader>bs", desc = "Sort Bufferline" },
{ "<leader>bsd", "<Cmd>BufferLineSortByDirectory<CR>", desc = "By Directory" },
{ "<leader>bse", "<Cmd>BufferLineSortByExtension<CR>", desc = "By Extension" },
{ "<leader>bsr", "<Cmd>BufferLineSortByRelativeDirectory<CR>", desc = "By Relative Directory" },
{ "<leader>bst", "<Cmd>BufferLineSortByTabs<CR>", desc = "By Tabs" },
},
},
{
"nvim-neo-tree/neo-tree.nvim",
optional = true,
opts = {
filesystem = {
window = {
mappings = require("lib").generate_shortcut_maps(),
},
},
},
},
} }

View File

@ -2,10 +2,12 @@
return { return {
{ {
"lukas-reineke/headlines.nvim", "lukas-reineke/headlines.nvim",
optional = true,
enabled = false, enabled = false,
}, },
{ {
"stevearc/conform.nvim", "stevearc/conform.nvim",
optional = true,
opts = { opts = {
formatters = { formatters = {
shfmt = { prepend_args = { "-i", "4", "-ci" } }, shfmt = { prepend_args = { "-i", "4", "-ci" } },
@ -14,6 +16,7 @@ return {
}, },
{ {
"williamboman/mason.nvim", "williamboman/mason.nvim",
optional = true,
opts = { opts = {
ensure_installed = { ensure_installed = {
"bash-language-server", "bash-language-server",
@ -22,15 +25,16 @@ return {
}, },
{ {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
optional = true,
opts = { opts = {
servers = { servers = {
-- intelephense = { intelephense = {
-- init_options = { init_options = {
-- storagePath = os.getenv("XDG_CACHE_HOME") .. "/intelephense", storagePath = os.getenv("XDG_CACHE_HOME") .. "/intelephense",
-- globalStoragePath = os.getenv("XDG_CONFIG_HOME") .. "/intelephense", globalStoragePath = os.getenv("XDG_CONFIG_HOME") .. "/intelephense",
-- licenceKey = require("lib").get_secret("intelephense"), licenceKey = require("lib").get_secret("intelephense"),
-- }, },
-- }, },
}, },
}, },
}, },

View File

@ -2,7 +2,7 @@
return { return {
{ {
"folke/tokyonight.nvim", "folke/tokyonight.nvim",
lazy = true, optional = true,
opts = { opts = {
style = "night", style = "night",
on_colors = function(c) on_colors = function(c)
@ -16,6 +16,7 @@ return {
}, },
{ {
"folke/noice.nvim", "folke/noice.nvim",
optional = true,
opts = { opts = {
cmdline = { cmdline = {
view = "cmdline", view = "cmdline",
@ -27,6 +28,7 @@ return {
}, },
{ {
"echasnovski/mini.indentscope", "echasnovski/mini.indentscope",
optional = true,
opts = { opts = {
draw = { draw = {
animation = require("mini.indentscope").gen_animation.none(), animation = require("mini.indentscope").gen_animation.none(),
@ -35,6 +37,7 @@ return {
}, },
{ {
"nvim-lualine/lualine.nvim", "nvim-lualine/lualine.nvim",
optional = true,
opts = { opts = {
sections = { sections = {
lualine_y = { lualine_y = {
@ -63,6 +66,7 @@ return {
}, },
{ {
"nvimdev/dashboard-nvim", "nvimdev/dashboard-nvim",
optional = true,
opts = function(_, opts) opts = function(_, opts)
local center = { local center = {
{ {