Comments (7)
I am not completely opposed to this. I am not a fan of the hole setup
function, I would be OK with exposing the register_backend function so it can be used. Then find a way to disable the default backends that get registered.
The main goal for this will be to maintain simple API with minimal configure options. I have some time this weekend, so I will get the test suite moved over to busted and get some better tests added for the register backend.
from ivy.nvim.
Hi @AdeAttwood, is this something you want implemented?
If so I can have a crack at it 😄 -
from ivy.nvim.
Thanks!
For now I fixed this locally with this snippet:
vim.api.nvim_del_keymap("n", "<leader>p")
vim.api.nvim_del_keymap("n", "<leader>b")
vim.api.nvim_set_keymap("n", "<leader>p", '"+p', { noremap = true, silent = true })
And then I can also set new keymaps for Ivy itself with by making a ftplugin/ivy.lua
in my config with a keymap like this:
vim.api.nvim_set_keymap(
"n",
"<esc>",
"<cmd>lua vim.ivy.destroy()<CR>",
{ noremap = true, silent = true, nowait = true }
)
from ivy.nvim.
Also a quick question:
With telescope I was using the fzf mode, this would allow me to search for the file foo/bar/test.lua
with a search string like fo ba te
. With Ivy I have to search for fobate
, as spaces will not give me the result.
I suppose I will just have to kick the habit of typing spaces while searching?
And thanks a lot for this plugin, it works like a charm and looks really good!
from ivy.nvim.
@arnevm123 I have done a sample of what I think this API could look like. I would appreciate you taking it for a spin and letting me know if it will do what you want it to. I don't know if you will need to disable the lazy loading of the plugin.
With telescope I was using the fzf mode, this would allow me to search for the file foo/bar/test.lua with a search string like fo ba te. With Ivy I have to search for fobate, as spaces will not give me the result.
Yea when I move over to rust I went for a fuzzy lib rather than the old cpp algo that was adapted to work more like fzf. Currently, the word boundary needs to be the same to be a match. So instead of using spaces, you can use /
to get a higher match. If you have the string foo/bar/test.lua
the pattern fo/ba/te
will score higher than fobate
because you have the /b
and /t
matching the word boundary.
from ivy.nvim.
@AdeAttwood
I had a quick look and it seems like this does not work, as this now calls the setup twice, once at plugin/ivy.lua:20
and then a second time in my config.
---@param config IvySetupOptions
function ivy.setup(config)
-- __AUTO_GENERATED_PRINT_VAR_START__
print([==[ivy.setup config:]==], vim.inspect(config)) -- __AUTO_GENERATED_PRINT_VAR_END__
print("ivy.setup")
if has_setup then
return
end
for _, backend in ipairs(config.backends) do
register_backend(backend)
end
has_setup = true
end
Results in this:
ivy.setup config: {
backends = { "ivy.backends.buffers", "ivy.backends.files", "ivy.backends.lines", "ivy.backends.lsp-workspace-symbols", "ivy.backends.rg" }
}
ivy.setup
ivy.setup config: {
backends = { { "ivy.backends.files", {
keymap = "<leader>fd"
} } }
}
ivy.setup
I don't really see an easy way around this without exposing the setup function, but I can personally live with disabling and enabling keymaps 😄
Lazy loading did not really have an effect on this, as Lazy always loads the plugin which will always result in a call to the setup function. Once the code is loaded it calls the setup function.
from ivy.nvim.
@arnevm123, this one has been sorted in #81. I have also created a new ticket for the key map configuration.
from ivy.nvim.
Related Issues (20)
- Completion buffer displays when listing buffers
- The incorrect window is activated when completing in split windows
- Matched chars are not hilighted in the completion window
- Look into upgrading to Checkout V3 in actions
- Unable to paste into the prompt
- Dot files are not included in the results.
- Crash when running IvyLines
- Crash when searching for pattern with - in it
- It's time to remove the CPP implementation
- Does not open terminal buffers
- Confusing error when libivyrs.so is not found
- Unable to open files with $ character in
- Dependency Dashboard
- Does not work with macOS
- Add lazy.nvim installation to the readme.
- Add a wiki page for custom commands
- Finder panics when it finds a file it cannot read
- Allow the user to customise the key maps in the completion buffer
- Allow the end user to use internal utils and libivy. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ivy.nvim.