about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2024-06-23 19:43:31 +0200
committerAlan Pearce2024-06-23 19:43:31 +0200
commitca4e1a14212033d81caf4a58107a4bdc2912c4b7 (patch)
tree25fa2afc9f793285d075f0c5cb1d628dde122495
parent38fb02f470c32cf2a3f4cb9bef540840d85f9254 (diff)
downloadwebsite-ca4e1a14212033d81caf4a58107a4bdc2912c4b7.tar.lz
website-ca4e1a14212033d81caf4a58107a4bdc2912c4b7.tar.zst
website-ca4e1a14212033d81caf4a58107a4bdc2912c4b7.zip
(automatically) format with golines
-rw-r--r--.dir-locals.el4
-rw-r--r--internal/server/dev.go4
2 files changed, 7 insertions, 1 deletions
diff --git a/.dir-locals.el b/.dir-locals.el
new file mode 100644
index 0000000..f943f69
--- /dev/null
+++ b/.dir-locals.el
@@ -0,0 +1,4 @@
+;;; Directory Local Variables            -*- no-byte-compile: t -*-
+;;; For more information see (info "(emacs) Directory Variables")
+
+((go-ts-mode . ((apheleia-formatter . golines)))))
diff --git a/internal/server/dev.go b/internal/server/dev.go
index ce718eb..7898a09 100644
--- a/internal/server/dev.go
+++ b/internal/server/dev.go
@@ -80,7 +80,9 @@ func (watcher FileWatcher) Start(callback func(string)) {
 				if event.Has(fsnotify.Create) || event.Has(fsnotify.Rename) {
 					f, err := os.Stat(event.Name)
 					if err != nil {
-						slog.Error(fmt.Sprintf("error handling %s event: %v", event.Op.String(), err))
+						slog.Error(
+							fmt.Sprintf("error handling %s event: %v", event.Op.String(), err),
+						)
 					} else if f.IsDir() {
 						err = watcher.Add(event.Name)
 						if err != nil {