Skip to content

[Zed] CodeSnap use a previous code instead of a newly selected one #118

Description

@renodesper

I'm trying to generate a snapshot from two different files. The first one works correctly, but when I create the second snapshot, the resulting image is identical to the one from the first file. Is there a way to debug this? I'll include the config and the tasks.json I’m using.

Zed: 0.215.3
CodeSnap: 0.13.1

~/.config/CodeSnap/config.json

{
  "print_eggs": false,
  "snapshot_config": {
    "theme": "candy",
    "window": {
      "mac_window_bar": true,
      "shadow": {
        "radius": 20,
        "color": "#00000040"
      },
      "margin": {
        "x": 82,
        "y": 82
      },
      "border": {
        "width": 1,
        "color": "#ffffff30"
      },
      "title_config": {
        "color": "#ffffff",
        "font_family": "Pacifico"
      },
      "radius": 12
    },
    "code_config": {
      "font_family": "CaskaydiaCove Nerd Font",
      "breadcrumbs": {
        "enable": true,
        "separator": "/",
        "color": "#80848b",
        "font_family": "CaskaydiaCove Nerd Font"
      }
    },
    "watermark": {
      "content": "CodeSnap",
      "font_family": "Pacifico",
      "color": "#ffffff"
    },
    "background": {
      "start": {
        "x": 0,
        "y": 0
      },
      "end": {
        "x": "max",
        "y": 0
      },
      "stops": [
        {
          "position": 0,
          "color": "#6bcba5"
        },
        {
          "position": 1,
          "color": "#caf4c2"
        }
      ]
    }
  }
}

.zed/tasks.json

[
    {
        "label": "CodeSnap",
        "command": "codesnap -o clipboard --file-path \"$ZED_RELATIVE_FILE\" --has-line-number --start-line-number $ZED_ROW --has-breadcrumbs true -c",
        "args": ["\"$ZED_SELECTED_TEXT\""],
        "use_new_terminal": false,
        "allow_concurrent_runs": false,
        "reveal": "never",
        "reveal_target": "dock",
        "hide": "on_success",
        "shell": "system"
    }
]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions