Skip to content

Commit b4920fb

Browse files
Added error message when using old comment option
1 parent d40a952 commit b4920fb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

runtime/plugins/comment/comment.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ VERSION = "1.0.0"
33
local util = import("micro/util")
44
local config = import("micro/config")
55
local buffer = import("micro/buffer")
6+
local micro = import("micro")
67

78
local ft = {}
89

@@ -62,6 +63,11 @@ ft["zscript"] = "// %s"
6263
ft["zsh"] = "# %s"
6364

6465
function updateCommentType(buf)
66+
if buf.Settings["commenttype"] ~= nil then
67+
micro.InfoBar():Error("\"commenttype\" option has been updated to \"comment.type\"",
68+
"instead, please update accordingly")
69+
end
70+
6571
-- NOTE: Don't use SetOptionNative() to set "comment.type",
6672
-- otherwise "comment.type" can't be reset by a "filetype" change.
6773
if buf.Settings["comment.type"] == "" then

0 commit comments

Comments
 (0)