You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(defuntypst-indent-line ()
(interactive)
(message"function executing") ;; to show whether the function is executing;; do indentation
)
You can also view it on my repo: permlink
And this is the test file(part)(all comments are only added here for better present this issue):
{ # this is the inner mode head mark
let a = [from] # mark 1
let b = [*world*]
[hello ]
[
asdf
]
a + [ the ] +
} # this is the inner mode tail mark
mark 1: when the cursor on this line: 1. when there is no content in the previous line after '{', the function won't be executed when I hit tab, but I can correctly indent this line by manually calling my indent line function typst-indent-line; 2. when there is content in the previous line after '{', the function will be called and I have noticed that the result of (current-indentation) for previous line is the number of blank columns between { and non-blank character. However, the second scenario will fail to indent the line(hit tab), but still, a direct call to tyspt-indent-line works.
This is my inner mode definition
Code(brief):
You can also view it on my repo: permlink
And this is the test file(part)(all comments are only added here for better present this issue):
mark 1: when the cursor on this line: 1. when there is no content in the previous line after '{', the function won't be executed when I hit
tab
, but I can correctly indent this line by manually calling my indent line functiontypst-indent-line
; 2. when there is content in the previous line after '{', the function will be called and I have noticed that the result of(current-indentation)
for previous line is the number of blank columns between{
and non-blank character. However, the second scenario will fail to indent the line(hittab
), but still, a direct call totyspt-indent-line
works.This is my inner mode definition
The text was updated successfully, but these errors were encountered: