zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
49.58k stars 3.04k forks source link

Cannot open find files while no files open #14635

Closed Tazi0 closed 3 months ago

Tazi0 commented 3 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

So when I open up a project, I close all my tabs/files. But then I try to find a file (using shift shift as a file_finder::Toggle) it doesn't open the window. So I can't find the file I'm looking for and have to open a file to search for the correct file.

I can open it using the normal keyboard shortcut (CMD + P) so it feels like the keyboard shortcuts aren't active when there are no tabs/files open

Environment

Zed: v0.143.7 (Zed) OS: macOS 14.5.0 Memory: 16 GiB Architecture: aarch64

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

No response

If applicable, attach your Zed.log file to this issue.

Zed.log...(shortened)

2024-07-17T10:57:40+02:00 [INFO] Node runtime install_if_needed
2024-07-17T10:57:41+02:00 [INFO] Language server with id 16 sent unhandled notification window/logMessage:
{
  "type": 3,
  "message": "Initialising intelephense 1.11.5"
}
2024-07-17T10:57:41+02:00 [INFO] Language server with id 16 sent unhandled notification window/logMessage:
{
  "type": 3,
  "message": "Reading state from /var/folders/rf/kkdjk7lj0h3dxbygbm1svmtr0000gr/T/intelephense/6c0ca742."
}
2024-07-17T10:57:42+02:00 [INFO] Initialized prettier with plugins: {"@prettier/plugin-php"}
2024-07-17T10:57:43+02:00 [INFO] Language server with id 16 sent unhandled notification window/logMessage:
{
  "type": 3,
  "message": "Initialised in 1972 ms"
}
2024-07-17T10:57:44+02:00 [INFO] Language server with id 16 sent unhandled notification indexingStarted:
[
  null
]
2024-07-17T10:57:45+02:00 [INFO] Language server with id 16 sent unhandled notification indexingEnded:
[
  null
]
2024-07-17T10:59:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T10:59:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T10:59:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T10:59:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T10:59:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T10:59:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T10:59:05+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T10:59:05+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T10:59:05+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T10:59:05+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T10:59:05+02:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 1,
  "message": "[INFO] [ghostText] [2024-07-17T08:59:05.377Z] Cancelled by contextual filter",
  "metadataStr": "[INFO] [ghostText] [2024-07-17T08:59:05.377Z]",
  "extra": [
    "Cancelled by contextual filter"
  ]
}
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:03+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:04+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:25+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:28+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:31+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:31+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:00:51+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:01:02+02:00 [INFO] starting language servers for PHP: tailwindcss-language-server, intelephense
2024-07-17T11:01:44+02:00 [INFO] starting language servers for TSX: vtsls, tailwindcss-language-server, eslint
2024-07-17T11:01:44+02:00 [INFO] Language server with id 10 sent unhandled notification eslint/noLibrary:
{
  "source": {
    "uri": "file:///Users/tazio/Desktop/Work/willem-ii/drupal/themes/custom/indicia_theme/react-components/Components/PlayerBannerBlock/PlayerBannerBlock.tsx"
  }
}
2024-07-17T11:02:29+02:00 [INFO] starting language servers for TypeScript: vtsls, eslint
2024-07-17T11:02:29+02:00 [INFO] Language server with id 10 sent unhandled notification eslint/noLibrary:
{
  "source": {
    "uri": "file:///Users/tazio/Desktop/Work/willem-ii/drupal/themes/custom/indicia_theme/node_modules/@types/react/index.d.ts"
  }
}
2024-07-17T11:02:29+02:00 [INFO] starting language servers for TypeScript: vtsls, eslint
2024-07-17T11:02:29+02:00 [ERROR] failed to get git blame data: Failed to blame "drupal/themes/custom/indicia_theme/node_modules/@types/react/index.d.ts"

Caused by:
    Broken pipe (os error 32)
2024-07-17T11:02:29+02:00 [INFO] Language server with id 10 sent unhandled notification eslint/noLibrary:
{
  "source": {
    "uri": "file:///Users/tazio/Desktop/Work/willem-ii/drupal/themes/custom/indicia_theme/node_modules/@types/react/index.d.ts"
  }
}
2024-07-17T11:04:25+02:00 [INFO] starting language servers for JSONC: json-language-server
2024-07-17T11:04:25+02:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 1,
  "message": "[INFO] [ghostText] [2024-07-17T09:04:25.447Z] Cancelled by contextual filter",
  "metadataStr": "[INFO] [ghostText] [2024-07-17T09:04:25.447Z]",
  "extra": [
    "Cancelled by contextual filter"
  ]
}
2024-07-17T11:07:41+02:00 [INFO] starting language servers for TSX: vtsls, tailwindcss-language-server, eslint
2024-07-17T11:07:41+02:00 [INFO] Language server with id 10 sent unhandled notification eslint/noLibrary:
{
  "source": {
    "uri": "file:///Users/tazio/Desktop/Work/willem-ii/drupal/themes/custom/indicia_theme/react-components/Components/StandingsBlock/StandingBlock.tsx"
  }
}
2024-07-17T11:09:21+02:00 [INFO] open paths ["/Users/tazio/.config/zed/keymap.json"]
2024-07-17T11:09:21+02:00 [INFO] starting language servers for TSX: vtsls, tailwindcss-language-server, eslint
2024-07-17T11:09:21+02:00 [INFO] starting language servers for JSONC: json-language-server
2024-07-17T11:09:21+02:00 [INFO] starting language server "json-language-server", path: "/Users/tazio/.config/zed/keymap.json", id: 17
2024-07-17T11:09:21+02:00 [INFO] starting language server. binary path: "/Users/tazio/Library/Application Support/Zed/node/node-v18.15.0-darwin-arm64/bin/node", working directory: "/Users/tazio/.config/zed", args: ["/Users/tazio/Library/Application Support/Zed/languages/json-language-server/node_modules/vscode-langservers-extracted/bin/vscode-json-language-server", "--stdio"]
2024-07-17T11:09:21+02:00 [INFO] Language server with id 10 sent unhandled notification eslint/noLibrary:
{
  "source": {
    "uri": "file:///Users/tazio/Desktop/Work/willem-ii/drupal/themes/custom/indicia_theme/react-components/Components/StandingsBlock/StandingBlock.tsx"
  }
}
2024-07-17T11:09:21+02:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 1,
  "message": "[INFO] [default] [2024-07-17T09:09:21.956Z] [fetchCompletions] engine https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex",
  "metadataStr": "[INFO] [default] [2024-07-17T09:09:21.956Z]",
  "extra": [
    "[fetchCompletions] engine https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex"
  ]
}
2024-07-17T11:09:22+02:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 1,
  "message": "[INFO] [default] [2024-07-17T09:09:22.163Z] request.response: [https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex/completions] took 207 ms",
  "metadataStr": "[INFO] [default] [2024-07-17T09:09:22.163Z]",
  "extra": [
    "request.response: [https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex/completions] took 207 ms"
  ]
}
2024-07-17T11:09:22+02:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 1,
  "message": "[INFO] [streamChoices] [2024-07-17T09:09:22.164Z] solution 0 returned. finish reason: [stop]",
  "metadataStr": "[INFO] [streamChoices] [2024-07-17T09:09:22.164Z]",
  "extra": [
    "solution 0 returned. finish reason: [stop]"
  ]
}
2024-07-17T11:09:22+02:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 1,
  "message": "[INFO] [streamChoices] [2024-07-17T09:09:22.165Z] request done: headerRequestId: [6dd4c407-11b3-4786-aca7-31aadc421b38] model deployment ID: [d033-20240715013656]",
  "metadataStr": "[INFO] [streamChoices] [2024-07-17T09:09:22.165Z]",
  "extra": [
    "request done: headerRequestId: [6dd4c407-11b3-4786-aca7-31aadc421b38] model deployment ID: [d033-20240715013656]"
  ]
}

notpeter commented 3 months ago

I tried to reproduce this with the following keymap.json but was unable to:

[
  // Issue 14635
  {
    "context": "Workspace",
    "bindings": {
      "shift shift": "file_finder::Toggle"
    }
  }
]

Can you share the relevant portion of your ~/.zed/keymap.json where you're binding shift shift to file_finder::Toggle. I think there's a good chance you're doing so in a context other than Workspace.

Tazi0 commented 3 months ago

@notpeter you're correct, I forgot that context is important for keymaps.

[
  {
    "context": "Editor",
    "bindings": {
      // "cmd-shift-f": "editor::FindAllReferences" // cmd-click does this, cmd-shift-f is used to search project wide
      "ç": "editor::ShowCompletions", // matches ⌥-c
      "shift shift": "file_finder::Toggle", // matches pressing and releasing shift twice
      "cmd-r": "editor::Rename"
    }
  }
]

Is there a global context or is that not recommended?

notpeter commented 3 months ago

There is a global context (if your keymap object has no context key, then it's global) but I think workspace is what you want. We definitely need better docs here.