diff --git a/gdscript-completion.el b/gdscript-completion.el index d3da550..5347020 100644 --- a/gdscript-completion.el +++ b/gdscript-completion.el @@ -42,7 +42,8 @@ (let* ((bounds (bounds-of-thing-at-point 'symbol)) (start (car bounds)) (end (cdr bounds))) - (list start end gdscript--completion-keywords . nil))) + (list start end gdscript-completion--all-keywords + . nil))) (provide 'gdscript-completion) diff --git a/gdscript-syntax.el b/gdscript-syntax.el index 11e6077..11fa03a 100644 --- a/gdscript-syntax.el +++ b/gdscript-syntax.el @@ -33,14 +33,14 @@ highlighting." (insert-file-contents (concat (file-name-directory (or load-file-name buffer-file-name)) file-path)) (split-string (buffer-string) "\n" t))) -(defvar gdscript-keywords (gdscript--get-package-file-content-as-string "data/keywords.txt")) -(defvar gdscript-built-in-constants (gdscript--get-package-file-content-as-string "data/built-in-constants.txt")) +(defconst gdscript-keywords (gdscript--get-package-file-content-as-string "data/keywords.txt")) +(defconst gdscript-built-in-constants (gdscript--get-package-file-content-as-string "data/built-in-constants.txt")) ;; Only contains types that are not classes and that the Godot editor highlights ;; like built-in keywords -(defvar gdscript-built-in-types (gdscript--get-package-file-content-as-string "data/built-in-types.txt")) -(defvar gdscript-built-in-functions (gdscript--get-package-file-content-as-string "data/built-in-functions.txt")) +(defconst gdscript-built-in-types (gdscript--get-package-file-content-as-string "data/built-in-types.txt")) +(defconst gdscript-built-in-functions (gdscript--get-package-file-content-as-string "data/built-in-functions.txt")) ;; Contains all engine classes and node types, including vectors, transforms, etc. -(defvar gdscript-built-in-classes (gdscript--get-package-file-content-as-string "data/built-in-classes.txt")) +(defconst gdscript-built-in-classes (gdscript--get-package-file-content-as-string "data/built-in-classes.txt")) (defun regex-maker (words) (regexp-opt words 'symbols))