-
Notifications
You must be signed in to change notification settings - Fork 66
Added filewatch and cache functionality, notes can be searched by aliases #142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
really nice feature! would need to look into the code more in the next few days, meanwhile you can fix the style issue with |
@neo451 Maybe I need to add additional configurations to |
No idea why is that, but you can look at the action result, stylua wants to add a ps: My local stylua does inform me of this error. |
Quite interesting. I was actually just playing with porting a sqlite full text search that I used and adapting it for obsidian. While doing that I thought it might be cool to use sqlite as a cache. This goes into a similar direction. @kostabekre it would be interesting to see how much faster this is compared to the base case which just uses |
Right now this implementation only works for |
@sotte I was thinking of using SQLite myself, and I have founded this repository. But after some time and searching the implementations of other people, I decided that adding a new dependency won't be a good idea.
Well, I don't think SQLite is bad or anything, it might be the ideal solution for our needs but I decided take a more simple route both for users and for developers - using JSON.
Could you describe how that works? |
Yes, for now I made the implementation only for telescope (and not a very good one, it needs some polishing) because I haven't used other pickers. |
Okay, I can do that. |
yes I was mistaken, I meant |
@kostabekre I did not catch this part last time
|
@neo451 sorry, I meant that I didn't implement the event when the workspace was changed. I didn't have time to finish.
Maybe it's not necessary, but I thought it could be more flexible that way. |
Since there's like the concept of stuff like dynamic workspaces (which I don't understand now as well), I think we can follow the current approach as it is. |
Okay! Now, there are two things that are not implemented:
I will read how to do that and implement the solutions on the weekends. |
… the lock file exists.
@neo451 hi! Is there anything that I need to do? |
The lock file is created in the root of the workspace, maybe I need to move it to other place? |
sorry I don't have time to properly review this recently, but I had the idea the other day that we should maybe put cache in Also, I am working on #339 for limiting jobs (will merge soon), and we don't want to rely on plenary no more on the main, so also look into that. |
Why don't you use |
it's not just use I'm not advanced user of |
@neo451 Hello! I was debugging my code, and for some reason I founded that in file The reason is in the obsidian.Workspace.set(Obsidian.workspaces[1]) Is that a bug? |
for now I get the |
@neo451 I moved the lock file to the |
…en converting decimal to octal representation
In order to implement search by alises, a more faster solution is needed than grep search.
In order to solve this, the cache of the vault is created on the startup as a JSON file and updated every time a note is changed.
The cache is used in search of the notes and their aliases.
For the current moment only telescope search is available.
Solves this issue.