Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gdscript-completion.el
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
(defvar-local gdscript-completion--all-keywords
(eval-when-compile (append gdscript-keywords gdscript-built-in-classes
gdscript-built-in-constants gdscript-built-in-functions
gdscript-built-in-types)))
gdscript-built-in-types gdscript-annotations)))

(defun gdscript-completion-at-point ()
"This is the function to be used for the hook `completion-at-point-functions'."
Expand Down
30 changes: 21 additions & 9 deletions gdscript-keywords.el
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,41 @@

;;; Code:

(defconst gdscript-annotations
'("abstract"
"export" "export_category" "export_color_no_alpha" "export_custom"
"export_dir" "export_enum" "export_exp_easing"
"export_file" "export_file_path"
"export_flags"
"export_flags_2d_navigation" "export_flags_2d_physics" "export_flags_2d_render"
"export_flags_3d_navigation" "export_flags_3d_physics" "export_flags_3d_render"
"export_flags_avoidance"
"export_global_dir" "export_global_file" "export_group" "export_multiline"
"export_node_path" "export_placeholder"
"export_range" "export_storage" "export_subgroup" "export_tool_button"
"icon"
"onready"
"rpc"
"static_unload"
"tool"
"warning_ignore" "warning_ignore_restore" "warning_ignore_start"))

(defconst gdscript-keywords
'("and" "as" "assert" "await"
"break" "breakpoint"
"case" "class" "class_name" "const" "continue"
"do"
"elif" "else" "enum"
"export" "export_category" "export_color_no_alpha" "export_custom"
"export_dir" "export_enum" "export_exp_easing" "export_file"
"export_flags"
"export_flags_2d_navigation" "export_flags_2d_physics" "export_flags_2d_render"
"export_flags_3d_navigation" "export_flags_3d_physics" "export_flags_3d_render"
"export_global_dir" "export_global_file" "export_group" "export_multiline"
"export_node_path" "export_range" "export_storage" "export_subgroup" "export_tool_button"
"extends"
"false" "for" "func"
"if" "in" "is"
"master" "match"
"not"
"onready" "or"
"or"
"pass" "preload" "puppet"
"remote" "remotesync" "return"
"self" "setget" "signal" "super" "slave" "static" "switch" "sync"
"tool" "true"
"true"
"var"
"while"
"yield"))
Expand Down
3 changes: 3 additions & 0 deletions gdscript-syntax.el
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@
(,(gdscript-syntax-regex-maker gdscript-keywords)
1
font-lock-keyword-face)
(,(rx (group "@" (0+ (or word ?_))))
1
font-lock-preprocessor-face)
(,(gdscript-syntax-regex-maker (append gdscript-built-in-constants
gdscript-built-in-types gdscript-built-in-functions))
1
Expand Down
Loading