npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gml-tools-langserver

v0.9.6

Published

GML Intellisense through the GML-Tools Language Server.

Downloads

20

Readme

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.

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

  5. Update various clients to the new version.