Jump to content
thy_

[VS CODE] Tutorial: how to config VS Code for Arma 3 (2024)

Recommended Posts

Hey there, tudo bem com você? 😄

 

Just sharing with you all my configs for Visual Studio Code (VS Code), a simple and feasible coding tool for Arma 3, even in 2023 where, if you already tried to use some available extensions, may be frustrating.  If you got some smart stuff to VS Code, please, be kind and share it here 😉

 

VS Code here on my end:

Screenshot-5.png

 

VS Code > tool download (free):

 

VS Code > Essential extensions for Arma 3:

 

VS Code > extensions recommended:

 

VS Code > My customs to help for ARMA:

  1. Ctrl + Shift + P (Not working for you? Troubleshooting down below)
  2. Type "settings.json" (no quotes) and select "Open USER settings (json)"; 
  3. Adapt the code below for your like:

 

{
    "workbench.colorCustomizations": {
        "editor.selectionBackground": "#E5FFE6",
        "editor.selectionHighlightBackground": "#E5FFE6",
        "editor.findMatchBackground": "#818181", //Current SEARCH MATCH
        "editor.findMatchHighlightBackground": "#818181" //Other SEARCH MATCHES
    },
    "sqf.enableCBA": true,
    "sqf.enableACE3": true,
    "workbench.iconTheme": null,
    "workbench.colorTheme": "Atom One Dark",
    "editor.minimap.enabled": false,
    "breadcrumbs.enabled": false,
    "editor.renderWhitespace": "all",
    "workbench.activityBar.visible": false,
    "zenMode.hideLineNumbers": false,
    "security.workspace.trust.untrustedFiles": "open",
    "editor.wordWrap": "on",
    "diffEditor.wordWrap": "on",
    "files.autoSaveDelay": 5000,
    "editor.tokenColorCustomizations": {
        "[Atom One Dark]": {
            "variables": "#eb54de",
            "functions": "#ff9b58",
            "numbers": "#49f5b3",
            "strings": "#70fa20",
            "keywords": "#fc6620",
            "comments": "#505050",
            "types": "#0004ff",
            "textMateRules": [
                {
                    "scope": ["constant.other"],
                    "settings": {
                        "foreground": "#1400c4"
                    } 
                },
                {
                    "scope": ["support.function"],
                    "settings": {
                        "foreground": "#fff5cb",
                        "fontStyle": "italic"
                    } 
                },
                {
                    "scope": ["keyword.operator"],
                    "settings": {
                        "foreground": "#7ee9fc",
                        "fontStyle": "bold"
                    } 
                },
                {
                    "scope": ["variable.language"],
                    "settings": {
                        "foreground": "#a13140"
                    }
                },
                {
                    "scope": ["meta.function-call"],
                    "settings": {
                        "foreground": "#fc6620"
                    }
                },
                {
                    "scope": ["punctuation.terminator"],
                    "settings": {
                        "foreground": "#ffffff"
                    } 
                },
            ]
        }
    },
    "editor.semanticHighlighting.enabled": true,
    "editor.semanticTokenColorCustomizations": {
        "[Atom One Dark]": {
            "enabled": true,
            "rules": {
                "*.declaration": { "bold": true }
            }
        }
    },
    "files.associations": {
        "*.json": "jsonc",
        "*.sqf": "sqf"
    },
    "C_Cpp.autocompleteAddParentheses": true,
    "sqflint.checkPaths": true,
    "files.autoSave": "afterDelay",
    "settingsSync.ignoredSettings": [
    
    ],
    "workbench.startupEditor": "none",
    "explorer.confirmDelete": false,
    "explorer.confirmDragAndDrop": false,
    "sqflint.warnings": false,
    "cmake.parseBuildDiagnostics": false,
    "editor.inlayHints.enabled": false,
    //"window.menuBarVisibility": "toggle",
    "editor.hover.delay": 2500
}

 

Share your thoughts and exp 😉



- - - - - - - - - - -

Troubleshooting > Can't find out the settings.json?
 

  1. Go to Preferences, pressing Ctrl + ,  (control + comma)
  2. Scroll to "Files: Associations"
  3. Add both items down below:
    6Pd6GRO.jpg
     
  4. Try again the Ctrl+Shift+P. If not working yet, let's try this:
  5. Go to Preferences again, pressing Ctrl + ,  (control + comma)
  6. Type "Theme";
  7. In the result list, find out "Edit in settings.json".
    J5tXxdR.png

     
  8. Now you are ready to customize the VSC colors.


 

 

  • Like 6

Share this post


Link to post
Share on other sites

Thanks for sharing. Here are three more extensions that I find really useful.

 

Tyriar.sort-lines (Sort lines with various settings)

moshfeu.diff-merge (Compare two files and merge differences)

bux578.vscode-openlastrpt (Opens latest RPT with ALT + R)

Share this post


Link to post
Share on other sites
On 9/3/2022 at 3:22 PM, R3vo said:

Thanks for sharing. Here are three more extensions that I find really useful.

 

Tyriar.sort-lines (Sort lines with various settings)

moshfeu.diff-merge (Compare two files and merge differences)

bux578.vscode-openlastrpt (Opens latest RPT with ALT + R)

 

😉

  • Thanks 1

Share this post


Link to post
Share on other sites

Added in main post code block the "selectionHighlightBackground" customization 😉 Cheers!

  • Thanks 1

Share this post


Link to post
Share on other sites

Added in the main topic message: Troubleshooting > Can't find out the settings.json?

😎

Share this post


Link to post
Share on other sites

Included the line below (already in the main post) setting a good delay to avoid at most (without losing the feature) that pop-up with a lot of info when we hover a variable with the mouse.

"editor.hover.delay": 2500  // default is 300.

 

Share this post


Link to post
Share on other sites

Included in the main post the line below that prevents the VS Code from showing annoying label hints with each variable:

"editor.inlayHints.enabled": false,

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×