| Free TON Solidity Language for Visual Studio CodeSolidity Language support to Visual Studio Code, via the vssolidity. The source code is available at https://github.com/Pruvendo/vssolidity.git. Developed by Pruvendo Features
Syntax highlightingSnippetsCode completion for all contracts / libraries in the current file and all referenced imports Requirements
VsCode 1.30.0 or more recent InstallationBefore the installation remove all the Solidity syntax highlighing plugins installed in you VSCode. The recommended way to install VSSolidity is via
the Visual Studio Marketplace. In case of manual build use the following sequence of actions: 
Install latest npmInstall vsce (sudo npm -g vsce)Prepare the package (vsce pack) (run from the root directory of the project)In VSCode select Preferences/ExtensionsSelect Install from VSIXSelect the .vsix file generated by vsce Detailed documentationMotivationAt the present time there is a number of sophisticated VSCode syntax highlishters for Solidity, such as juanblanco.solidity, however, all of them are designed for Ethereum that is different than Free TON version of this language. An option to adopt one of the existing open-source plugins was considered however their complexity convinced us to develop a Free TON Solidity syntax highlighter from scratch. Syntax highlightThe following elements are automatically highlighted: 
Comments
Block comments (/* */)Line comments (//)The following tags are also specially highlighted inside the comments:
Commented lines that start with TODO, FIXME, CHANGED, XXX, IDEA, HACK, NOTE, REVIEW, NB, BUG, QUESTION, COMBAK, TEMP, SUPRESS, LINT.Commented lines with metatags such as @title, @author, @notice, @dev, @param, @returnOperators
Logical (<,==,>,<=,>=,!=,&&,||)Arithmetic (+,-,/,*)Binary (^,&,|)Mapping (=>)Assignment (=)Control flow
Conditions (if,else)Loops (for,while,do,continue,break)Exceptions (try,catch,finally)returnoperatorsConstants
Logical (true,false)Temporal (seconds,minutes,hours,days,weeks,years)Financial (ton)Numbers (decimal and hexadecimals)StringsTypes
Primitive types - bool,uint_<size>,int_<size>,address,string,bytes,hash_<size>Complex types (struct,enum,mapping, arrays)Built-in constructions
variables (this,super,abi,msg.sender,msg,block,tx,now,tx.origin,tx.gasprice,msg.data,msg.sig,msg.value)functions (require,assert,revert,selfdestruct,suicide,addmod,mulmod,keccak256,sha256,sha3,ripemd1t60,ecrecover,unicode,blockhash,gasleft,type)Modifiers
Access modifiers (internal,external,private,public,inline)Payable modifiers (payable,nonpayable)immutableExtended modifiers (pure,view,inherited,indexed,storage,memory,virtual,calldata,override,abstract,responsible)Custom modifiersUser identifiersPunctuation characters ({,},;,.,,,[,],(,))Specific constructions
importspragmascontracts and interfacesconstructorsfunctionandmodifiernewanddeleteeventsemitusing ... foruncheckedassemblyandlet The example of the highlighted source code is provided below: 
 Code snippetsThe snippets allow to automatically insert some fragments of code. For example, if the user starts to enter enum keyword the suggestion to use the snippet automatically appears. In case of agreement the following code is generated: enum Name {item1, item2 }
 Currently the following snippets are supported (the word in parentheses indicates what should be typed (fully or partially) to switch the snippet suggestion on): 
contract declaration (contract)constructor declaration (constructor)enum declaration (enum)error declaration (error)event declaration (event)forstatement (for)function declaration (function)function return declaration (function-return)function view declaration (function-view)function view return declaration (function-view-return)function pure declaration (function-pure)function pure return declaration (function-pure-return)function inline return declaration (function-inline-return)function functionID declaration (function-functionID)function externalMsg declaration (function-externalMsg)function internalMsg declaration (function-internalMsg)ifstatement (if)if ... elsestatement (ife)import(import)interface declaration (interface)interface returns declararion (interface-returns)library declaration (library)mappingdeclaration (mapping)modifierdeclaration (modifier)pragma ton-solidity(pragma)pragma ton-solidityexample (pragma-ex)pragma ignoreIntOverflow(pragma-ig)pragma AbiHeader(pragma-ab)pragma msgValue(pragma-ms)require(require)unchecked(unchecked)receivedeclaration (receive)fallbackdeclaration (fallback)onBouncedeclaration (onBounce)onTickTockdeclaration (onTickTock)onCodeUpgradedeclaration (onCodeUpgrade)afterSignatureCheckdeclaration (afterSignatureCheck)selfdestructdeclaration (selfdestruct)sha256declaration (sha256)gasToValuedeclaration (gasToValue)valueToGasdeclaration (valueToGas)help runtime error codes (help-runtime-error-codes) 
 Code completionThe following TON-types are supported: 
TvmCellTvmSliceTvmBuilderuint[]bytesstring 
 The following TON-functions are supported: 
msgtvmmathtxblockrnd 
 Further plansFor the next version it's planned to implement a real deep grammar analysis of the code that will let: 
Discover the syntax errorsImplement the movement to the function implementationsDiscover unused identifiers... and much more FeedbackThe developers welcome any feedback and suggestions about improvement of the current functionality and setup. Feel free to contact the project lead Sergey Egorov or the key developer Ruben Akhayan. |  |