9
15
Fork
You've already forked zig.vim
2

Fixing indentation on empty brackets with trailing comma/colon (issue #42) #56

Open
yohannd1 wants to merge 1 commit from yohannd1/trailing-comma-brackets-fix into master
pull from: yohannd1/trailing-comma-brackets-fix
merge into: ziglang:master
ziglang:master
ziglang:hb/new-keywords
ziglang:mikdusan-zir
yohannd1 commented 2021年06月13日 22:11:54 +02:00 (Migrated from github.com)
Copy link

An attempt on fixing what https://github.com/ziglang/zig.vim/issues/42 reports.

I'm not yet sure if this fully fixes the issue. I'll be testing it more on the following days and will report any issue I find.

An attempt on fixing what https://github.com/ziglang/zig.vim/issues/42 reports. I'm not yet sure if this fully fixes the issue. I'll be testing it more on the following days and will report any issue I find.
yohannd1 (Migrated from github.com) reviewed 2021年06月13日 22:14:13 +02:00
@ -62,4 +58,1 @@
return indent(prevLineNum) - 4
endif
yohannd1 (Migrated from github.com) commented 2021年06月13日 22:14:13 +02:00
Copy link

By the way - I haven't modified this specific line (l. 56) but I'm curious: wouldn't it be better if it were indent(prevLineNum)? As far as I understood it gets the indentation inside the previous block and deindents it by one level, which I believe should result in the same as indent(PrevLineNum).

By the way - I haven't modified this specific line (l. 56) but I'm curious: wouldn't it be better if it were `indent(prevLineNum)`? As far as I understood it gets the indentation inside the previous block and deindents it by one level, which I believe should result in the same as `indent(PrevLineNum)`.
haze commented 2021年07月24日 18:34:20 +02:00 (Migrated from github.com)
Copy link

(削除) Hey @YohananDiamond, I may have encountered a similar issue: (削除ここまで)

before I hit enter

after I hit enter

With the changes in this PR I was not able to see a change D:

EDIT: I figured out that this was my tree sitter plugin messing with the indentation! sorry for the false alarm...

~~Hey @YohananDiamond, I may have encountered a similar issue:~~ before I hit enter <img src="https://cdn.discordapp.com/attachments/713755801583616100/868530182246510642/unknown.png" width="250"> after I hit enter <img src="https://cdn.discordapp.com/attachments/713755801583616100/868530201527730217/unknown.png" width="250"> With the changes in this PR I was not able to see a change D: **EDIT**: I figured out that this was my tree sitter plugin messing with the indentation! sorry for the false alarm...
This pull request has changes conflicting with the target branch.
  • indent/zig.vim
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin yohannd1/trailing-comma-brackets-fix:yohannd1/trailing-comma-brackets-fix
git switch yohannd1/trailing-comma-brackets-fix
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ziglang/zig.vim!56
Reference in a new issue
ziglang/zig.vim
No description provided.
Delete branch "yohannd1/trailing-comma-brackets-fix"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?