From 03d43510d066b6343271aac9481d9fa6b9084741 Mon Sep 17 00:00:00 2001 From: JINNOUCHI Yasushi Date: Sun, 14 Jul 2024 22:33:44 +0900 Subject: [PATCH] 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 --- cspell.json | 1 + doc/telescope-frecency.txt | 12 ++++++------ lua/frecency/config.lua | 2 +- lua/frecency/tests/database_spec.lua | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 cspell.json diff --git a/cspell.json b/cspell.json new file mode 100644 index 0000000..2fd95b9 --- /dev/null +++ b/cspell.json @@ -0,0 +1 @@ +{"words":["frecency","nvim","frecently","frecent","devicons","Neovim","shada","oldfiles","keymap","smartcase","frecencydelete","frecencyvalidate","frecencyopts","stdpath","substr","unindexed","fdfind","telescopebufferloaded","telescopepathseparator","telescopefrecencyscores","telescopequeryfilter","norl","noet","compl"],"flagWords":[],"language":"en","version":"0.2"} \ No newline at end of file diff --git a/doc/telescope-frecency.txt b/doc/telescope-frecency.txt index 7d2e1bf..7b057b2 100644 --- a/doc/telescope-frecency.txt +++ b/doc/telescope-frecency.txt @@ -139,7 +139,7 @@ imported. USAGE *telescope-frecency-usage* >vim :Telescope frecency - " Use a specifix workspace tag: + " Use a specific workspace tag: :Telescope frecency workspace=CWD " You can use with telescope's options :Telescope frecency workspace=CWD path_display={"shorten"} theme=ivy @@ -149,7 +149,7 @@ or to map to a key: vim.keymap.set("n", "tf", function() require("telescope").extensions.frecency.frecency {} end) - -- Use a specifix workspace tag: + -- Use a specific workspace tag: vim.keymap.set("n", "tw", function() require("telescope").extensions.frecency.frecency { workspace = "CWD", @@ -293,9 +293,9 @@ Options: *telescope-frecency-function-query-options* `Type: `"count"|"path"|"score"|"timestamps"` This is used to sort results with their properties. With `"count"`, `"score"` and `"timestamps"`, when candidates have the - same value, they will be sorted by `"path"` always ascendingly. - With `"path"`, the order direction differs by the value of - `direction`. + same value, they will be sorted by `"path"` always in ascending + order. With `"path"`, the order direction differs by the value + of `direction`. *telescope-frecency-function-query-options-record* - `record` Default: `false Type: `boolean` @@ -599,7 +599,7 @@ Default: `{}` Type: `table` This table contains mappings of `workspace_tag` → `workspace_directory`. The key -corresponds to the `:tag_name` used to select the filter in queies. The value +corresponds to the `:tag_name` used to select the filter in queries. The value corresponds to the top level directory by which results will be filtered. >lua -- example configuration diff --git a/lua/frecency/config.lua b/lua/frecency/config.lua index 804d861..60dfa05 100644 --- a/lua/frecency/config.lua +++ b/lua/frecency/config.lua @@ -145,7 +145,7 @@ Config.setup = function(ext_config) db_root = { opts.db_root, "s" }, db_safe_mode = { opts.db_safe_mode, "b" }, db_validate_threshold = { opts.db_validate_threshold, "n" }, - debug = { opts.debug, 'b' }, + debug = { opts.debug, "b" }, default_workspace = { opts.default_workspace, "s", true }, disable_devicons = { opts.disable_devicons, "b" }, filter_delimiter = { opts.filter_delimiter, "s" }, diff --git a/lua/frecency/tests/database_spec.lua b/lua/frecency/tests/database_spec.lua index 2553c23..1e8e05e 100644 --- a/lua/frecency/tests/database_spec.lua +++ b/lua/frecency/tests/database_spec.lua @@ -16,7 +16,7 @@ local function make_epoch(datetime) end local function with_database(f) - local fs = FS.new { ignore_patterns = {} } + local fs = FS.new {} local dir, close = util.tmpdir() dir:joinpath("file_frecency.bin"):touch() return function()