Commit Graph

15 Commits

Author SHA1 Message Date
JINNOUCHI Yasushi
dbca328c59
docs: add note for bootstrap (#261)
* docs: remove unnecessary `main` from code example

* docs: add note for `bootstrap`
2024-09-05 23:36:35 +09:00
JINNOUCHI Yasushi
58c0089414
fix!: register realpath for consistency (#240)
Now it uses realpath for registering and validating DB. This means, if you have entries that has filenames differing only for case, it can deal with them as they exist.

Before this, it has miscalculated scores for such cases. For example, in case you have `/path/to/foo.lua` and `/path/to/Foo.lua`, it registers entries for each file. Now it detects accurate filename for the specified one, and removes it in validation.

* test: separate logic for utils

* fix!: register realpath for consistency

* refactor: convert fs module from class

* refactor: move db initialization phase to start()

* fix: run database:start() truly asynchronously

* fix: call each functions with async wrapping

* refactor: add types for args in command

* fix: run register() synchronously

Because vim.api.nvim_* cannot be used in asynchronous functions.

* docs: add note for calling setup() twice

* fix: run non-fast logic on next tick
2024-08-15 17:40:03 +09:00
JINNOUCHI Yasushi
25d01edae8
docs: add note for disabling the dialog (#235)
See https://www.reddit.com/r/neovim/comments/1egczrs/how_to_sort_files_in_telescope_by_showing_the/
2024-08-02 18:20:41 +09:00
JINNOUCHI Yasushi
87ccbae5d2
feat: call init process before telescope loading (#234)
* feat: call init process before telescope loading

Fix #231

This changes enable to load frecency without telescope's loading itself.
This is needed when you want to load telescope lazily, but want to start
registering process as soon as Neovim has started.

```lua
{
  "nvim-telescope/telescope-frecency.nvim",
  main = "frecency",
  ---@type FrecencyOpts
  opts = {
    db_safe_mode = false,
  },
},

{
  "nvim-telescope/telescope.nvim",
  -- `cmd` opts makes lazy.nvim load telescope.nvim lazily.
  cmd = { "Telescope" },
  config = function()
    local telescope = require "telescope"
    telescope.setup {
      extensions = {
        other_extension = {
          foo_bar = true,
        },
        -- Here you need no configuration opts for frecency because
        -- you've already done.
      }
    }
    -- This is still needed.
    telescope.load_extension "frecency"
  end,
},
```

* docs: add note for loading telescope.nvim lazily
2024-08-01 17:12:43 +09:00
JINNOUCHI Yasushi
bb2c63ee53
docs: fix typo (#228) 2024-07-15 10:58:00 +09:00
JINNOUCHI Yasushi
8241382c53
docs: add doc for config.setup() and ignore_* (#227) 2024-07-15 10:47:51 +09:00
JINNOUCHI Yasushi
be5add7248
feat: add an option for a function to ignore files (#223)
* refactor: use vim.pesc instead of implementing

* feat: add optional func to ignore in registering

* test: add tests for ignore_register function

* docs: add note for `ignore_register` option

* docs: add note for use case of `ignore_patterns`
2024-07-14 23:11:14 +09:00
JINNOUCHI Yasushi
03d43510d0
docs: fix typo and formatting (#226)
* style: fix formatting

* test: fix options to construct FS

* test: add cspell.json to validate doc

* docs: fix typo
2024-07-14 22:33:44 +09:00
Matthew Grossman
631bf1af1d
fix: exclude .git for default fd command (#221)
* Update help file for `fd`

* Update finder.lua

* Also change for `fdfind`

* Update doc/telescope-frecency.txt

Co-authored-by: JINNOUCHI Yasushi <delphinus35+github@me.com>

* Update lua/frecency/finder.lua

Co-authored-by: JINNOUCHI Yasushi <delphinus35+github@me.com>

---------

Co-authored-by: JINNOUCHI Yasushi <delphinus35+github@me.com>
2024-07-08 13:48:43 +09:00
JINNOUCHI Yasushi
a03eb9b78a
fix!: show debug msg only when debug is true (#220)
* docs: fix the format for some docs

* fix!: show debug msg only when `debug` is `true`

Fix #212

* test: enable debug logging in tests
2024-07-06 19:13:39 +09:00
JINNOUCHI Yasushi
82c41acfbf
docs: add doc about workspace for query() (#219) 2024-07-06 16:44:31 +09:00
JINNOUCHI Yasushi
8f593064f7
feat: add frecency.query() to query DB (#217)
* feat: add function to query the DB

* docs: add documentation for frecency.query()

* test: fix tests to run with `timestamps` property

* test: add tests for frecency.query()
2024-07-06 15:35:59 +09:00
JINNOUCHI Yasushi
14cb823ec2
docs: add note for FrecencyOpts (#208)
* docs: add lacked help tags

* docs: add FrecencyOpts and its explanation
2024-06-01 11:46:19 +09:00
JINNOUCHI Yasushi
865f51a611
feat!: set the default DB path to XDG_STATE_HOME (#204)
* feat: access user opts from config.ext_config

* feat!: set the default DB path to XDG_STATE_HOME

* feat: add fallback logic to detect old DB path

* docs: add note for this change
2024-05-25 17:27:08 +09:00
JINNOUCHI Yasushi
08e3ad80fc
docs: add doc and slim down README (#203)
* chore: add .gitignore entries to ignore `tags`

* docs: add doc

* docs: slim down the README
2024-05-25 16:14:23 +09:00