GithubHelp home page GithubHelp logo

zserub / melfa-basic Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 11.97 MB

Mitsubishi robot programming language support for VS Code

License: MIT License

Python 63.70% JavaScript 36.30%
melfa mitsubishi robot-programming vscode-extension vscode-language-support vscode-snippets vscode-theme

melfa-basic's Introduction

MELFA-Basic language extension

Mitsubishi robot programming language support for VS Code

Open melfa codes in VS Code, write then jump to RT Toolbox for upload.

twitter tea

Do you want this syntax highlight online? Check out my MELFA for highlight.js repo

Features

  • Syntax highlight
  • Snippets
  • Custom color theme
  • 2 type formatters (additional extension required)

Upcoming features:

  • Selectable label closing in settings

Workflow

Create a new workspace in RT Toolbox, then open the prg file with VS Code

or Select an existing program for modification.

Format code to get rid of the line numbers.

Write your program. After finishing your program, run the deformer to apply back the line numbers (Toolbox will automatically update the ones).

Open the file in RT Toolbox, then upload to the robot.


Showcase

Requirements

Setup

Install from marketplace

or

Manual installation:

Clone the repo to C:\Users\%userprofile%\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\

Activate theme

Ctrl + Shift + P --> Preferences: Color Theme --> Dark Theme for MELFA-Basic

Setup 'deformer'

Install Custom Local Formatters

Open settings.json ([Ctrl + , ] --> custom local formatters --> edit in settings.json)

Paste:

"customLocalFormatters.formatters": [
        {
            "command":"python \"%localappdata%\\Programs\\Microsoft VS Code\\resources\\app\\extensions\\MELFA-Basic\\formatter\\deformerV2.py\"",
            "languages": ["melfa-basic"]
        }
    ],

Deformer usage:

Ctrl + Shift + P --> Format document with... --> Custom Local Formatters

How formatter works

  • Removes the line numbers and ' in empty lines
  • Adjust spaces

Indent with the following logic:

  • Standard indentation rules for conditions and loops
  • Indent label based subroutines with '--- endings

Deformer

Formats the code for RT Toolbox.

  • Insert line numbers (Toolbox will readjust)
  • Comment empty lines so Toolbox won't delete them

Please open an issue if you found bugs or suggest features.

melfa-basic's People

Contributors

zserub avatar

Watchers

 avatar

melfa-basic's Issues

Formatter doesnt work for me

I have set the formatter with your provided code but it doesnt remove numbers and add indents, it just adds numbers to point parameters

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.