reqable / re-editor

Re-Editor is a powerful lightweight text and code editor widget.
https://pub.dev/packages/re_editor
MIT License
527 stars 51 forks source link

How to turn off keyword prompt and remove case sensitive in autocomplete? #5

Closed Srimathi622 closed 7 months ago

Srimathi622 commented 8 months ago

Hi, Thanks for this editor. I followed your example code for autocompletion. I want to turn off all auto keywords prompts. I need only "directPrompts" words. It should match with directPrompts whatever I type(Upper or lower case word) How do I achieve this? Pls help me.

Thanks in advance Srimathi

MegatronKing commented 8 months ago

@Srimathi622 Keyword prompts are from language and keywordPrompts, you can use an empty language mode and keep keywordPrompts as default. Please try the following code:

CodeAutocomplete(
  language: Mode(),
  directPrompts: [
    // TODO define your prompts
  ],
  child: ...
)
Srimathi622 commented 8 months ago

Thanks for your reply. I used empty Mode(). It turned off all the keywords. How to remove case sensitive? Pls help me.

MegatronKing commented 8 months ago

How to remove case sensitive

I submitted an update, you can use the master branch and override this function: https://github.com/reqable/re-editor/blob/90457414ef8a8d6e726b39dca0e5c80c996874a1/lib/src/code_autocomplete.dart#L24

Srimathi622 commented 8 months ago

Thanks for your reply. Let me try to use the code.