0.9.6 • Published 5 years ago

gml-tools-langserver v0.9.6

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

Basics of the Language Server

GML-Tools is a language server, compliant with Microsoft's Language Server Protocol. This language server only works with GameMaker Studio 2 files explicitly. In the interest of simplicity, we have chosen to not support GMS1.4 in any capacity. Using the server in a GMS1.4 project (or earlier) is not expected, and will likely fail.

Current State of Development

GML-Tools currently supports the following type features:

  • Real time diagnostics
  • Hovers
  • Goto definition (variables, scripts, enums, macros)
  • Auto-complete
  • Signature Support

GML-Tools will support the following type features soon:

  • Find all references
  • Document symbols
  • Workspace symbol search
  • Rename

GML-Tools also has support for the following GML-specific commands, if the client integrates it:

  • Create Script
  • Create Object
  • Create Event
  • Compile and test project. (Windows Only) -- Note: other platforms could be supported if there is sufficient interest.

GML-Tools will support the following GML-specific commands, if the client integrates them:

  • Better documentation support
  • Delete Resource
  • Delete Event
  • Create Sprite

Contributors

Initial work on the Language Server was done by Jonathan Spira, @sanbox. Additional work creating and integrating GameMaker Rubber was done by @ImDaveead.

Issue Reporting

If you are using the Language Server, you can report any issues by submitting an Issue, or DMing Sanbox on discord or twitter. If the issue is a grammar issue, please flag such an issue with GRAMMAR at the front of it. If the issue is a documentation issue (an existing function showing up as non-existent, missing hover/signature support for functions, etc.) please flag the issue with DOCS.

How to Debug the Language Server

  1. Install Visual Studio Code (which is our first class client/test bed), Nodejs, and Yarn.

  2. Create a folder where you would like to store the GML-Tools Language Server and the GML-Tools VSCode Client Implementation.

  3. Open a terminal in that folder and clone this repository with:

    git clone https://github.com/GameMakerDiscord/gml-tools-langserver.git
  4. Clone the Visual Studio Code client found here as well to the same folder:

    git clone
    https://github.com/sanboxrunner/gml-tools-vsc-client
  5. Install dependencies for each folder (you will need to move your terminal into each folder for this):

    yarn
  6. Compile the Language Server and the Client with the Tasks "Build" or "Watch". Do not compile by command line, as the Language Server and Client connect over a local interchange created in those "Build" and "Watch" commands.

  7. Due to a bug in the tsconfig.json (see this issue), the absolute path of the sourceRoot in the Language Server tsconfig.json file will need to be added. Navigate to "./gml-tools-ls/tsconfig.json" and edit "sourceRoot" to be the following:

    ...
    "sourceMap": true,
    "sourceRoot": "ABSOLUTEPATH/gml-tools-ls/src",
    ...

    where "ABSOLUTEPATH" is the absolute path to gml-tools-ls.

  8. Begin the Extension by pressing F5. To place breakpoints in the Typescript of the language server, once the client is running, launch the "Attach to Server" process from the debug menu, or use the Client/Server option to launch both at once.

  9. Happy coding! If any problems occur, please add an issue. If you have any suggestions for simplifying this process while keeping the language server and the separate, please submit an issue. Thank you!

Publishing an Update to the Language Server

  1. Sanbox maintains the Language Server, and no one else should have or need to publish it. In the event, however, that someone else does need to publish an update, here are the necessary steps.

  2. Remove the "sourceRoot" and "sourceMap" sections from the tsconfig.json entirely. Once Typescript can allow for relative sourceRoots, we can publish the sourcemaps along with the source.

  3. Delete the out directory from your filesystem and confirm that package.json contains the following:

    "files": [
    	"/out",
    	"/lib",
    	"License.txt",
    	"README.md",
    	"CODE_OF_CONDUCT.md"
    ],

    Then, compile with build. Note: do not use testBuild.

  1. Publish by running yarn publish and specifying a new version.

  2. Update various clients to the new version.

0.9.6

5 years ago

0.9.5

5 years ago

0.9.4

5 years ago

0.9.3

5 years ago

0.9.2

5 years ago

0.9.1

5 years ago

0.9.0

6 years ago

0.8.3

6 years ago

0.8.2

6 years ago

0.8.1

6 years ago

0.8.0

6 years ago

0.7.20

6 years ago

0.7.19

6 years ago

0.7.18

6 years ago

0.7.17

6 years ago

0.7.16

6 years ago

0.7.15

6 years ago

0.7.14

6 years ago

0.7.13

6 years ago

0.7.12

6 years ago

0.7.11

6 years ago

0.7.1

6 years ago

0.7.0

6 years ago