Speed up neovim startup by lazy loading more
This commit is contained in:
parent
4eae09ee71
commit
7216c1c167
|
@ -2,7 +2,7 @@ local runtime = require("my.tempest")
|
||||||
|
|
||||||
local lspconfig = {
|
local lspconfig = {
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
event = "BufReadPre",
|
event = "VeryLazy",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"neoconf",
|
"neoconf",
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,6 +9,12 @@ let
|
||||||
tempestModule = "my.tempest";
|
tempestModule = "my.tempest";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# {{{ Config helpers
|
||||||
|
# :p => expands path
|
||||||
|
# :h => returns the head of the path
|
||||||
|
notmp = nlib.lua ''vim.fn.expand("%:p:h") ~= "/tmp"'';
|
||||||
|
# }}}
|
||||||
|
|
||||||
generated = nlib.generateConfig
|
generated = nlib.generateConfig
|
||||||
(lib.fix (self: with nlib; {
|
(lib.fix (self: with nlib; {
|
||||||
# {{{ Pre-plugin config
|
# {{{ Pre-plugin config
|
||||||
|
@ -360,7 +366,7 @@ let
|
||||||
winbar = {
|
winbar = {
|
||||||
package = "fgheng/winbar.nvim";
|
package = "fgheng/winbar.nvim";
|
||||||
|
|
||||||
cond = blacklist [ "vscode" "firenvim" ];
|
cond = [ (blacklist [ "vscode" "firenvim" ]) notmp ];
|
||||||
event = "BufReadPost";
|
event = "BufReadPost";
|
||||||
|
|
||||||
opts.enabled = true;
|
opts.enabled = true;
|
||||||
|
@ -501,7 +507,7 @@ let
|
||||||
package = "stevearc/dressing.nvim";
|
package = "stevearc/dressing.nvim";
|
||||||
|
|
||||||
cond = blacklist "vscode";
|
cond = blacklist "vscode";
|
||||||
event = "BufReadPre";
|
event = "VeryLazy";
|
||||||
|
|
||||||
config = true;
|
config = true;
|
||||||
init = thunk /* lua */ ''
|
init = thunk /* lua */ ''
|
||||||
|
@ -527,7 +533,7 @@ let
|
||||||
config = true;
|
config = true;
|
||||||
|
|
||||||
cond = blacklist "vscode";
|
cond = blacklist "vscode";
|
||||||
event = "BufReadPost";
|
event = "VeryLazy";
|
||||||
};
|
};
|
||||||
# }}}
|
# }}}
|
||||||
# {{{ live-command
|
# {{{ live-command
|
||||||
|
@ -620,7 +626,7 @@ let
|
||||||
dependencies.lua = [ "treesitter" ];
|
dependencies.lua = [ "treesitter" ];
|
||||||
|
|
||||||
cond = blacklist "vscode";
|
cond = blacklist "vscode";
|
||||||
event = "BufReadPost";
|
event = "VeryLazy";
|
||||||
};
|
};
|
||||||
|
|
||||||
# show context at top of file
|
# show context at top of file
|
||||||
|
@ -629,7 +635,7 @@ let
|
||||||
dependencies.lua = [ "treesitter" ];
|
dependencies.lua = [ "treesitter" ];
|
||||||
|
|
||||||
cond = blacklist "vscode";
|
cond = blacklist "vscode";
|
||||||
event = "BufReadPost";
|
event = "VeryLazy";
|
||||||
opts.enable = true;
|
opts.enable = true;
|
||||||
};
|
};
|
||||||
# }}}
|
# }}}
|
||||||
|
@ -888,7 +894,7 @@ let
|
||||||
package = "stevearc/conform.nvim";
|
package = "stevearc/conform.nvim";
|
||||||
|
|
||||||
cond = blacklist "vscode";
|
cond = blacklist "vscode";
|
||||||
event = "BufReadPost";
|
event = "VeryLazy";
|
||||||
|
|
||||||
opts.format_on_save.lsp_fallback = true;
|
opts.format_on_save.lsp_fallback = true;
|
||||||
opts.formatters_by_ft = let prettier = [ [ "prettierd" "prettier" ] ]; in
|
opts.formatters_by_ft = let prettier = [ [ "prettierd" "prettier" ] ]; in
|
||||||
|
@ -927,7 +933,7 @@ let
|
||||||
dependencies.lua = [ "neovim/nvim-lspconfig" ];
|
dependencies.lua = [ "neovim/nvim-lspconfig" ];
|
||||||
|
|
||||||
cond = blacklist "vscode";
|
cond = blacklist "vscode";
|
||||||
event = "BufReadPre";
|
event = "VeryLazy";
|
||||||
|
|
||||||
opts = thunk /* lua */ ''
|
opts = thunk /* lua */ ''
|
||||||
local p = require("null-ls")
|
local p = require("null-ls")
|
||||||
|
@ -943,7 +949,7 @@ let
|
||||||
gitsigns = {
|
gitsigns = {
|
||||||
package = "lewis6991/gitsigns.nvim";
|
package = "lewis6991/gitsigns.nvim";
|
||||||
|
|
||||||
cond = blacklist [ "vscode" "firenvim" ];
|
cond = [ (blacklist [ "vscode" "firenvim" ]) notmp ];
|
||||||
event = "BufReadPost";
|
event = "BufReadPost";
|
||||||
|
|
||||||
opts.on_attach = tempest {
|
opts.on_attach = tempest {
|
||||||
|
@ -1061,7 +1067,7 @@ let
|
||||||
dependencies.lua = [ self.lazy.dressing.package ];
|
dependencies.lua = [ self.lazy.dressing.package ];
|
||||||
|
|
||||||
cond = blacklist "vscode";
|
cond = blacklist "vscode";
|
||||||
event = "BufReadPost";
|
event = "VeryLazy";
|
||||||
|
|
||||||
opts.input_buffer_type = "dressing";
|
opts.input_buffer_type = "dressing";
|
||||||
config.autocmds = {
|
config.autocmds = {
|
||||||
|
@ -1297,7 +1303,7 @@ let
|
||||||
dependencies.nix = [ pkgs.wakatime ];
|
dependencies.nix = [ pkgs.wakatime ];
|
||||||
|
|
||||||
cond = blacklist [ "vscode" "firenvim" ];
|
cond = blacklist [ "vscode" "firenvim" ];
|
||||||
event = "BufReadPost";
|
event = "VeryLazy";
|
||||||
};
|
};
|
||||||
# }}}
|
# }}}
|
||||||
# {{{ discord rich presence
|
# {{{ discord rich presence
|
||||||
|
@ -1306,7 +1312,7 @@ let
|
||||||
main = "presence";
|
main = "presence";
|
||||||
|
|
||||||
cond = blacklist [ "vscode" "firenvim" ];
|
cond = blacklist [ "vscode" "firenvim" ];
|
||||||
event = "BufReadPost";
|
event = "VeryLazy";
|
||||||
config = true;
|
config = true;
|
||||||
};
|
};
|
||||||
# }}}
|
# }}}
|
||||||
|
|
Loading…
Reference in a new issue