You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-20
Original file line number
Diff line number
Diff line change
@@ -363,23 +363,6 @@ Another possibility is to only save the session if there are at least two window
363
363
364
364
```
365
365
366
-
## Disabling the plugin
367
-
368
-
You might run into issues with Firenvim or another plugin and want to disable `auto_session` altogether based on some condition.
369
-
For this example, as to not try and save sessions for Firenvim, we disable the plugin if the `started_by_firenvim` variable is set.
370
-
371
-
```viml
372
-
if exists('g:started_by_firenvim')
373
-
let g:auto_session_enabled = v:false
374
-
endif
375
-
```
376
-
377
-
One can also disable the plugin by setting the `auto_session_enabled` option to false at startup.
378
-
379
-
```sh
380
-
nvim "+let g:auto_session_enabled = v:false"
381
-
```
382
-
383
366
## 🔭 Session Lens
384
367
385
368
You can use Telescope to see, load, and delete your sessions. It's enabled by default if you have Telescope, but here's the Lazy config that shows the configuration options:
@@ -427,11 +410,11 @@ NOTE: If you previously installed `rmagatti/session-lens`, you should remove it
One can show the current session name in the statusline by using an AutoSession helper function.
415
+
You can show the current session name in the statusline by using the function `current_session_name()`. With no arguments, it will return the full session name. For automatically created sessions that will be the path where the session was saved. If you only want the last directory in the path, you can call `current_session_name(true)`.
433
416
434
-
Lualine example config and how it looks
417
+
Here's an example using [Lualine](https://github.com/nvim-lualine/lualine.nvim):
435
418
436
419
```lua
437
420
require('lualine').setup{
@@ -450,6 +433,23 @@ require('lualine').setup{
450
433
451
434
<imgwidth="1904"alt="Screen Shot 2021-10-30 at 3 58 57 PM"src="https://user-images.githubusercontent.com/2881382/139559478-8edefdb8-8254-42e7-a0f3-babd3dfd6ff2.png">
452
435
436
+
## Disabling the plugin
437
+
438
+
You might run into issues with Firenvim or another plugin and want to disable `auto_session` altogether based on some condition.
439
+
For this example, as to not try and save sessions for Firenvim, we disable the plugin if the `started_by_firenvim` variable is set.
440
+
441
+
```viml
442
+
if exists('g:started_by_firenvim')
443
+
let g:auto_session_enabled = v:false
444
+
endif
445
+
```
446
+
447
+
One can also disable the plugin by setting the `auto_session_enabled` option to false at startup.
448
+
449
+
```sh
450
+
nvim "+let g:auto_session_enabled = v:false"
451
+
```
452
+
453
453
## 🚧 Troubleshooting
454
454
455
455
For troubleshooting refer to the [wiki page](https://github.com/rmagatti/auto-session/wiki/Troubleshooting).
0 commit comments