[vim/vim] runtime(kdl): fix KdlIndent and kdlComment (PR #15019)

3 views
Skip to first unread message

Yinzuo Jiang

unread,
Jun 16, 2024, 1:10:37 AM (8 days ago) Jun 16
to vim/vim, Subscribed

You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/15019

Commit Summary

  • b171cd0 runtime(kdl): fix KdlIndent and kdlComment

File Changes

(2 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/15019@github.com>

Yinzuo Jiang

unread,
Jun 16, 2024, 1:13:30 AM (8 days ago) Jun 16
to vim/vim, Subscribed

@jiangyinzuo commented on this pull request.


In runtime/indent/kdl.vim:

>  
-  if previous =~ "{" && previous !~ "}" && line !~ "}" && line !~ ":$"
-    return indent(previousNum) + shiftwidth()
-  else
-    return indent(previousNum)

Current code never - shiftwidth(), it is buggy.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/15019/review/2121088485@github.com>

Yinzuo Jiang

unread,
Jun 16, 2024, 1:16:01 AM (8 days ago) Jun 16
to vim/vim, Subscribed

@jiangyinzuo commented on this pull request.


In runtime/syntax/kdl.vim:

> @@ -13,7 +13,8 @@ syn match kdlNode '\v(\w|-|\=)' display
 syn match kdlBool '\v(true|false)' display
 
 syn keyword kdlTodo contained TODO FIXME XXX NOTE
-syn match kdlComment "//.*$" contains=kdlTodo
+syn region  kdlComment start="//"  end="$"   contains=kdlTodo,@Spell
+syn region  kdlComment start="/\*" end="\*/" contains=kdlTodo,@Spell

kdl also supports multiline comment /* ... */, see https://github.com/kdl-org/kdl/blob/main/SPEC.md#multi-line-comments


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/15019/review/2121088741@github.com>

Christian Brabandt

unread,
Jun 16, 2024, 2:47:09 AM (8 days ago) Jun 16
to vim/vim, Subscribed

thanks!


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/15019/c2171092555@github.com>

Christian Brabandt

unread,
Jun 16, 2024, 2:48:42 AM (8 days ago) Jun 16
to vim/vim, Subscribed

Merged #15019 into master.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/15019/issue_event/13173834427@github.com>

Reply all
Reply to author
Forward
0 new messages