Skip to content

Commit 0a91bb8

Browse files
committed
fix(docs): Improved README.md, added telescope instructions (READ DESCRIPTION).
CREDITS: ahmedkhalf/project.nvim#160 Signed-off-by: Guennadi Maximov C <[email protected]>
1 parent 7847e75 commit 0a91bb8

File tree

1 file changed

+52
-56
lines changed

1 file changed

+52
-56
lines changed

README.md

Lines changed: 52 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -30,31 +30,28 @@ I will be maintaining this plugin for the foreseeable future.
3030

3131
1. [Features](#features)
3232
2. [Roadmap](#roadmap)
33-
3. [Installation](#installation)
34-
1. [Requirements](#requirements)
35-
2. [`vim-plug`](#vim-plug)
36-
3. [`lazy.nvim`](#lazy-nvim)
37-
4. [`pckr.nvim`](#pckr-nvim)
38-
4. [Configuration](#configuration)
33+
3. [Requirements](#requirements)
34+
4. [Installation](#installation)
35+
5. [Configuration](#configuration)
3936
1. [Pattern Matching](#pattern-matching)
40-
2. [`nvim-tree.lua` Integration](#nvim-tree-integration)
41-
3. [`telescope.nvim` Integration](#telescope-integration)
37+
2. [Nvim Tree Integration](#nvim-tree-integration)
38+
3. [Telescope Integration](#telescope-integration)
4239
1. [Telescope Projects Picker](#telescope-projects-picker)
4340
2. [Telescope Mappings](#telescope-mappings)
44-
5. [Manual Mode](#manual-mode)
41+
6. [Manual Mode](#manual-mode)
4542
1. [`:AddProject`](#addproject)
4643
2. [`:ProjectRoot`](#projectroot)
47-
6. [API](#api)
44+
7. [API](#api)
4845
1. [`project_nvim.utils.util`](#util)
4946
2. [`get_project_root()`](#get-project-root)
5047
3. [`get_recent_projects()`](#get-recent-projects)
5148
4. [`get_config()`](#get-config)
5249
5. [`get_history_paths()`](#get-history-paths)
53-
7. [Troubleshooting](#troubleshooting)
50+
8. [Troubleshooting](#troubleshooting)
5451
1. [History File Not Created](#history-file-not-created)
55-
8. [Contributing](#contributing)
56-
9. [Credits](#credits)
57-
10. [Addendum](#addendum)
52+
9. [Contributing](#contributing)
53+
10. [Credits](#credits)
54+
11. [Addendum](#addendum)
5855

5956
---
6057

@@ -97,13 +94,11 @@ I will be maintaining this plugin for the foreseeable future.
9794

9895
---
9996

100-
## Installation
101-
102-
### Requirements
97+
## Requirements
10398

10499
- Neovim >= 0.11.0
105-
- [`telescope.nvim`](https://github.com/nvim-telescope/telescope.nvim) **(optional)**
106-
- [`nvim-tree.lua`](https://github.com/nvim-tree/nvim-tree.lua) **(optional)**
100+
- [`telescope.nvim`](https://github.com/nvim-telescope/telescope.nvim) **(OPTIONAL, RECOMMENDED)**
101+
- [`nvim-tree.lua`](https://github.com/nvim-tree/nvim-tree.lua) **(OPTIONAL)**
107102

108103
---
109104

@@ -115,13 +110,12 @@ The cwd might not update otherwise.
115110

116111
</div>
117112

118-
---
119-
120-
<h3 id="vim-plug">
113+
## Installation
121114

122-
[vim-plug](https://github.com/junegunn/vim-plug)
115+
---
123116

124-
</h3>
117+
<details>
118+
<summary><a href="https://github.com/junegunn/vim-plug">vim-plug</a></summary>
125119

126120
```vim
127121
if has('nvim-0.11')
@@ -140,25 +134,19 @@ if has('nvim-0.11')
140134
endif
141135
```
142136

143-
<div align="right">
144-
145-
[Go To Top](#project-nvim)
146-
147-
</div>
137+
</details>
148138

149-
<h3 id="lazy-nvim">
150-
151-
[lazy.nvim](https://github.com/folke/lazy.nvim)
152-
153-
</h3>
139+
<details>
140+
<summary><a href="https://github.com/folke/lazy.nvim">lazy.nvim</a></summary>
154141

155142
```lua
156143
require('lazy').setup({
157144
spec = {
158145
-- Other plugins
159146
{
160147
'DrKJeff16/project.nvim',
161-
lazy = false, -- WARN: IMPORTANT NOT TO LAZY-LOAD THIS PLUGIN
148+
-- WARN: IMPORTANT NOT TO LAZY-LOAD THIS PLUGIN
149+
lazy = false,
162150
dependencies = {
163151
'nvim-lua/plenary.nvim',
164152
'nvim-telescope/telescope.nvim',
@@ -176,17 +164,10 @@ require('lazy').setup({
176164
})
177165
```
178166

179-
<div align="right">
167+
</details>
180168

181-
[Go To Top](#project-nvim)
182-
183-
</div>
184-
185-
<h3 id="pckr-nvim">
186-
187-
[pckr.nvim](https://github.com/lewis6991/pckr.nvim)
188-
189-
</h3>
169+
<details>
170+
<summary><a href="https://github.com/lewis6991/pckr.nvim">pckr.nvim</a></summary>
190171

191172
```lua
192173
if vim.fn.has('nvim-0.11') == 1 then
@@ -209,6 +190,8 @@ if vim.fn.has('nvim-0.11') == 1 then
209190
end
210191
```
211192

193+
</details>
194+
212195
<div align="right">
213196

214197
[Go To Top](#project-nvim)
@@ -357,13 +340,9 @@ as `vim-rooter`, but for your convenience here come some examples:
357340

358341
</div>
359342

360-
<h3 id="nvim-tree-integration">
361-
362-
[`nvim-tree.lua`](https://github.com/nvim-tree/nvim-tree.lua) Integration
363-
364-
</h3>
343+
### Nvim Tree Integration
365344

366-
<ins>Make sure these flags are enabled to support [`nvim-tree.lua`](https://github.com/nvim-tree/nvim-tree.lua):</ins>
345+
> Make sure these flags are enabled to support [`nvim-tree.lua`](https://github.com/nvim-tree/nvim-tree.lua):
367346
368347
```lua
369348
require('nvim-tree').setup({
@@ -382,11 +361,7 @@ require('nvim-tree').setup({
382361

383362
</div>
384363

385-
<h3 id="telescope-integration">
386-
387-
[`telescope.nvim`](https://github.com/nvim-telescope/telescope.nvim) Integration
388-
389-
</h3>
364+
### Telescope Integration
390365

391366
To enable [`telescope.nvim`](https://github.com/nvim-telescope/telescope.nvim) integration use the following
392367
code in your config:
@@ -397,6 +372,27 @@ require('telescope').setup(...)
397372
require('telescope').load_extension('projects')
398373
```
399374

375+
Also you can configure the picker when calling `require('telescope').setup()`
376+
(CREDITS: @ldfwbebp https://github.com/ahmedkhalf/project.nvim/pull/160):
377+
378+
```lua
379+
require('telescope').setup({
380+
-- ...
381+
extensions = {
382+
projects = {
383+
layout_strategy = "horizontal",
384+
layout_config = {
385+
anchor = "N",
386+
height = 0.25,
387+
width = 0.6,
388+
prompt_position = "bottom",
389+
},
390+
prompt_prefix = "󱎸 ",
391+
}
392+
}
393+
})
394+
```
395+
400396
After that you can now call it from the command line:
401397

402398
```vim

0 commit comments

Comments
 (0)