Comments (8)
I have no idea how to implement this but I'll look into it, thanks for the suggestion
from neuron-mode.
Maybe we can start replacing ivy-read with completing-read? It's built-in and I think (I'm not sure) we can achieve the same that ivy-read does easily.
Also, changing it would enable users to set completing-read-function as wanted, in order to use the ivy, helm, selectrum or whatever.
from neuron-mode.
I didn't know emacs had native support for this kind of completion, I just tried with completing-read
and everything works exactly like ivy. In fact, I'm pretty sure ivy somehow overrides completing-read
, since I get all the highlighting and fuzzy matching which is obviously not builtin behavior. That may also come from my emacs distribution (doom).
As for customizing the completion function directly, how would that look like? I'm afraid that, by providing a variable that would point either to ivy-read
or to whatever helm and selectrum use, I need to write a lot of glue code to adapt the agrument to each particular interface. Also, I'm not sure how to handle dependencies in that case, can I just drop the counsel
dependency and dynamically require
the corresponding modules?
from neuron-mode.
Emacs has the ability to change the completion function!
In docs:
completing-read-function is a variable defined in ‘minibuffer.el’.
Documentation:
The function called by ‘completing-read’ to do its work.
It should accept the same arguments as ‘completing-read’.
So the user can choose which completing read function to use! Maybe your completing-read-function is ivy-read so nothing changes for you. Making sure that we use completing-read arguments it's up to ivy, helm or selectrum adapt to that function and use those arguments for completion. This makes sense?
I don't know how to handle dependencies. If completing-read has worked, that means that we have only this functions from counsel?
#'counsel--find-file-matcher
counsel-find-file-map
(I've just grepped for counsel, maybe they are more)
from neuron-mode.
Ok that makes sense, thanks a lot for the explanation, this should be easy to implement then
from neuron-mode.
Alright, this should be working now in 27e288c
Let me know if it works with your completion backend
from neuron-mode.
That was fast!
It's working!
Thanks
from neuron-mode.
Cool, thanks for helping me implement this
from neuron-mode.
Related Issues (20)
- Non blocking cache regeneration is very slow HOT 3
- The function `neuron-toggle-connection-type` fails HOT 1
- can't run `neuron-new-zettel` in dired-mode HOT 3
- Feature request: Add ability to easily navigate between journal entries HOT 2
- Template zettels HOT 1
- Tag specific keymaps HOT 1
- neuron-mode fails to initialize HOT 10
- Cannot bind neuron-toggle-connection-type HOT 2
- Support wiki links HOT 7
- Another failure when initializing neuron mode HOT 3
- --id-hash and --id-date not supported anymore HOT 4
- Ignore log messages in output of 'neuron query' HOT 2
- 'neuron-add-tag' is unable to identify tags with latest version of neuron HOT 3
- Querying by --uri fails now? HOT 3
- neuron v2 query HOT 3
- neuron-insert-zettel-link inserts [[[nil]]] for link with non-ascii letters in filename HOT 8
- Canonical location of tags in `neuron query` (v2) HOT 1
- Release (or tag) for the last version that worked with Neuron 1.0 HOT 1
- Updates for latest (unreleased) Neuron version HOT 6
- --zettels is no longer a valid query flag HOT 1
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 neuron-mode.