Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor!: use OO & add tests #100

Merged
merged 44 commits into from
Aug 6, 2023
Merged

refactor!: use OO & add tests #100

merged 44 commits into from
Aug 6, 2023

Conversation

delphinus
Copy link
Member

@delphinus delphinus commented Jun 19, 2023

I did an overhall for all codes and am refactoring them with OO-like format and typing by Lua-language-server. I will add unit & integration tests for robustness.

You can try the new version of frecency with settings below. The old version can use with this.
I have deleted the old logic in a15766e. You can simply switch this branch to use the new logic.


TODO

  • Realize the same behavior with the old version
  • Treat .gitignore in scandir
  • Treat auto_validate
  • Treat disable_devicons
  • Health check
  • There is a bug as below.
    1. Fetch results when with :Telescope frecency
    2. Then do :Telescope frecnecy workspace=CWD, it does not filter the results with workspace.
  • A bug as below.
    1. :Telescope frecency
    2. Input :CWD: to filter out.
    3. Delete :CWD: and it should show the first look again, but it does not.
  • Uas async finder not to block Neovim in searching workspace (Fix Calling plenary.scandir is slow #106)
    • Use vim.fs.dir instead of plenary.scandir.
    • Completely async finder. See async_finder.lua.
  • Make count = 1 when you open a file you've never opened (Fix A file opened at the first time is recorded count = 0 #107)
  • More tests
    • recency
    • finder
      • ignore_patterns
    • frecency
  • Remove duplications between entries from the database and ones from the workspace.

less priority TODO

@delphinus delphinus force-pushed the feature/oo branch 3 times, most recently from 20afb6f to 35df52d Compare July 28, 2023 08:24
@delphinus delphinus force-pushed the feature/oo branch 4 times, most recently from 47c515f to 5474f95 Compare July 29, 2023 02:37
@delphinus delphinus force-pushed the feature/oo branch 6 times, most recently from 73bbf0c to 42c3e70 Compare August 5, 2023 22:58
@delphinus delphinus marked this pull request as ready for review August 6, 2023 06:33
@delphinus delphinus changed the title refactor: use OO & add tests refactor!: use OO & add tests Aug 6, 2023
@delphinus delphinus merged commit 1f32091 into master Aug 6, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A file opened at the first time is recorded count = 0 Calling plenary.scandir is slow
1 participant