File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ a trigger condition is met.
4242You need to define the trigger conditions in which a plugin will be loaded. This
4343is done through the ` lazyLoad.settings ` option.
4444
45+ Load on command:
46+
4547``` nix
4648plugins = {
4749 grug-far = {
@@ -55,6 +57,8 @@ plugins = {
5557};
5658```
5759
60+ Load on file type:
61+
5862``` nix
5963plugins = {
6064 glow = {
@@ -63,6 +67,8 @@ plugins = {
6367 };
6468```
6569
70+ Different load conditions:
71+
6672``` nix
6773plugins.toggleterm = {
6874 enable = true;
@@ -78,6 +84,35 @@ plugins.toggleterm = {
7884};
7985```
8086
87+ Load on keymap with dependency:
88+
89+ ``` nix
90+ plugins.dap-ui = {
91+ enable = true;
92+
93+ lazyLoad.settings = {
94+ # We need to access nvim-dap in the after function.
95+ before.__raw = ''
96+ function()
97+ require('lz.n').trigger_load('nvim-dap')
98+ end
99+ '';
100+ keys = [
101+ {
102+ __unkeyed-1 = "<leader>du";
103+ __unkeyed-2.__raw = ''
104+ function()
105+ require('dap.ext.vscode').load_launchjs(nil, {})
106+ require("dapui").toggle()
107+ end
108+ '';
109+ desc = "Toggle Debugger UI";
110+ }
111+ ];
112+ };
113+ };
114+ ```
115+
81116### Colorschemes
82117
83118Colorschemes do not require explicit settings configuration. In ` lz-n ` , we will
You can’t perform that action at this time.
0 commit comments