From c74e2cd77b3cd456decc64160d7486e30cc3b38d Mon Sep 17 00:00:00 2001 From: Will Whitty Date: Mon, 27 Apr 2020 19:59:22 +0545 Subject: [PATCH] Added missing built-in functions --- CHANGELOG.md | 1 + gdscript-keywords.el | 17 ++++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71c09f8..6645f72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ _Currently in development._ ### Features +- Added missing built in functions - Added missing puppet and remotesync keywords - Added a command to insert a path to a project file, either using `project-find-file` if `projectile` is available, otherwise with `find-file`. - Added a command to format a selected region with `gdformat`. diff --git a/gdscript-keywords.el b/gdscript-keywords.el index 9bfcefc..2a4ce5a 100644 --- a/gdscript-keywords.el +++ b/gdscript-keywords.el @@ -39,13 +39,16 @@ ;; Only contains types that are not classes and that the Godot editor highlights ;; like built-in keywords (defconst gdscript-built-in-types '("bool" "float" "int" "null" "void")) -(defconst gdscript-built-in-functions '("Color8" "abs" "acos" "asin" "assert" "atan" "atan2" -"bytes2var" "ceil" "char" "clamp" "convert" "cos" "cosh" "db2linear" "decimals" "dectime" "deg2rad" -"dict2inst" "ease" "exp" "floor" "fmod" "fposmod" "funcref" "hash" "inst2dict" "instance_from_id" -"is_inf" "is_nan" "lerp" "linear2db" "load" "log" "max" "min" "name" "nearest_po2" "pow" "preload" -"print" "print_stack" "printerr" "printraw" "prints" "printt" "rad2deg" "rand_range" "rand_seed" -"randf" "randi" "randomize" "range" "round" "seed" "sign" "sin" "sinh" "sqrt" "stepify" "str" -"str2var" "tan" "tanh" "type_exists" "typeof" "var2bytes" "var2str" "weakref" "yield")) +(defconst gdscript-built-in-functions '("Color8" "ColorN" "abs" "acos" "asin" "assert" "atan" "atan2" +"bytes2var" "cartesian2polar" "ceil" "char" "clamp" "convert" "cos" "cosh" "db2linear" "decimals" +"dectime" "deg2rad" "dict2inst" "ease" "exp" "floor" "fmod" "fposmod" "funcref" "get_stack" "hash" +"inst2dict" "instance_from_id" "inverse_lerp" "is_equal_approx" "is_inf" "is_instance_valid" "is_nan" +"is_zero_approx" "len" "lerp" "lerp_angle" "linear2db" "load" "log" "max" "min" "move_toward" "nearest_po2" +"ord" "parse_json" "polar2cartesian" "posmod" "pow" "preload" "print" "print_debug" "print_stack" "printerr" +"printraw" "prints" "printt" "push_error" "push_warning" "rad2deg" "rand_range" "rand_seed" "randf" "randi" +"randomize" "range" "range_lerp" "round" "seed" "sign" "sin" "sinh" "smoothstep" "sqrt" "step_decimals" "stepify" +"str" "str2var" "tan" "tanh" "to_json" "type_exists" "typeof" "validate_json" "var2bytes" "var2str" "weakref" +"wrapf" "wrapi" "yield")) ;; Contains all engine classes and node types, including vectors, transforms, etc. (defconst gdscript-built-in-classes '("AABB" "ARVRAnchor" "ARVRCamera" "ARVRController" "ARVRInterface" "ARVROrigin" "ARVRPositionalTracker" "ARVRServer" "AStar" "AStar2D" "AcceptDialog"