Skip to content

Commit 8fdd703

Browse files
committed
change position of picker options documentation
1 parent 01769fb commit 8fdd703

File tree

2 files changed

+51
-50
lines changed

2 files changed

+51
-50
lines changed

README.md

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,9 @@ or
5151

5252
## Setup
5353

54-
> [!IMPORTANT]
55-
> If you have the [zk cli](https://github.com/zk-org/zk) installed, then you _do
56-
> not need to install `zk lsp`_ via Mason (or otherwise). This is because `zk`
57-
> has our lsp bundled with it, which `zk-nvim` hooks into. \
54+
> [!IMPORTANT] If you have the [zk cli](https://github.com/zk-org/zk) installed,
55+
> then you _do not need to install `zk lsp`_ via Mason (or otherwise). This is
56+
> because `zk` has our lsp bundled with it, which `zk-nvim` hooks into. \
5857
> Additionally, `zk-nvim` will setup and start the LSP server for you, so you
5958
> _do not_ need to `require("lspconfig").zk.setup()`.
6059
@@ -97,6 +96,30 @@ require("zk").setup({
9796
Note that the `setup` function will not add any key mappings for you. If you
9897
want to add key mappings, see the [example mappings](#example-mappings).
9998

99+
### Picker Options
100+
101+
You can define default configurations for the pickers opened by `zk-nvim`,
102+
allowing you to apply a specific theme or layout for `zk-nvim`. This works for
103+
all supported pickers, but you'll need to refer to the relevant configuration
104+
options for each picker.
105+
106+
```lua
107+
require("zk").setup({
108+
picker_options = {
109+
telescope = require("telescope.themes").get_ivy(),
110+
111+
-- or if you use snacks picker
112+
113+
snacks_picker = {
114+
layout = {
115+
preset = "ivy",
116+
}
117+
},
118+
},
119+
...
120+
})
121+
```
122+
100123
### Notebook Directory Discovery
101124

102125
When you run a notebook command, this plugin will look for a notebook in the
@@ -573,24 +596,3 @@ require("telescope").load_extension("zk")
573596
:Telescope zk tags
574597
:Telescope zk tags created=today
575598
```
576-
577-
## Picker Configuration
578-
579-
You can define default configurations for the pickers opened by `zk-nvim`, allowing you to apply a specific theme or layout for `zk-nvim`. This works for all supported pickers, but you'll need to refer to the relevant configuration options for each picker.
580-
581-
```lua
582-
require("zk").setup({
583-
picker_options = {
584-
telescope = require("telescope.themes").get_ivy(),
585-
586-
-- or if you use snacks picker
587-
588-
snacks_picker = {
589-
layout = {
590-
preset = "ivy",
591-
}
592-
},
593-
},
594-
...
595-
})
596-
```

doc/zk.txt

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ CONTENTS *zk-content
77
1.1. Requirements............................................|zk-requirements|
88
1.2. Installation............................................|zk-installation|
99
1.3. Setup..........................................................|zk-setup|
10-
1.3.1. Notebook Directory Discovery......|zk-notebook_directory_discovery|
10+
1.3.1. Picker Options............................|zk-picker_configuration|
11+
1.3.2. Notebook Directory Discovery......|zk-notebook_directory_discovery|
1112
1.4. Getting Started......................................|zk-getting_started|
1213
1.5. Built-in Commands..................................|zk-built-in_commands|
1314
1.6. Custom Commands......................................|zk-custom_commands|
@@ -19,7 +20,6 @@ CONTENTS *zk-content
1920
2.1. Syntax Highlighting Tips....................|zk-syntax_highlighting_tips|
2021
2.2. nvim-lsp-installer................................|zk-nvim-lsp-installer|
2122
2.3. Telescope Plugin....................................|zk-telescope_plugin|
22-
2.4. Picker Configuration............................|zk-picker_configuration|
2323

2424
================================================================================
2525
ZK-NVIM *zk-zk-nvim*
@@ -83,6 +83,28 @@ The default configuration
8383
Note that the `setup` function will not add any key mappings for you.
8484
If you want to add key mappings, see the example mappings (#example-mappings).
8585

86+
PICKER OPTIONS *zk-picker_options*
87+
88+
You can define default configurations for the pickers opened by `zk-nvim`, allowing you to apply a specific theme or layout to `zk-nvim`. This works for all supported pickers, but you'll need to refer to the relevant configuration options for each picker.
89+
90+
Example configuration:
91+
>
92+
require("zk").setup({
93+
picker_options = {
94+
telescope = require("telescope.themes").get_ivy(),
95+
96+
-- or if you use snacks picker
97+
98+
snacks_picker = {
99+
layout = {
100+
preset = "ivy",
101+
}
102+
},
103+
},
104+
...
105+
})
106+
<
107+
86108
NOTEBOOK DIRECTORY DISCOVERY *zk-notebook_directory_discovery*
87109

88110
When you run a notebook command, this plugin will look for a notebook in the following places and order:
@@ -496,28 +518,5 @@ It's possible (but unnecessary) to also load the notes and tags pickers as a tel
496518
:Telescope zk tags created=today
497519
<
498520

499-
--------------------------------------------------------------------------------
500-
PICKER CONFIGURATION *zk-picker_configuration*
501-
502-
You can define default configurations for the pickers opened by `zk-nvim`, allowing you to apply a specific theme or layout to `zk-nvim`. This works for all supported pickers, but you'll need to refer to the relevant configuration options for each picker.
503-
504-
Example configuration:
505-
>
506-
require("zk").setup({
507-
picker_options = {
508-
telescope = require("telescope.themes").get_ivy(),
509-
510-
-- or if you use snacks picker
511-
512-
snacks_picker = {
513-
layout = {
514-
preset = "ivy",
515-
}
516-
},
517-
},
518-
...
519-
})
520-
<
521-
522521
==============================================================================
523522
vim:tw=78:ts=8:ft=help:norl:fdm=marker:cole=2:

0 commit comments

Comments
 (0)