Commit graph

78 commits

Author SHA1 Message Date
149d12e824 ci: move to the dockerhub conventional-tools update 2023-04-18 20:55:07 +01:00
renovate[bot]
4e2c2381ef chore: add renovate.json 2023-03-27 20:48:16 +01:00
dependabot[bot]
e553517f7a chore: bump rayon from 1.6.1 to 1.7.0
Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.6.1 to 1.7.0.
- [Release notes](https://github.com/rayon-rs/rayon/releases)
- [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md)
- [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.6.1...rayon-core-v1.7.0)

---
updated-dependencies:
- dependency-name: rayon
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-06 16:23:16 +00:00
2032d0748b docs: add section about post-merge compiling 2023-03-03 07:22:08 +00:00
4dd8927ea2 docs: fix the ivy.run example 2023-03-03 07:22:08 +00:00
a69d84dd25 docs: update the API section of the docs 2023-03-03 06:55:46 +00:00
3a21d8e2b0 docs: update IvyFd command description 2023-03-03 06:55:46 +00:00
04d04fc96a docs: add IvyWorkspaceSymbols to the readme 2023-03-03 06:55:46 +00:00
51a72513f4 feat: add IvyWorkspaceSymbol command
This is a command that will search the lsp workspace symbols on a search
term.
2023-03-03 06:55:46 +00:00
45068e759d refactor: introduce backend concept and split out finders / sorters
We now have a concept of a 'backend' this is the same as the current
sorters and finders but with added info like the keymap so they can all
be registered as one. This will allow us to split our backends into
modues so we can better maintain then.
2023-03-03 06:55:46 +00:00
43d7e11c8b fix: unable to open files with $ character in
Ref: #41
2023-02-22 16:42:53 +00:00
dependabot[bot]
0d528d3b1c chore: bump ignore from 0.4.19 to 0.4.20
Bumps [ignore](https://github.com/BurntSushi/ripgrep) from 0.4.19 to 0.4.20.
- [Release notes](https://github.com/BurntSushi/ripgrep/releases)
- [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/ripgrep/commits/ignore-0.4.20)

---
updated-dependencies:
- dependency-name: ignore
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-16 13:25:44 +00:00
4dace131b8 feat: make delete word in promp work more like bash
Now when you delete a word in a promp it will work more like how it
works in bash. If the text dose not end in a letter then the last word
and all of the tailing special characters will be deleted. If the text
dose end in a letter then only the last word will be deleted leaving the
special characters that are before the last word.

Examples:

| Before             | After       |
| -------------------| ----------- |
| `some word`        | `some `     |
| `some     word`    | `some     ` |
| `some word       ` | `some `     |
2023-01-07 13:49:36 +00:00
dependabot[bot]
877adb42b4 chore: bump ignore from 0.4.18 to 0.4.19
Bumps [ignore](https://github.com/BurntSushi/ripgrep) from 0.4.18 to 0.4.19.
- [Release notes](https://github.com/BurntSushi/ripgrep/releases)
- [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/ripgrep/commits)

---
updated-dependencies:
- dependency-name: ignore
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-06 14:18:39 +00:00
b57abf3787 feat: remove the cpp implementation
This has not been used in some time and the rust version is way faster

Ref: #28
2022-12-28 15:12:37 +00:00
1af1f0e252 fix: wrap ffi.load in pcall and give a better error message
Now if libivyrs is not found you get a better message that points the
user to the docs on compiling to try and help them resolve the issue.

Ref: #35
2022-12-28 15:01:19 +00:00
3d8d55a146 chore: add issue templates 2022-12-28 11:07:04 +00:00
dependabot[bot]
8b75c9b536 chore: bump rayon from 1.6.0 to 1.6.1
Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/rayon-rs/rayon/releases)
- [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md)
- [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.6.0...rayon-core-v1.6.1)

---
updated-dependencies:
- dependency-name: rayon
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-12 18:05:04 +00:00
f483fc4992 ci: add required version param to stylua-action
This is getting set to latest. The docs say this could break CI due to
changes in stylua bit right now I think that is better than maintain the
version manually.
2022-12-07 20:34:41 +00:00
dependabot[bot]
238d9d184e chore: bump JohnnyMorganz/stylua-action from 1.1.2 to 2.0.0
Bumps [JohnnyMorganz/stylua-action](https://github.com/JohnnyMorganz/stylua-action) from 1.1.2 to 2.0.0.
- [Release notes](https://github.com/JohnnyMorganz/stylua-action/releases)
- [Commits](https://github.com/JohnnyMorganz/stylua-action/compare/v1.1.2...v2.0.0)

---
updated-dependencies:
- dependency-name: JohnnyMorganz/stylua-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-07 20:34:41 +00:00
dependabot[bot]
8635cf81ee chore: bump rayon from 1.5.3 to 1.6.0
Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.5.3 to 1.6.0.
- [Release notes](https://github.com/rayon-rs/rayon/releases)
- [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md)
- [Commits](https://github.com/rayon-rs/rayon/compare/v1.5.3...rayon-core-v1.6.0)

---
updated-dependencies:
- dependency-name: rayon
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-07 20:33:34 +00:00
864b9c8821 fix: exscpe test when passing it to vim syntax match
This was causing an issue an invalid regex. Now we are escapeing the
text to make it a valid regex.

There is also a small improvement where we no longer try and highlight
matched words if the "text" is empty.

Ref: #26
2022-10-06 07:57:57 +01:00
1e34a7fe74 test: add more mocks 2022-10-06 07:57:57 +01:00
b255d91e6d test: improve style of the test output
Add more space around the text, also make the text a readable color on
dark backgrounds.
2022-10-06 07:57:57 +01:00
84bf581a31 test: fix the after_each hook not getting called
When writing tests the `after_each` function was never getting called
due to the `before_each` function getting called instead
2022-10-06 07:57:57 +01:00
afbf2892af feat: add logo 2022-10-01 11:11:38 +01:00
dependabot[bot]
a7c9e2e409 chore: bump JohnnyMorganz/stylua-action from 1.1.0 to 1.1.2
Bumps [JohnnyMorganz/stylua-action](https://github.com/JohnnyMorganz/stylua-action) from 1.1.0 to 1.1.2.
- [Release notes](https://github.com/JohnnyMorganz/stylua-action/releases)
- [Commits](https://github.com/JohnnyMorganz/stylua-action/compare/v1.1.0...v1.1.2)

---
updated-dependencies:
- dependency-name: JohnnyMorganz/stylua-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-23 15:04:56 +01:00
dependabot[bot]
b4d2673c71 chore: bump JohnnyMorganz/stylua-action from 1.0.0 to 1.1.0
Bumps [JohnnyMorganz/stylua-action](https://github.com/JohnnyMorganz/stylua-action) from 1.0.0 to 1.1.0.
- [Release notes](https://github.com/JohnnyMorganz/stylua-action/releases)
- [Commits](https://github.com/JohnnyMorganz/stylua-action/compare/1.0.0...v1.1.0)

---
updated-dependencies:
- dependency-name: JohnnyMorganz/stylua-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-18 19:58:30 +01:00
e9cdd40c74 fix: crash in IvyLines 2022-09-18 19:58:09 +01:00
8d02c3a439 chore: add dependabot 2022-09-18 19:50:24 +01:00
c63ff5ff37 chore: update dependencies 2022-09-18 19:50:24 +01:00
6f58ad6d67 feat: add vsplit and split actions
Now you can open the currently selected item in a vertical split or a
horizontal split. The completion callback must support the current
actions.

There is also a bit of testing in here. The vim mock has been refactored
and split out so we can use it multiple tests.
2022-09-07 21:19:33 +01:00
ced6e5ae1e ci: setup stylua action 2022-09-04 16:18:04 +01:00
f1577f5c3e refactor: upgrade to actions/checkout v3
Ref: #10
2022-09-04 16:18:04 +01:00
95be579cef fix: ensure the correct window is activated on complete
When you complete a completion the completion window is no longer
activated after the callback is run. This was causing issues with the
incorrect window being active after the completion.

This will lead the way for more actions other then edit, that will be
comming soon.

Fixes-issue: #8
2022-09-04 15:34:47 +01:00
a3cd30d4ff test: add base test for ivy.window 2022-09-04 15:34:47 +01:00
3b0d1510e7 fix: include dot files in search results
This adds dot files into the finder. We are adding the overrides to the
`ignore` package, that can be used later to add custom ignore
directories that can be passed in as settings.

We are also adding a new `ivy_cwd` function to libivy to get the current
directory due to the limitations of lua.

Fixes-issue: #16
2022-09-04 13:33:50 +01:00
252fc9da1d fix: displaying the incorrect number of items in completions 2022-09-02 21:33:19 +01:00
1220eb3bc3 feat: highlight the completion chars in for gui
Ref: #9
2022-09-02 21:31:56 +01:00
f70cd6aad8 fix: remove the completion buffer from the buffer list
You will no longer see the completion "Buffers" in the list of buffers
when searching for buffers.

Fixes-issue: #7
2022-09-02 21:25:19 +01:00
a712c929cb feat: make the completion candidates type more consistent
The API for `window.set_items` took to many variable types. It would
take a table in multiple different formats and a string. Now it will
only take a table in a single format and a string. It will convert the
string into the table format by splitting it on new lines.

The table format is an array of tables that must have a `content` key
that will be the text that is displayed in the completion window. The
table can have any other data that is ignored.

```lua
local items = {
  { content = "Item one" },
  { content = "Item two" }
}
```

The `set_items` function will only display the `content` key in the
completion window, it will not do any sorting or filtering, that must be
done before passing the data to the `set_items` function.
2022-09-02 21:03:56 +01:00
e25a96c34a
Merge pull request #6 from AdeAttwood/experimental-rust
Experimental rust
2022-08-28 20:24:41 +01:00
45d61ffc32 ci: add rust build and format into the actions 2022-08-28 18:11:51 +01:00
39febd82e2 docs: add updated benchmark to the readme 2022-08-28 10:15:55 +01:00
a50a489479
Merge pull request #5 from Xymist/rust_xymist
Rust performance improvements
2022-08-26 21:06:46 +01:00
Xymist
b509a5842f Remove ThreadPool
Having switched to iterators and Rayon this is no longer used.
2022-08-26 16:46:51 +01:00
Xymist
de41712291 Return to using minimum_score
- Update the provided `minimum_score` in `sorter::Option::new` to match
  what was being used in `sort_strings`
- Use the `minimum_score` value instead of a hardcoded number

This seems like functionality that was either intended and not added, or
added and then part removed. Either way the performance impact is
minimal and it's a nice idea.
2022-08-26 16:40:12 +01:00
Xymist
d95d65c6a3 Use Rayon for sorting as well
- For completeness, but also for additional performance when there are
  extremely large numbers of results, use `par_sort_unstable_by()` for
  sorting the results. For most sane result sets this will not represent
  a significant speedup (for the Kubernetes benchmark it's around 1%)
  but as the set to be sorted grows the impact would be larger.
2022-08-26 16:36:34 +01:00
Xymist
c5e8677a37 Introduce Rayon for parallel iteration and sorting
- Use `into_par_iter()` before setting out to calculate scores and then
  filter by them

This represents a more efficient parallelism approach, with no mutex
or global state at top level.

ivy_files(kubernetes)   time:   [4.5800 ms 4.6121 ms 4.6467 ms]
                        change: [-55.056% -54.570% -54.133%] (p = 0.00 < 0.05)
                        Performance has improved.

ivy_match(file.lua)     time:   [1.1514 µs 1.1599 µs 1.1694 µs]
                        change: [+0.4116% +2.0753% +3.6710%] (p = 0.01 < 0.05)
                        Change within noise threshold.
2022-08-26 16:34:15 +01:00
Xymist
cec8393770 Remove multithreading for sorting
The relevant processes are so fast, mutexes and mutex locks are so
expensive, and iterators so efficient, that it's actually faster to run
single-threaded across all the data than to spin up a bunch of threads
and have them basically spinlock waiting for the global mutex involved
either directly or in a channel.

ivy_files(kubernetes)   time:   [10.209 ms 10.245 ms 10.286 ms]
                        change: [-36.781% -36.178% -35.601%] (p = 0.00 < 0.05)
                        Performance has improved.

ivy_match(file.lua)     time:   [1.1626 µs 1.1668 µs 1.1709 µs]
                        change: [+0.2131% +1.5409% +2.9109%] (p = 0.02 < 0.05)
                        Change within noise threshold.
2022-08-26 16:29:11 +01:00