Commit Graph

277 Commits (98cd3de5121086ac388eadad4294aec8ea8da582)

Author SHA1 Message Date
olimorris 98cd3de512 fix: #146 allowed_dirs and ignored_dirs 2024-08-09 08:56:18 +01:00
olimorris 970f68938a chore: update bug report 2024-08-09 07:20:42 +01:00
olimorris 7e170b4927 docs: update README.md 2024-08-08 23:14:18 +01:00
Oli 22e17b07fb
refactor!: #145 restore simplicity to the plugin
Announcement in #145
2024-08-08 18:25:16 +01:00
olimorris 0446fd0217 refactor: better git branch checking 2024-08-06 22:05:43 +01:00
olimorris 4df3f8a036 chore: add logging 2024-07-02 19:32:36 +01:00
olimorris 7c30116fc1 docs: update README.md 2024-07-02 19:32:25 +01:00
olimorris a9138468f9 chore: handle null parameters on `ignore_branch` 2024-07-02 19:32:12 +01:00
Anurag 0a9eebf5cc
fix: missing autocmd data when no branch (#137) 2024-06-15 21:50:38 +01:00
Jurek Olden e50e0b65b0
fix: properly start a session from Telescope (#134)
Properly starts sessions loaded from another directory using Telescope.
Crucially, this version compares the working directory of the session, not
the working directory at the time of the session load, to the lists
of allowed and ignored directories.

Co-authored-by: Oli <olimorris@users.noreply.github.com>
2024-06-03 07:29:47 -07:00
Zheng PiaoDan 2b4f192aca
fix: follow_cwd option (#132)
* fix: TestFollowCwd

* fix: follow_cwd not actually working

cause: `follow_cwd and nil or session` always use `session` because the
`true and nil` expression is evaluated to false
2024-05-31 09:47:52 +01:00
olimorris b77d244a77 chore(ci): test for Neovim v0.10.0 2024-05-17 10:56:10 +01:00
Rémi Labeyrie 1e9fd63e25
fix: remove unused last_modified property (#126) 2024-05-07 19:31:21 +01:00
Oli 9c5fc98a4c
fix: #120 session loading for branches with slashes 2024-05-03 10:09:50 +01:00
PostCyberPunk 96bf597778
fix: use stat to last modified date (#121) 2024-04-26 09:23:21 +01:00
Rémi Labeyrie 8fc97b6182
feat: add icons and colors to telescope picker (#119)
* feat: add icons and colors to telescope picker

* feat: add configuration options for telescope icons

* fix: remove highlight group for telescope normal selection
2024-04-22 21:36:41 +01:00
Matthias Bilger ca9900c31e
fix: error message outside of git repo (#116)
in case ignored branches have been set and the current dir is not a
git directory no more error messages will be thrown
2024-04-04 13:42:31 +01:00
olimorris c157b89b5c docs: update README.md 2024-03-13 19:03:29 +00:00
olimorris 3cce654221 chore: update CI 2024-03-13 19:03:22 +00:00
olimorris c76c789d90 docs: update README.md 2024-03-12 21:46:21 +00:00
olimorris a192a0a11a chore(formatting): updates 2024-03-12 21:46:14 +00:00
Matthias Bilger ce9d621683
feat: Add ability to ignore branches (#114) 2024-03-12 21:44:36 +00:00
jyuan0 18fda8136f
feat: configurable telescope mappings (#113) 2024-03-06 14:16:41 +00:00
anhoder b4e09a639a
fix: force save (#112) 2024-02-29 09:04:48 +00:00
olimorris 1de6b48a99 docs: update README.md 2024-02-24 12:06:40 +00:00
olimorris 86a55a1d4c docs: update README.md 2024-02-24 12:05:57 +00:00
Mike Iversen edd8aa41cd
chore: use vim.notify (#108)
* Updated warnings and info to print with vim.notify

* Updated formatting
2024-01-06 09:40:32 +00:00
olimorris 284d714b8d fix: #107 corrected remove warning message 2024-01-05 22:56:04 +00:00
olimorris 9545fc0b85 fix: #107 remove warning message 2024-01-05 22:53:47 +00:00
maround95 4e255cd85c
fix: workaround for exit code 134 (#106) 2024-01-05 08:14:07 +00:00
Christopher Speck 97bc6260fb
fix: properly resolve directories (#105)
* fix: properly resolve directories

The `vim.loop.fs_realpath()` function can be used to properly resolve
both the `.` shortcut as well as relative paths. This corrects scenarios
when opening nvim to a subdirectory of the working directory. With this
change doing so will properly resolve the session file to the directory
that was specified on the command line.

```console
$ pwd
/Users/username/.config

$ ls
fish    iterm2    nvim

$ nvim nvim
```

This will result in using the path `/Users/username/.config/nvim` for
the session. The behavior will be the same as running plain `nvim` from
within the `/Users/username/.config/nvim` directory itself.

This change also quotes the path passed to `git` to properly handle
paths containing spaces.

This change also corrects some typos in the readme.

* fix: isdirectory is not necessary

The fs_realpath function will return nil if the path doesn't exist.

* fix: typos in comments

* fix: isdirectory is still necessary

Oops, the isdirectory check is necessary to confirm it's a directory and
not a file.
2023-12-22 15:53:31 +00:00
olimorris d7d8fcbbb4 docs: update telescope image 2023-12-21 17:03:00 +00:00
olimorris dfb79ffa75 feat: make more data available when firing events 2023-12-21 16:52:30 +00:00
olimorris 4310da8da0 docs: update README.md 2023-12-21 13:45:11 +00:00
olimorris 15096138b0 chore: update comment block 2023-12-21 13:45:03 +00:00
olimorris 548b43aec4 refactor: function names and comment blocks 2023-12-21 13:26:48 +00:00
Christopher Speck 7944b9afe3
refactor: update logic for autoload or starting sessions (#104)
* Update logic for autoload or starting sessions.

The logic to prevent autoloading/starting sessions when any arguments
are supplied to neovim is to prevent session management from kicking in
when editing a single file.

This updates the logic to allow a single argument passed to neovim as
long as the argument is an existing directory. When neovim is launched
in this way it behaves the same as opening neovim with no arguments but
has changed the working directory.

This results in consistent behavior of the autoloading/starting of
sessions when passing a directory argument to start neovim.

See: https://github.com/olimorris/persisted.nvim/discussions/93

* Fix comment, make comparisons more direct

* Update functions to be directory-aware

The main functionality in `init.lua` assumes using current working
directory in most cases. This refactors these functions to allow passing
in a directory instead.

The default behavior is to now use the current directory unless neovim
was started with a single directory argument, using that instead.

This also special-cases `.` as `vim.fn.expand()` does not resolve that
to the current working directory.
2023-12-21 11:15:05 +00:00
olimorris 66d540f949 refactor!: do not append `main` to non-git repo sessions
https://github.com/olimorris/persisted.nvim/discussions/103
2023-12-20 12:47:51 +00:00
olimorris ff261c2d22 feat: add copy session to Telescope actions 2023-12-20 12:45:11 +00:00
olimorris 3e0c504ba2 docs: update README.md 2023-12-18 23:49:27 +00:00
olimorris ab7040d8c0 chore: formatting 2023-12-18 23:49:07 +00:00
olimorris a1cc308580 feat: telescope add/update branch name 2023-12-18 23:46:57 +00:00
olimorris bcdada28d2 fix: prevent double running of git command
Should improve loading times significantly
2023-12-18 23:22:10 +00:00
olimorris 86ce6f14ae refactor!: telescope reset_prompt api 2023-12-18 23:21:04 +00:00
Mike Iversen fc9f398393
feat: Added exact ignored_dirs support (#100) 2023-11-26 10:38:57 +00:00
olimorris d821524f94 docs: add `CONTRIBUTING.MD` 2023-11-18 19:44:49 +00:00
olimorris 3ebc5d77ae refactor: `override` to `force` for SessionSave 2023-11-18 16:07:38 +00:00
olimorris 2b3ec15ebd docs: remove duplication 2023-11-18 15:41:11 +00:00
olimorris 0ea44f1586 feat: add global var for if session exists in cwd 2023-11-18 15:38:16 +00:00
olimorris d90f9adb04 fix: #96 improve startup time
For those who do not use the git branching feature, this may improve their Neovim startup time significantly
2023-11-16 09:50:09 +00:00