olimorris
0a6be5db0e
refactor: remove deprecations
2023-03-09 09:41:22 +00:00
olimorris
88f27dcab2
fix: PersistedSavePre called when autosave = false
2023-02-28 23:21:54 +00:00
olimorris
bcd99ed00c
chore: rename functions
2023-02-28 22:28:44 +00:00
Demaro Stanberry
433e6d6808
fix: improve displayed session names
...
* fix: sanitize string before passing to `string.gsub(...)`
fix: improve displayed paths on windows os
* chore: improve scripting for review
2023-02-28 20:55:55 +00:00
olimorris
e3647c1087
refactor: clean up session loading
2023-02-28 18:54:33 +00:00
Oli
03f11b519f
fix: autosaving ( #56 )
...
* fix: autosaving
* chore: newline
* feat: allow autosave override
2023-02-28 17:28:45 +00:00
Rafael Bodill
7890dadd6e
feat: allow options to be set in `telescope` setup ( #55 )
...
* feat: Allow options to be set in Telescope setup
* docs: update readme.md for telescope config
2023-02-28 16:16:37 +00:00
olimorris
4c960a99d7
feat: add data to state change and delete events
2023-02-25 10:39:41 +00:00
olimorris
4866194140
feat: add additional events
2023-02-23 20:44:47 +00:00
olimorris
383b5ba6b5
feat: delete a session in a schedule.wrap func
2023-02-23 20:44:26 +00:00
olimorris
029ba65f39
fix: config.setup deprecation checks
2023-02-23 10:41:21 +00:00
olimorris
a0196d5c51
fix: make session data available via callback
2023-02-23 10:11:29 +00:00
olimorris
e594ede825
fix: schedule loading session from telescope
2023-02-23 10:04:11 +00:00
olimorris
fc3df75cd5
refactor!: #51 replace callbacks with user events
2023-02-22 20:24:27 +00:00
olimorris
65c5c07bf9
chore: remove redundant param
2023-02-22 18:11:01 +00:00
Oli
774e4d70e9
fix : #46 autoload sessions
2023-02-22 15:02:33 +00:00
Oli
dfbd039fe1
feat: load session by path ( #48 ) ( #47 )
...
* feat: load session by path
* chore: change order of commands
* tests: fix
* docs: tweak readme wording
2023-02-21 21:09:01 +00:00
olimorris
675744d835
chore: fixup error message
2023-02-21 16:40:54 +00:00
olimorris
898ddcdd46
chore: remove annotations
2023-02-21 16:03:52 +00:00
olimorris
f99ad40198
refactor: move commands to vim file
2023-02-21 16:01:27 +00:00
olimorris
452c36a3f9
chore: clean up config file
2023-02-21 16:01:15 +00:00
olimorris
43805b40a6
refactor: autocmds
2023-02-21 15:47:56 +00:00
olimorris
769c130831
chore: cleanup utils file
2022-11-16 13:43:29 +00:00
ADoyle
53a39a0447
feat: add config option "telescope.reset_prompt_after_deletion"
...
User can decide whether to reset the prompt or not, after deleting a session
2022-11-03 14:14:36 +00:00
olimorris
e39170f571
refactor!: change default branch separator
2022-11-02 17:38:41 +00:00
Cedric M'Passi
2e61c9fb92
fix: check for nil opts in setup
2022-10-27 08:18:14 +01:00
olimorris
5347c83ee4
refactor!: warn of future branch_separator change
2022-10-26 17:41:44 +01:00
olimorris
cf3b9a45fe
chore: formatting
2022-10-26 17:39:28 +01:00
olimorris
2105556a1a
chore: rename autocmd group
2022-10-26 17:24:18 +01:00
olimorris
df231232c7
fix : #38 reinstate on_autoload_no_session
2022-10-26 17:14:40 +01:00
olimorris
5c5c4ae949
fix: autocmd namings
2022-10-26 13:55:16 +01:00
olimorris
226db9219f
fix: clear diagnostics
2022-10-26 13:49:43 +01:00
olimorris
26d82d6876
refactor: use neovim autocmd api
2022-10-26 13:41:13 +01:00
ADoyle
80c898a6c9
fix : #34 support width = { val, min, max } and show branch
...
- Use telescope builtin resolver to calculate width.
- The branch is missing. Fixed.
- If session file stores without git branch, `session.branch` should be nil. And do not show branch in list.
- `make test` will fail because plenary.nvim is old.
close #34
2022-10-25 13:44:54 +01:00
Connor Robertson
38b36fc5fd
feat: ✨ allow session name to be fixed on load
...
* Add follow_cwd option to allow fixing session name on load
* Update readme to reflect new follow_cwd command and explain use
* Add tests for follow_cwd
* Update README.md
* Adjust wording in README for follow_cwd to clarify use case
Co-authored-by: Oli M <olimorris@users.noreply.github.com>
2022-10-14 10:08:12 +01:00
olimorris
df435cee43
feat: ✨ #31 should_autosave callback
2022-10-07 12:46:58 +01:00
Latif Sulistyo
b54b72dbde
feat: add `silent` config option
2022-09-13 08:28:36 +01:00
Mat Jones
321ba42367
feat: #27 add `on_autoload_no_session` hook
...
* Add `on_autoload_no_session` hook
* Update README.md
2022-08-23 22:02:30 +01:00
HumblePresent
e994852d86
feat: add configurable git branch separator string ( #25 )
2022-08-22 21:36:22 +01:00
olimorris
2379b3dfe8
test: fix branch test
2022-08-22 21:33:16 +01:00
olimorris
dafb7a9e43
chore: misc updates
2022-08-16 08:25:11 +01:00
HumblePresent
7d2a0ac661
fix : #18 escape pattern matching characters in directory names
2022-08-16 08:22:44 +01:00
HumblePresent
17ee9ed4e0
fix : #21 accurately detect git-enabled parent directories
2022-08-15 07:58:37 +01:00
HumblePresent
6ce6823643
fix : #18 Replace directory pattern match with exact match
...
* fix : #18 replace directory pattern match with exact match
* fix : #18 properly expand directory name
2022-08-13 10:58:03 +01:00
olimorris
b70eb5317d
feat: add before_source callback
2022-08-13 10:53:59 +01:00
olimorris
9be6183f96
fix: after_source callback
2022-08-13 10:38:02 +01:00
olimorris
7d3f977ae5
feat: #7 remove .vim extension in telescope
2022-07-13 09:27:46 +01:00
olimorris
2b7ab49f36
refactor: telescope extension
2022-07-13 09:27:14 +01:00
olimorris
459adba9dd
feat: improve deleting sessions via telescope
2022-07-07 23:08:04 +01:00
olimorris
0ad729ee38
fix : #15 callbacks being incorrectly detected
2022-06-30 19:53:28 +01:00
olimorris
8e1da8a3d6
refactor: #7 remove branch in telescope results
...
For users who not use git branching (majority) this is redundant. For users who have lots of '_' in their file path, this becomes messy. Cleaner to just remove it as the user can determine the branch from the filename anyway
2022-06-30 17:49:01 +01:00
olimorris
6c21af37d0
chore: formattig
2022-06-25 22:54:44 +01:00
olimorris
a51112c539
refactor: telescope use vim event loop to load
2022-06-25 22:48:45 +01:00
olimorris
4e5b8b4a10
refactor: move load session to utils
2022-06-25 22:48:09 +01:00
olimorris
0c3c133a7f
fix : #14 index a nil value while calling Telescope persisted
2022-06-25 14:45:35 +01:00
olimorris
3a5f182086
refactor: improved git branching
2022-06-25 14:07:00 +01:00
olimorris
d093a835ef
fix : #13 get last session saved
2022-06-25 13:06:51 +01:00
olimorris
bf27016643
fix : #12 shift autoloading to the nvim event loop
...
A big shoutout to @simonmclean for this pull request. Previously we autoloaded a session file as soon as Neovim opened. The problem with this is that key plugins like LSP and Treesitter may not have been initialised. This would lead to syntax highlighting issues or LSPs not attaching to buffers in the session. Pushing this to Neovim's event loop via vim.schedule allows us to sensibly load the session after these key plugins. Fixing the tests was a little cumbersome as we needed to use plenary's async library but once figured out, we have some lovely robust async tests
2022-06-07 12:55:20 -07:00
olimorris
66f4405794
fix: vim.schedule causing issues with autoloading
2022-06-07 09:43:51 -07:00
Simon McLean
473c90bbb6
Wrap auto load in vim.schedule
...
I'm experiencing a bug whereby if I enable autoloading, I don't get any syntax highlighting on startup (until I trigger it with `:e` for example). I had the same issue with `persistence.nvim` (I made an auto command to get the same functionality). For both plugins, wrapping the call to `load` in `vim.schedule` solved the problem.
I don't really know enough about the inner workings of Neovim to explain this though.
2022-06-06 17:38:23 +01:00
olimorris
040cf43524
feat(telescope): #7 delete session files
2022-05-13 10:48:13 +01:00
olimorris
db46d40d45
fix(telescope): #7 telescope layout with functions
...
Props to @ranebrown for the solution. This error occured when a user has specified a function for the width value in their telescope layout_config
2022-05-13 09:39:28 +01:00
olimorris
0c392ddb9f
feat(telescope): #7 start adding delete feature
2022-05-12 20:18:08 +01:00
olimorris
b778a4ebc4
feat: #11 after_source callback
2022-05-05 11:41:57 +01:00
olimorris
13dacbc880
fix : #11 lsp and autoload issue
2022-05-04 16:33:26 +01:00
olimorris
32610c4de6
fix : #11 lsp not working with autoload
2022-05-03 21:51:16 +01:00
olimorris
d4c0ba339f
fix: telescope extension not loading after close
2022-04-24 22:41:40 +01:00
olimorris
5b3525ad5e
refactor: #7 improve telescope support
2022-04-24 12:58:11 +01:00
olimorris
baa9c73818
chore: update README.md
2022-04-22 14:14:16 +01:00
olimorris
2345ac0682
refactor: change config option dir to save_dir
2022-04-22 12:45:30 +01:00
olimorris
5ad5f88e4b
feat: custom autocmd for saving a session
2022-04-22 12:37:27 +01:00
olimorris
637e1a5d8f
fix : #7 do not stop persisted after load
2022-04-20 09:25:58 +01:00
olimorris
48ecaa7c6e
feat: #5 improve auto save/load pattern match
2022-04-20 09:19:56 +01:00
olimorris
a156dd33c3
feat: #7 initial Telescope support
2022-04-19 22:21:06 +01:00
olimorris
ba5f0ab091
fix : #8 autoload when neovim opened with arguments
2022-04-19 13:29:07 +01:00
olimorris
23151e4db6
fix : #6 error getting correct git branch
2022-04-05 22:48:02 +01:00
olimorris
6cefecd2bb
fix : #4 use vim.o.sessionoptions
2022-04-04 22:59:36 +01:00
olimorris
0669d29f22
feat: ✨ allow/ignore dirs for save/load
...
This addresses #1 and allows the user to specify directories which the plugin will automatically save or load from. Alternatively, specify directories for which this behaviour will be ignored
2022-03-07 18:58:37 +00:00
olimorris
b2e4162c74
feat: ✨ auto-load sessions addresses #3
2022-03-07 17:22:39 +00:00
olimorris
00fe043e8d
feat: add command to save session
2022-03-07 13:06:58 +00:00
olimorris
0f642be4fa
feat: add commands
2022-03-05 15:22:26 +00:00
olimorris
ac24493128
feat: add before and after callbacks
2022-03-05 15:22:13 +00:00
olimorris
831caa7261
feat: delete current session
...
Mirroring the great pull request on persistence.nvim by @edementyev
2022-03-03 21:16:19 +00:00
olimorris
336909e742
chore: formatting with stylua
2022-03-03 21:15:37 +00:00
olimorris
8c3bc1791d
feat: add toggle function
2022-01-21 16:38:00 +00:00
olimorris
cbb601eaec
chore: format code
2022-01-21 11:09:49 +00:00
olimorris
e513dcd16c
feat: ✨ add option to disable autosave
...
As per: https://github.com/folke/persistence.nvim/pull/4
Think is a useful feature to have as users may wish to manually trigger the saving of sessions
2022-01-20 15:24:31 +00:00
olimorris
d9b386c618
feat!: ✨ use stdpath data instead of config
...
As per discussion on https://github.com/folke/persistence.nvim/pull/3 .
Using stdpath('data') instead of stdpath('config') is more appropriate.
2022-01-20 15:24:31 +00:00
olimorris
9fd0958a19
chore: rename to persisted
2022-01-20 14:23:51 +00:00
olimorris
05247100ba
fix: 🤦♂️ add back git branching
2021-12-24 18:52:15 +00:00
olimorris
0cd9bf7d67
chore: make code more terse
2021-11-16 20:03:20 +00:00
olimorris
ff30e8b4cc
fix: vim.fn.has('win32') returns 0 or 1, not a boolean
2021-10-24 19:55:22 +01:00
Oli M
082a52e999
Merge branch 'main' into main
2021-10-22 14:14:04 +01:00
3rdey3
83af96b1f2
fix: properly escape session file names on Windows ( #7 )
2021-10-22 13:25:52 +02:00
olimorris
76a994c185
Fix: use_git_branch in a non git repo caused error
...
Using `use_git_branch` in a non git enabled repo caused an error. This has been addressed by checking for the presence of a `.git` folder in the cwd. If no branch has been specified then we default to HEAD via the addition of `2>/dev/null` in our shell command
2021-09-08 17:01:06 +01:00
olimorris
2d6a222073
Add additional 'using_persistence' global vars
...
In further testing, it became clear that adding the global variables to the setup and start functions would be useful.
It also seemed to make sense to return boolean values to detect if Persistence has stopped (false) or is in active use (true).
2021-09-07 22:31:12 +01:00
olimorris
f4e7632db2
Correct typos
2021-09-07 19:57:22 +01:00
olimorris
e70b5e2fc8
Add ability to determine if persistence.nvim is running
...
In my statusline, I like to know if persistence.nvim is active. I have a simple helper function:
function using_session()
return (vim.g.using_persistance ~= nil)
end
which I reference and display a corresponding glyph
2021-09-07 19:38:33 +01:00
olimorris
3d84264be5
Add ability to session based on cwd and git branch
...
This creates session files like:
%Users%Oli%Code%Projects%persistance_feature%add-git-branch-to-session
enabling you to segment your project directory by git branch
2021-09-07 19:37:26 +01:00
Folke Lemaitre
a39f3f10c8
feat: added config options
2021-07-12 10:47:09 +02:00
Folke Lemaitre
38203a17a9
fix: renamed session to persistence in autocmds
2021-07-03 23:53:52 +02:00
Folke Lemaitre
8b32094309
feat: inital version
2021-07-02 08:55:37 +02:00