Jan Haller 555cb1ce9a Fix syntax highlighting for camelCase identifiers
Currently, any occurrences of PascalCase identifiers (even as parts of other words) are recognized as classes.
This assumes snake_case convention for all methods and variables and makes it impossible to use camelCase. While this is the recommended GDScript style, the syntax highlighter should allow for different styles as long as it can do so unambiguously. This is already done for existing rules, but overridden by one rule with an overly general regex pattern.

This commit modifies the catch-all rule for the 'parscal_class' group to only capture whole words.
For clarity, it renames 'parscal_class' to 'pascal_case_class'.

Other groups to recognize classes remain unchanged: type_declear, function-return-type, class_def, class_new, class_is, class_enum, class_name, extends
2019-12-29 18:00:31 +01:00
2019-12-07 14:03:59 +08:00
2019-12-07 14:03:38 +08:00

Godot Tools

A complete set of tools to code games with Godot Engine in Visual Studio Code.

IMPORTANT NOTE: Versions 1.0.0 and later of this plugin only support Godot 3.2 or later.

Features

The extension comes with a wealth of features to make your Godot programming experience as comfortable as possible:

  • Syntax highlighting for the GDScript (.gd) language
  • Syntax highlighting for the .tscn and .tres scene formats
  • Full typed GDScript support
  • Optional "Smart Mode" to improve productivity with dynamically typed scripts
  • Function definitions and documentation display on hover (see image below)
  • Rich autocompletion
  • Display script warnings and errors
  • Ctrl + click on a variable or method call to jump to its definition
  • Full documentation of the Godot Engine's API supported
  • Run a Godot project from VS Code

Showing the documentation on hover feature

Available commands

The extension adds a few entries to the VS Code Command Palette under "Godot Tools":

  • Open workspace with Godot editor
  • Run the workspace as a Godot project
  • List Godot's native classes

Settings

Godot

If you like this extension, you can set VS Code as your default script editor for Godot by following these steps:

  1. Open the Editor Settings
  2. Select Text Editor > External
  3. Make sure the Use External Editor box is checked
  4. Fill Exec Path with the path to your VS Code executable
  5. Fill Exec Flags with {project} --goto {file}:{line}:{col}

VS Code

You can use the following settings to configure Godot Tools:

  • editor_path - The absolute path to the Godot editor executable.
  • gdscript_lsp_server_port - The WebSocket server port of the GDScript language server.
  • check_status - Check the GDScript language server connection status.

Issues and contributions

The Godot Tools extension is an open source project from the Godot orgnization. Feel free to open issues and create pull requests anytime.

See the full changelog for the latest changes.

FAQ

Why does it fail to connect to the language server?

  • Godot 3.2 or later is required.
  • Make sure to open the project in the Godot editor first. If you opened the editor after opening VS Code, you can click the Retry button in the bottom-right corner in VS Code.

Why isn't IntelliSense displaying script members?

  • GDScript is a dynamically typed script language. The language server can't infer all variable types.
  • To increase the number of results displayed, open the Editor Settings, go to the Language Server section then check Enable Smart Resolve.
Description
Godot development tools for VSCode
Readme MIT 6.2 MiB
Languages
TypeScript 89.2%
GDScript 7.3%
JavaScript 2.8%
CSS 0.7%