zed icon indicating copy to clipboard operation
zed copied to clipboard

Terminal support GitEditor(commit)

Open d1y opened this issue 1 year ago • 1 comments
trafficstars

Check for existing issues

  • [X] Completed

Describe the feature

I need to git commit in the terminal to edit in zed, and I think it can be done better than vscode, for PREFIX setting highlighting, for example: fix / feat / chore / docs fix

If applicable, add mockups / screenshots to help present your vision of the feature

No response

d1y avatar Jan 30 '24 05:01 d1y

Hey @d1y, did your PR address all the things you wanted here?

JosephTLyons avatar Feb 01 '24 20:02 JosephTLyons

Hey @d1y, did your PR address all the things you wanted here?

Running well 🥳

git commit That's right, no need to specify EDITOR

https://github.com/zed-industries/zed/assets/45585937/93c3bff6-33be-4c66-a8d8-46cf403e74e6

d1y avatar Feb 02 '24 01:02 d1y

I'm getting this error everytime I try to edit a commit message in Zed:

[ERROR] failed to load language Git Commit: no such grammar git_commit

hferreiro avatar Feb 27 '24 12:02 hferreiro

I'm getting this error everytime I try to edit a commit message in Zed:

[ERROR] failed to load language Git Commit: no such grammar git_commit

Fix to https://github.com/zed-industries/zed/pull/7982

d1y avatar Feb 27 '24 14:02 d1y

Had noticed that in my Linux builds in VMs, an eternity is spent during

    Building [=====================> ] 1163/1168: tree-sitter-gitcommit(build)                                                            

@d1y would you consider moving that into an extension, given that it's all about the highlights?

SomeoneToIgnore avatar Mar 05 '24 20:03 SomeoneToIgnore

Had noticed that in my Linux builds in VMs, an eternity is spent during

    Building [=====================> ] 1163/1168: tree-sitter-gitcommit(build)                                                            

@d1y would you consider moving that into an extension, given that it's all about the highlights?

Are you talking about fallback to extensions? next I'll roll it back to the extension, contains other git related highlights

d1y avatar Mar 06 '24 18:03 d1y

Do you need to make any additional settings? i installed the extension but when i used the "git commit" command i was unsuccessful.

wuvinotre avatar Mar 15 '24 17:03 wuvinotre

Do you need to make any additional settings? i installed the extension but when i used the "git commit" command i was unsuccessful.

I guess you need to set the $EDITOR environment variable

{
  "terminal": {
      "env": {
        "EDITOR": "zed"
      }
    },
}

d1y avatar Apr 12 '24 15:04 d1y

I guess you need to set the $EDITOR environment variable

I think the correct config is "EDITOR": "zed --wait"

{
  "terminal": {
    "env": {
      "EDITOR": "zed --wait"
    }
  }
}

GOWxx avatar May 02 '24 14:05 GOWxx