8000 GitHub - HAG87/vscode-maxscript-lsp: MaxScript language for VS Code (Language Server implementation) · GitHub
[go: up one dir, main page]

Skip to content

HAG87/vscode-maxscript-lsp

Repository files navigation

MaxScript language support

Autodesk 3ds Max Scripting language (MaxScript) support.

Features

  • Syntax highlight.
  • Grammar error checking
  • Semantic syntax highlight
  • Code autocompletion
  • Outline symbols
  • Go to definition and peek definition in document
  • Workspace symbols
  • Find all references
  • Rename symbol
  • Code formatter
  • Code minify
  • Code prettifier
  • Code online documentation
  • Snippets

Known limitations

Implementing a solution for these limitations will require a full interpreter:

  • Renaming a parameter in a function definition, will not rename the parameter on function calls
  • Parameters in a function call that have the same name that a parameter in a containing function will refer to that parameter instead of the caller function
  • Functions and struct members with the same name will not be properly matched when requesting the definition, references and rename from a property access or call

feature X

feature X

Release Notes

Changelog

Requirements

None.

Extension Settings

  "maxscript.completions": true | false,
  "maxscript.gotosymbol": true | false,
  "maxscript.gotodefinition": true | false,
  "maxscript.semantics": true | false,
  "maxscript.helpprovider": string,

  "maxscript.completions.dataBaseCompletion": true | false,
  "maxscript.completions.codeCompletion": true | false,
  "maxscript.formatter.codeblock": {
      "parensInNewLine": true | false,
      "newlineAllways": false | false,
      "spaced": true | false,
  },
  "maxscript.formatter.statements": {
      "useLineBreaks": true | false,
      "optionalWhitespace": false | false
  },
  "maxscript.formatter.list": {
      "useLineBreaks": false | false
  },    
  "maxscript.prettifier": {
      "filePrefix": "string",
      "expressionsToBlock": true | false,
  },
  "maxscript.minifier": {
      "filePrefix": "string",
      "removeUnnecessaryScopes": true | false,
      "condenseWhitespace": true | false,
  }

Syntax Highlight inside comments

feature X

Syntax Highlight

Basic settings for Custom highlighting.

There is a list of available scopes here, and some example rules here

  /*
  * Syntax highlight options for language maxscript
  */
  "editor.tokenColorCustomizations": {
    "textMateRules": [
      {
        "name": "Todo",
        "scope": "documentation.todo.mxs",
        "settings": { "foreground": "#4bd621", "fontStyle": "bold" }
      },
      {
        "name": "Fixme",
        "scope": "documentation.fixme.mxs",
        "settings": { "foreground": "#ce55d3", "fontStyle": "bold" }
      },
      {
        "name": "Plain text",
        "scope": "documentation.plain.mxs",
        "settings": { "foreground": "#cecece", "fontStyle": ""}
      },
      //...
    ]
  },

Executing MaxScript

MXSPyCOM project allow for editing & execution of 3ds Max MaxScript and Python files from external code editors.

  • Get it here: MXSPyCOM by Jeff Hannna
  • Follow the configuration guide to register the COM server.
  • Set up a vscode task:
{
    "version": "2.0.0",
    "tasks": [
      {
        "label": "MXSPyCOM execute Script",
        "type": "shell",
        // Add MXSPyCOM.exe to PATH or use file root, i.e: "C:/MXSPyCOM/MXSPyCOM.exe"
        "command":".\\MXSPyCOM.exe",
        "args": [
            "-s",
            { "value": "${file}", "quoting": "strong" }
        ],
        "group": "test",
        "presentation": {
            "echo": true,
            "reveal": "silent",
            "focus": false,
            "panel": "shared"
        }
    }
  ]
}
  • run the task, enjoy the 3ds max listener catching errors.

Contribute

gitHub

Note: MaxScript Structure is to say at least, chaotic. I've done my best to organize structs, classes, interfaces and so on. However the grammar is usable enough.

About

MaxScript language for VS Code (Language Server implementation)

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

0