Skip to content

Instantly share code, notes, and snippets.

@crossgate10
Created June 21, 2021 05:56
Show Gist options
  • Save crossgate10/edfd042267f60c475b686d1fa16d5557 to your computer and use it in GitHub Desktop.
Save crossgate10/edfd042267f60c475b686d1fa16d5557 to your computer and use it in GitHub Desktop.
vscode - File Watcher setting for proto format
{
    "filewatcher.commands": [
        {
            "match": "\\.proto*",
            "isAsync": true,
            "cmd": "clang-format -style=\"{BasedOnStyle: Google, IndentWidth: 4, ColumnLimit: 0, AlignConsecutiveAssignments: true, AlignConsecutiveAssignments: true}\" -i ${file}",
            "event": "onFileChange"
        }        
    ]
}
goland - File Watcher setting for proto format
<TaskOptions>
  <TaskOptions>
    <option name="arguments" value="-style=&quot;{BasedOnStyle: Google, IndentWidth: 4, ColumnLimit: 0, AlignConsecutiveAssignments: true, AlignConsecutiveAssignments: true}&quot; -i $FilePath$" />
    <option name="checkSyntaxErrors" value="true" />
    <option name="description" />
    <option name="exitCodeBehavior" value="ERROR" />
    <option name="fileExtension" value="proto" />
    <option name="immediateSync" value="true" />
    <option name="name" value="clang-format" />
    <option name="output" value="$FilePath$" />
    <option name="outputFilters">
      <array />
    </option>
    <option name="outputFromStdout" value="false" />
    <option name="program" value="clang-format" />
    <option name="runOnExternalChanges" value="true" />
    <option name="scopeName" value="Project Files" />
    <option name="trackOnlyRoot" value="false" />
    <option name="workingDir" value="" />
    <envs />
  </TaskOptions>
</TaskOptions>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment