Refactor code completion, container layouts, and webkit settings
- Renamed alt_provider.py file under words completer - Improve word completion matching logic with character validation - Change container orientations (header→vertical, left/right→horizontal) - Add separators to all container edges - Refactor webkit UI loading into separate load_url/load_context_base_path methods - Add comprehensive webkit browser-like settings
This commit is contained in:
@@ -18,7 +18,7 @@ class Provider(GObject.GObject, GtkSource.CompletionProvider):
|
||||
This is a Words Completion Provider.
|
||||
# NOTE: used information from here --> https://warroom.rsmus.com/do-that-auto-complete/
|
||||
"""
|
||||
# __gtype_name__ = 'WordsCompletionProvider'
|
||||
__gtype_name__ = 'WordsCompletionProvider'
|
||||
|
||||
def __init__(self):
|
||||
super(Provider, self).__init__()
|
||||
@@ -37,6 +37,16 @@ class Provider(GObject.GObject, GtkSource.CompletionProvider):
|
||||
|
||||
word = self.response_cache.get_word(context)
|
||||
if not word or len(word) < 2: return False
|
||||
|
||||
iter = self.response_cache.get_iter_correctly(context)
|
||||
iter.backward_char()
|
||||
ch = iter.get_char()
|
||||
# NOTE: Look to re-add or apply supprting logic to use spaces
|
||||
# As is it slows down the editor in certain contexts...
|
||||
# if not (ch in ('_', '.', ' ') or ch.isalnum()):
|
||||
if not (ch in ('_', '.') or ch.isalnum()):
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
def do_get_priority(self):
|
||||
|
||||
Reference in New Issue
Block a user