0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

AIエディタ Cursorで関数定義ジャンプができなかったけど解決

Last updated at Posted at 2025-02-20

AIエディタ Cursorで関数定義ジャンプする

事象

CursorでVSCodeのように関数の定義ジャンプをしようとしたができなくて困ってました。

開発言語はPHPです。

解決方法

VSCodeと同様、PHP開発のための拡張機能 PHP Intelephense をインストールしました。

スクリーンショット 2025-02-20 21.17.16.png

拡張機能をインストール & 有効化し、関数名を Ctrl + Click すると表示されるダイアログにVSCodeのときと同様「Go To Definition」が表示され、クリックすると関数の定義先にジャンプできるようになりました。

スクリーンショット 2025-02-20 21.32.36.png

また、PHPの他にもPythonでは、Python専用エクステンション(たぶん一番有名なヤツ)をインストールすることで同様に定義ジャンプが可能になりました。

スクリーンショット 2025-02-20 21.32.12.png

とても単純な話でしたが、VSCodeにはエクステンションを入れて使っているのが当たり前すぎて気が付かなかったです。

その他の開発言語については試してませんが、おそらく同様にその言語用の拡張機能をインストールすれば問題は解決するのではないでしょうか。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?