ZIm/docs/src
Luis Cossío 7b5fdcee7f
lsp: Support Goto Declaration (#15785)
Adds support for [Goto
Declaration](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_declaration)
LSP command.

I am particularly interested in [this for Rust
projects](https://rust-analyzer.github.io/manual.html#go-to-declaration),
to be able to navigate to the place where a trait method is declared,
coming from a trait method implementation.

I noticed this was something I could do in VSCode before, but was
somehow missing is Zed. Thanks to the already existing infrastructure
for Goto Definition, I just followed and copy-paste-adapted it for Goto
Declaration.

As a bonus, I added `ctrl-F12` and `alt-ctrl-F12` as default macOS
keybindings for `GoToDeclaration` and `GoToDeclarationSplit`,
respectively. They are not keybindings from another editor, but I
figured they made sense to be grouped along with the other *F12
commands.

### Release Notes:

- Added "Go to declaration" editor action.
- vim: Breaking change to keybindings after introduction of the `Go to
declaration` editor action. The new keybindings are the following (and
can be found [here](https://zed.dev/docs/vim), alongside the other key
bindings):
  - `g d` - Go to definition
  - `g D` - Go to declaration
  - `g y` - Go to type definition
  - `g I` - Go to implementation




https://github.com/user-attachments/assets/ee5c10a8-94f0-4e50-afbb-6f71db540c1b

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
2024-08-06 11:20:51 +02:00
..
development docs: Fix links to "Backend dependencies" setup (#15706) 2024-08-02 16:47:45 -04:00
languages docs: Fix Ruff-related links (#15511) 2024-08-02 10:16:13 -04:00
adding-new-languages.md update docs content (#11374) 2024-05-03 16:24:04 -06:00
additional-learning-materials.md update docs content (#11374) 2024-05-03 16:24:04 -06:00
channels.md update docs content (#11374) 2024-05-03 16:24:04 -06:00
code-of-conduct.md update docs content (#11374) 2024-05-03 16:24:04 -06:00
collaboration.md update docs content (#11374) 2024-05-03 16:24:04 -06:00
configuring-zed.md Revert terminal: Add Alt key bindings for terminal (#15535) 2024-07-31 10:54:58 -04:00
contribute-to-zed.md docs: Fix some typos (#11443) 2024-05-06 11:45:17 -04:00
conversations.md docs: Update youtube link to new @zeddotdev channel name (#15453) 2024-07-29 17:55:35 -04:00
developing-zed.md update docs content (#11374) 2024-05-03 16:24:04 -06:00
feedback-and-support.md update docs content (#11374) 2024-05-03 16:24:04 -06:00
getting-started.md docs: Format docs (#15352) 2024-07-27 14:52:21 -04:00
git.md Mention in the docs that we can show and revert inline diffs (#15556) 2024-07-31 22:23:24 +03:00
key-bindings.md lsp: Support Goto Declaration (#15785) 2024-08-06 11:20:51 +02:00
language-model-integration.md docs: Format docs (#15352) 2024-07-27 14:52:21 -04:00
linux.md docs: Remove wrongly documented secrets portals (#15303) 2024-08-01 17:07:26 -04:00
multibuffers.md Add a section about navigating within multibuffers (#14979) 2024-07-22 15:10:02 -04:00
remote-development.md SSH remoting: terminal & tasks (#15321) 2024-07-28 22:45:00 -06:00
repl.md docs: Add brief R/Ark instructions (#15357) 2024-08-02 10:22:45 -04:00
snippets.md Add minimal snippets documentation (#14992) 2024-07-22 21:18:39 -04:00
SUMMARY.md Add snippets category to docs sidebar 2024-07-22 21:21:11 -04:00
system-requirements.md Update system-requirements.md 2024-07-11 11:59:52 -07:00
tasks.md Extend task templates with shell and hide fields to use custom shells and custom close behavior (#15031) 2024-07-23 22:58:36 +03:00
telemetry.md Add telemetry for supermaven (#11821) 2024-05-16 17:18:32 -04:00
themes.md Better tooltips for back/forward (#13946) 2024-07-08 16:33:41 -04:00
vim.md lsp: Support Goto Declaration (#15785) 2024-08-06 11:20:51 +02:00