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?

phpstorm で github copilot を使おうぜ

Last updated at Posted at 2024-10-22

追記

原因は css に scoped がついていないから、
本番環境だとなぜかcssがおかしくなっていた。

しか、vueファイルは10個以上あったので、原因を
chatgptに聞いても意味不明な回答。

そりゃ全て読み込ませてないからね。

そこで、github copilot chat に聞いたら教えてくれた。

github copilot plugin?

おおっ!

そんなに便利なのか
AI系のプラグインは色々あるけど、すべて有料にされるの敬遠していた

導入してみる

ちなみに、年間100ドルかかります。
1ヶ月の無料期間もありますがね。

利用方法

tabキーもしくは
ctrl + alt + 
で全部の行を受け入れ

ctrl + 
で1単語ずつ受け入れ

すべてを保管してくれる

//1を繰り返し10回表示

と書くと

$res = str_repeat("1", 10);

と自動で保管。TABキーを押すことで確定。
続けて

pd($res);

も自動補完。
ちなみに、pd($res)はprの自分で設定した関数。
これまで使ってくれる。

自分はgithubにコードをアップしていないが使える。
素晴らしいですね。

まだテスト段階ではありますけど、
いいと思います。

複雑なの

//ユーザーの情報を新しい順に10件だけ取得

と書くと

$res = User::query()
    ->orderBy('id', 'desc')
    ->take(10)
    ->get();

を自動補完。

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?