argenos / nldates-obsidian

Work with dates in natural language in Obsidian
MIT License
490 stars 44 forks source link

`@` trigger conflicts with Completr plugin #89

Closed vanakema closed 2 years ago

vanakema commented 2 years ago

Hey there,

I've been messing around with the NLDates and Completr plugins, however, whenever I type @, I do not get nldates's suggestions. I've tried a lot of things to try and work around it in terms of doing fancy things to make sure Completr wouldn't be invoked by the way or location I was typing in, but nldate suggestions never came up.

It only worked after I turned off Completr. I really would like to use both plugins at the same time if possible.

Steps to Reproduce

  1. Install Completr plugin
  2. Install NLDates
  3. Make a new file
  4. Try to invoke NLDates using @
  5. Observe that NLDate suggestions do not appear

Thanks!

argenos commented 2 years ago

@vanakema you can change the trigger phrase of nldates in the settings

liamcain commented 2 years ago

@argenos I think this is actually a limitation of the new EditorSuggest class. Since Completr is "handling it" the event will never get to NLDates. So I don't think changing the trigger phrase will help.

argenos commented 2 years ago

Admittedly, I did not look into Completr and assumed they were using the same trigger phrase. In that case, I think this bug is better reported in the Completr repo or should at least have a matching issue there @vanakema

vanakema commented 2 years ago

Completr doesn't have a trigger phrase. It just shows as you type

argenos commented 2 years ago

@vanakema yeah, that is sort of the point. Since it's catching everything you type, there's no way for nldates (afaik) to be able to handle this. nldates only gets triggered with the trigger phrase in the settings.