|
1 | 1 | # -*- coding: utf-8 -*- |
2 | 2 |
|
3 | | -# Copyright (C) 2021-2022, 2024-2025 Rocky Bernstein <rb@dustyfeet.com> |
| 3 | +# Copyright (C) 2021-2022, 2024-2026 Rocky Bernstein <rb@dustyfeet.com> |
4 | 4 | # This program is free software: you can redistribute it and/or modify |
5 | 5 | # it under the terms of the GNU General Public License as published by |
6 | 6 | # the Free Software Foundation, either version 3 of the License, or |
|
21 | 21 | from typing import Iterable, List, NamedTuple, Tuple |
22 | 22 |
|
23 | 23 | from mathics.core.symbols import strip_context |
24 | | -from mathics_scanner import named_characters |
25 | 24 | from mathics_pygments.lexer import Regex |
| 25 | +from mathicsscript.settings import NAMED_CHARACTERS |
| 26 | + |
26 | 27 | from prompt_toolkit.completion import ( |
27 | 28 | CompleteEvent, |
28 | 29 | Completer, |
@@ -82,11 +83,11 @@ def get_completions( |
82 | 83 | yield Completion(cmd, -len(word)) |
83 | 84 |
|
84 | 85 |
|
85 | | -class MathicsCompleter(WordCompleter): |
| 86 | +class Mathics3Completer(WordCompleter): |
86 | 87 | def __init__(self, definitions): |
87 | 88 | self.definitions = definitions |
88 | 89 | self.completer = WordCompleter([]) |
89 | | - self.named_characters = sorted(named_characters.keys()) |
| 90 | + self.named_characters = sorted(NAMED_CHARACTERS["named-characters"].keys()) |
90 | 91 |
|
91 | 92 | # From WordCompleter, adjusted with default values |
92 | 93 | self.ignore_case = True |
|
0 commit comments