@@ -30,31 +30,28 @@ I will be maintaining this plugin for the foreseeable future.
30
30
31
31
1 . [ Features] ( #features )
32
32
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 )
39
36
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 )
42
39
1 . [ Telescope Projects Picker] ( #telescope-projects-picker )
43
40
2 . [ Telescope Mappings] ( #telescope-mappings )
44
- 5 . [ Manual Mode] ( #manual-mode )
41
+ 6 . [ Manual Mode] ( #manual-mode )
45
42
1 . [ ` :AddProject ` ] ( #addproject )
46
43
2 . [ ` :ProjectRoot ` ] ( #projectroot )
47
- 6 . [ API] ( #api )
44
+ 7 . [ API] ( #api )
48
45
1 . [ ` project_nvim.utils.util ` ] ( #util )
49
46
2 . [ ` get_project_root() ` ] ( #get-project-root )
50
47
3 . [ ` get_recent_projects() ` ] ( #get-recent-projects )
51
48
4 . [ ` get_config() ` ] ( #get-config )
52
49
5 . [ ` get_history_paths() ` ] ( #get-history-paths )
53
- 7 . [ Troubleshooting] ( #troubleshooting )
50
+ 8 . [ Troubleshooting] ( #troubleshooting )
54
51
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 )
58
55
59
56
---
60
57
@@ -97,13 +94,11 @@ I will be maintaining this plugin for the foreseeable future.
97
94
98
95
---
99
96
100
- ## Installation
101
-
102
- ### Requirements
97
+ ## Requirements
103
98
104
99
- 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 )**
107
102
108
103
---
109
104
@@ -115,13 +110,12 @@ The cwd might not update otherwise.
115
110
116
111
</div >
117
112
118
- ---
119
-
120
- <h3 id =" vim-plug " >
113
+ ## Installation
121
114
122
- [ vim-plug ] ( https://github.com/junegunn/vim-plug )
115
+ ---
123
116
124
- </h3 >
117
+ <details >
118
+ <summary ><a href =" https://github.com/junegunn/vim-plug " >vim-plug</a ></summary >
125
119
126
120
``` vim
127
121
if has('nvim-0.11')
@@ -140,25 +134,19 @@ if has('nvim-0.11')
140
134
endif
141
135
```
142
136
143
- <div align =" right " >
144
-
145
- [ Go To Top] ( #project-nvim )
146
-
147
- </div >
137
+ </details >
148
138
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 >
154
141
155
142
``` lua
156
143
require (' lazy' ).setup ({
157
144
spec = {
158
145
-- Other plugins
159
146
{
160
147
' 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 ,
162
150
dependencies = {
163
151
' nvim-lua/plenary.nvim' ,
164
152
' nvim-telescope/telescope.nvim' ,
@@ -176,17 +164,10 @@ require('lazy').setup({
176
164
})
177
165
```
178
166
179
- <div align = " right " >
167
+ </ details >
180
168
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 >
190
171
191
172
``` lua
192
173
if vim .fn .has (' nvim-0.11' ) == 1 then
@@ -209,6 +190,8 @@ if vim.fn.has('nvim-0.11') == 1 then
209
190
end
210
191
```
211
192
193
+ </details >
194
+
212
195
<div align =" right " >
213
196
214
197
[ Go To Top] ( #project-nvim )
@@ -357,13 +340,9 @@ as `vim-rooter`, but for your convenience here come some examples:
357
340
358
341
</div >
359
342
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
365
344
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 ) :
367
346
368
347
``` lua
369
348
require (' nvim-tree' ).setup ({
@@ -382,11 +361,7 @@ require('nvim-tree').setup({
382
361
383
362
</div >
384
363
385
- <h3 id =" telescope-integration " >
386
-
387
- [ ` telescope.nvim ` ] ( https://github.com/nvim-telescope/telescope.nvim ) Integration
388
-
389
- </h3 >
364
+ ### Telescope Integration
390
365
391
366
To enable [ ` telescope.nvim ` ] ( https://github.com/nvim-telescope/telescope.nvim ) integration use the following
392
367
code in your config:
@@ -397,6 +372,27 @@ require('telescope').setup(...)
397
372
require (' telescope' ).load_extension (' projects' )
398
373
```
399
374
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
+
400
396
After that you can now call it from the command line:
401
397
402
398
``` vim
0 commit comments