habamax / vim-godot

Use vim and godot engine to make games
MIT License
498 stars 24 forks source link

Suggestion: Catch errors with syntax #61

Closed idbrii closed 10 months ago

idbrii commented 1 year ago

Would be nice to catch some typos with syntax. I've done this in other languages (lua) but can't get it to work for gdscript. On the other hand, maybe these are better as gdscript lint errors and built into godot.

float export on an int (missing .0 at the end):

export(float, 0, 100, 1) var follow_deadzone_size := 5

Godot API missing leading _:

func ready():
habamax commented 11 months ago

This is for a linter and/or lsp, I don't think regexp based syntax would be able to catch such errors.

idbrii commented 10 months ago

Created a proposal for export issues: https://github.com/godotengine/godot-proposals/issues/8733