zed icon indicating copy to clipboard operation
zed copied to clipboard

Go to definition is not working (Ruby)

Open jasder opened this issue 10 months ago • 2 comments

Check for existing issues

  • [X] Completed

Describe the bug / provide steps to reproduce it

This function is not available, and the relevant error log is found

Environment

Zed: 0.130.5 OS: macOS Monterey 12.4 Intel Core i7 CPU: Intel Core i7 16 GiB

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

image

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

2024-04-11T18:41:39+08:00 [INFO] retrying installation of language server "solargraph" in 1s 2024-04-11T18:41:40+08:00 [INFO] Validation check requested for "solargraph" but it cannot be reinstalled ^@2024-04-11T18:42:28+08:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-11T18:42:28+08:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-11T18:42:28+08:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-11T18:42:28+08:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-11T18:42:28+08:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-11T18:42:28+08:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-11T18:42:28+08:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-11T18:42:28+08:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-11T18:42:28+08:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-11T18:42:28+08:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-11T18:42:28+08:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-11T18:42:28+08:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-11T18:42:28+08:00 [WARN] Generic lsp request to node failed: Unhandled method textDocument/definition 2024-04-11T18:42:32+08:00 [ERROR] crates/settings/src/settings_store.rs:564: duplicate field languages 2024-04-11T18:42:32+08:00 [INFO] stopping language server solargraph 2024-04-11T18:42:32+08:00 [INFO] starting language server "solargraph", 2024-04-11T18:42:32+08:00 [INFO] starting language server. binary path: "solargraph", working directory: 2024-04-11T18:42:32+08:00 [ERROR] failed to start language server "solargraph": No such file or directory (os error 2) 2024-04-11T18:42:32+08:00 [ERROR] server stderr: Some("") 2024-04-11T18:42:32+08:00 [INFO] retrying installation of language server "solargraph" in 1s 2024-04-11T18:42:33+08:00 [INFO] Validation check requested for "solargraph" but it cannot be reinstalled

jasder avatar Apr 11 '24 10:04 jasder

I am using Svelte and it's also happening to me, it stopped working, and I don't want to change now that I discovered zed.

denniszelada avatar Apr 16 '24 18:04 denniszelada

I am using Svelte and it's also happening to me, it stopped working, and I don't want to change now that I discovered zed.

I had the same issue with svelte. It seems that it was related to prettier. I managed to fix the problem by installing prettier and prettier-plugin-svelte as a dev dependency + adding this .prettierrc config :

{
	"useTabs": false,
	"singleQuote": true,
	"trailingComma": "none",
	"printWidth": 90,
	"bracketSameLine": true,
	"svelteBracketNewLine": false,
	"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
	"overrides": [
		{
			"files": "*.svelte",
			"options": {
				"parser": "svelte"
			}
		}
	]
}

anthonyivol avatar Apr 18 '24 06:04 anthonyivol

For Elixir it also stopped worked, @anthonyivol made me realize that it was some other thing that was causing it and figure it out that it as the tailwindcss-language-server, so disabling it made the Go to Definition work again.

jotaviobiondo avatar Jun 09 '24 14:06 jotaviobiondo

This was also not working for me with the tailwindcss-language-server enabled for Ruby. I was able to change the order from:

"Ruby": {
  "show_inline_completions": true,
  "language_servers": [
    "tailwindcss-language-server",
    "ruby-lsp",
    "!solargraph"
  ]
}

to

"Ruby": {
  "show_inline_completions": true,
  "language_servers": [
    "ruby-lsp",
    "tailwindcss-language-server",
    "!solargraph"
  ]
}

And that seemed to fix it for me while still keeping the tailwind autocompletions in Ruby.

willcosgrove avatar Sep 06 '24 18:09 willcosgrove