Skip to content

LightYourWay/grandma3-tsserver-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grandma3-tsserver-plugin

A TypeScript language server plugin that improves the editor experience for grandMA3 plugin development.

Why

The grandMA3 Lua API exposes a large number of global functions. Without this plugin, those functions dominate the autocomplete suggestions and push variables, properties, and other non-function entries out of view. This plugin demotes all function-typed entries so they appear last.

How it works

The plugin wraps getCompletionsAtPosition and prefixes the sortText of any function-kinded completion entry with zzzz_, which moves them to the end of the sorted list. All other completion kinds are left untouched.

Affected ScriptElementKind values:

  • function
  • local function
  • member function
  • constructor
  • call signature
  • construct signature

Usage

The plugin is consumed as a local dependency of the root project and registered in tsconfig.json:

{
  "compilerOptions": {
    "plugins": [
      { "name": "grandMA3-tsserver-plugin" }
    ]
  }
}

It is installed automatically via npm install in the root project.

Build

npm run build

Output is written to ./dist/.

About

A TypeScript language server plugin that improves the editor experience for grandMA3 plugin development.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors