Skip to content

Commit 11697ef

Browse files
committed
Use more ideomatic Lua
1 parent b9ee647 commit 11697ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/commonmarker/init.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ local function highlight (buffer, namespace)
5656
end
5757
end
5858

59-
commonmarker.detach = function (self, buffer)
59+
function commonmarker:detach (buffer)
6060
dump(self._attachments)
6161
self._attachments[buffer] = nil
6262
buf_clear_namespace(buffer, self._namespace, 0, -1)
6363
end
6464

65-
commonmarker.attach = function (self, buffer)
65+
function commonmarker:attach (buffer)
6666
if self._attachments[buffer] then return end
6767
self._attachments[buffer] = true
6868
highlight(buffer, self._namespace)

0 commit comments

Comments
 (0)