Skip to content
Matthew edited this page Feb 20, 2019 · 5 revisions

map_selection.lua is not included in the repository, so you'll want to create a local version of that file for yourself. In addition, dev_config.lua is an explicitly ignored file with the intent of allowing devs to require their dev_config through map_selection. So map_selection looks something like:

require 'dev_config'
return require 'map_gen.maps.default'

And that in turn allows dev_config to change config options without changing files in the git working tree:

_DEBUG = true
_CHEATS = true
global.config = {
    new_feature = {weird_option = true}
}

Contributors to this project use a variety of IDEs for writing code.

VSCode is the most used, but Intellij, and atom are also represented.

For VSCode the following extensions are recommended: LuaCoderAssist, Factorio Lua API autocomplete.
Bracket Pair Colorizer and GitLens are nice additions as well.

For snippets: Code snippets to make some common tasks a little quicker in Redmew. In VSCode go file -> preferences -> user snippets then type lua.json and drop this in.
https://gist.github.com/plague006/19338a8a50b06da0e1875806205e2e32
For more on snippets: https://code.visualstudio.com/docs/editor/userdefinedsnippets

For settings:

{
    "search.showLineNumbers": true,
    "files.associations": {
        ".luacheckrc": "lua"
    },
    "files.eol": "\n",
    "files.insertFinalNewline": true,
    "files.trimTrailingWhitespace": true,
    "files.trimFinalNewlines": true,
    "LuaCoderAssist.luacheck.fileSizeLimit": 1000,
    "LuaCoderAssist.format.lineWidth": 300,
    "LuaCoderAssist.luaparse.luaversion": 5.2,
    "LuaCoderAssist.metric.enable": false,
    "LuaCoderAssist.luacheck.keepAfterClosed": false,
    "LuaCoderAssist.ldoc.authorInFunctionLevel": false,
    "LuaCoderAssist.luacheck.automaticOption": false,
    "bracketPairColorizer.showBracketsInGutter": true,
    "bracketPairColorizer.showBracketsInRuler": true,
}

For IDEs compatible with .editorconfig the following is recommended:

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true

# Matches multiple files with brace expansion notation
# Set default charset
[*.lua]
charset = utf-8
indent_style = space
indent_size = 4

Clone this wiki locally