You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: use nvim_echo for emitting errors and notifs (#1523)
* refactor(validate): Use `nvim_echo` for emitting config errors
Ref: #973
* chore: Fixed spacing issue
* chore: Fixed nested indentation
* chore: Stylua check pass
* fix(validate): Delayed config error emission for when `noice.nvim` is being used
* refactor(validate): Changed how message is handled for external message UIs
refactor(validate): Added `nvim-notify` to the external message UI
detection function
* refactor(fuzzy): Binary download related errors are now handled via a custom notification function
* chore(validate): Added title to notifications in config validator
* refactor(validate): Config validator now uses the same function for notification as the fuzzy downloader
* feat: move to utils, adjust error wording, correctly handle failure
* chore: remove `vim.api.nvim_echo` check
* fix: misleading error message when not on git tag with outdated prebuilt binaries
Closes#1628
* docs: update version reference to recommend `1.*`
---------
Co-authored-by: Liam Dyer <[email protected]>
Copy file name to clipboardExpand all lines: doc/configuration/fuzzy.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ If possible, it's highly recommended to use the Rust implementation of the fuzzy
29
29
30
30
### Prebuilt binaries (default on a release tag)
31
31
32
-
By default, Blink will download a prebuilt binary from the latest release, when you're on a release tag (via `version = '*'` on `lazy.nvim` for example). If you're not on a release tag, you may force a specific version via `fuzzy.prebuilt_binaries.force_version`. See [the latest release](https://github.com/saghen/blink.cmp/releases/latest) for supported systems. See `prebuilt_binaries` section of the [reference configuration](./reference.md#fuzzy) for more options.
32
+
By default, Blink will download a prebuilt binary from the latest release, when you're on a release tag (via `version = '1.*'` on `lazy.nvim` for example). If you're not on a release tag, you may force a specific version via `fuzzy.prebuilt_binaries.force_version`. See [the latest release](https://github.com/saghen/blink.cmp/releases/latest) for supported systems. See `prebuilt_binaries` section of the [reference configuration](./reference.md#fuzzy) for more options.
33
33
34
34
You may instead install the prebuilt binaries manually by downloading the appropriate binary from the [latest release](https://github.com/saghen/blink.cmp/releases/latest) and placing it at `$data/lazy/blink.cmp/target/release/libblink_cmp_fuzzy.$ext`. Get the `$data` path via `:echo stdpath('data')`. Use `.so` for linux, `.dylib` for mac, and `.dll` for windows. If you're unsure whether you want `-musl` or `-gnu` for linux, you very likely want `-gnu`.
"Found an outdated version of the fuzzy matching library, but can't download from github due to not being on a git tag."
51
-
..'\n!! FOR DEVELOPERS !!, set `fuzzy.prebuilt_binaries.ignore_version_mismatch = true` in config.'
52
-
..'\n!! FOR USERS !!, either run `cargo build --release` via your package manager, switch to a git tag, or set `fuzzy.prebuilt_binaries.force_version` in config.'
53
-
..'\nSee the docs for more info.'
54
-
)
55
-
end
37
+
utils.notify({
38
+
{ 'Found an ' },
39
+
{ 'outdated version', 'DiagnosticWarn' },
40
+
{ ' of the locally built ' },
41
+
{ 'fuzzy matching library', 'DiagnosticInfo' },
42
+
})
56
43
57
44
-- downloading is disabled, error
58
-
else
59
-
error(
60
-
'Found an outdated version of the fuzzy matching library, but downloading from github is disabled.'
61
-
..'\n!! FOR DEVELOPERS !!, set `fuzzy.prebuilt_binaries.ignore_version_mismatch = true` in config.'
62
-
..'\n!! FOR USERS !!, either run `cargo build --release` via your package manager, or set either `fuzzy.prebuilt_binaries.download = true` or `fuzzy.prebuilt_binaries.force_version` in config.'
63
-
..'\nSee the docs for more info.'
64
-
)
45
+
ifnotdownload_config.downloadthen
46
+
utils.notify({
47
+
{ "Couldn't update fuzzy matching library due to github downloads being disabled." },
'Your system is not supported by pre-built binaries. You must run cargo build --release via your package manager with rust nightly. See the README for more info.'
0 commit comments