summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Hawkins <[email protected]>2023-05-19 13:01:18 -0400
committerWill Hawkins <[email protected]>2023-05-19 13:01:18 -0400
commitcc93fd30fcfcb546131b9448a5637dead3e88953 (patch)
treed6d4543a7e528eeb5ab34f7dda720fa61f2b0619
parent6042a345251a100c70b787251d1c6c8438189a1b (diff)
Add VSCode Configuration Information
Using `gofumpt` via `gopls` makes it easier to maintain our 100-character-per-line limit. A `settings.json` file makes it easier to configure and instructions in the `README.md` help, too.
-rw-r--r--README.md16
-rw-r--r--ide/settings.json6
2 files changed, 22 insertions, 0 deletions
diff --git a/README.md b/README.md
index d99f2ac..61254ce 100644
--- a/README.md
+++ b/README.md
@@ -127,6 +127,22 @@ As a bonus, there are unit tests to check for regressions:
$ go test ./timeoutat ./ms ./utilities ./traceable
```
+### IDE Configuration
+
+If you are developing with VSCode, you can use `ide/settings.json` as the
+[workspace's](https://code.visualstudio.com/docs/editor/workspaces) `settings.json` file
+in order to meet the project's existing style. In particular, this file will configure
+VSCode to use an alternate go formatter known as [`gofumpt`](https://github.com/mvdan/gofumpt)
+and, in turn, give `gofumpt` specific configuration directives.
+
+To use the included `settings.json` file, simply drop it in the `.vscode` directory of the folder
+containing this `README.md` file.
+
+>Note: If you have existing workspace settings, you may be required to take additional
+steps to incorporate the information in the given `settings.json` file.
+
+> You may have to create the `.vscode` directory if it does not already exist.
+
## References
[RFC2026] https://datatracker.ietf.org/doc/html/rfc2026
diff --git a/ide/settings.json b/ide/settings.json
new file mode 100644
index 0000000..94b335f
--- /dev/null
+++ b/ide/settings.json
@@ -0,0 +1,6 @@
+{
+ "gopls": {
+ "formatting.gofumpt": true
+ },
+ "go.toolsEnvVars": {"GOFUMPT_SPLIT_LONG_LINES":"on"}
+} \ No newline at end of file