We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jediの問題かもしれませんが、description(popup-make-itemの summaryパラメータ)が 以下のようにとても長くなってしまい、見づらく感じます。
以下のVim版のスクリーンショットのような感じになればよいと 考えています。(ただコードを見る限り、Emacs版と同じようなことをやって いるようにしか見えないので、jediの APIが今のような descriptionを 返す前に撮影されたものかもしれません)
必要な情報だけ欲しいのですが、すべて有用な情報であるかもしれないので
以下は試作したパッチです。
diff --git a/jedi.el b/jedi.el index 0e66af4..8fe65e0 100644 --- a/jedi.el +++ b/jedi.el @@ -182,6 +182,21 @@ To make this option work, you need to use `jedi:setup' instead of ;;; AC source +(defcustom jedi:ac-description-style 'long + "How to display description" + :type '(choice (const :tag "Long description" 'long) + (const :tag "Short Desctiption" 'short) + (const :tag "No description" nil)) + :group 'jedi) + +(defun jedi:ac-format-description (desc) + (case jedi:ac-description-style + (long desc) + (short (if (string-match "\\(<[^<:]+:[^>]+>\\)" desc) + (match-string 1 desc) + desc)) + (otherwise nil))) + (defun jedi:ac-direct-matches () (mapcar (lambda (x) @@ -190,7 +205,7 @@ To make this option work, you need to use `jedi:setup' instead of (popup-make-item word :symbol symbol :document (unless (equal doc "") doc) - :summary description))) + :summary (jedi:ac-format-description description)))) jedi:complete-reply)) (defun jedi:ac-direct-prefix ()
現状の jediは jedi側で文字列化してしまい、エディタプラグイン側で 得られた情報を加工しづらいように思えるので、理想的には jedi側を修正し、 それを使う側で加工しやすい情報を得られるようにできればよいと思います。 (特に括弧の入れ子構造は正規表現で解析するのが困難なので)
私の環境設定(本来は Vimのスクリーンショットのようになる ??)に問題があるかも しれませんので、ご意見をいただけたらと思います。
よろしくお願いします。
The text was updated successfully, but these errors were encountered:
ありがとうございます。本家のトラッカーに issue 登録しました。 davidhalter/jedi#49 出来れば hello.py のソースを本家のほうに貼っておいてもらえませんか?
Jedi のソースを見ると "TODO return value is just repr of some objects, improve!" って書いてあるので、いつかは改善されると思います。時間がかかりそうであれば、私のほうでパッチを作って本家にPRしようと思います。
Sorry, something went wrong.
jedi側で改善されたようなので closeとしておきます。 ありがとうございます。
こっちを閉めるの忘れてました。ありがとうございます!
No branches or pull requests
jediの問題かもしれませんが、description(popup-make-itemの summaryパラメータ)が
以下のようにとても長くなってしまい、見づらく感じます。
以下のVim版のスクリーンショットのような感じになればよいと
![vim](https://github.com/davidhalter/jedi/raw/master/screenshot_complete.png)
考えています。(ただコードを見る限り、Emacs版と同じようなことをやって
いるようにしか見えないので、jediの APIが今のような descriptionを
返す前に撮影されたものかもしれません)
必要な情報だけ欲しいのですが、すべて有用な情報であるかもしれないので
から選択できるような形にするのが良いと思います。
以下は試作したパッチです。
現状の jediは jedi側で文字列化してしまい、エディタプラグイン側で
得られた情報を加工しづらいように思えるので、理想的には jedi側を修正し、
それを使う側で加工しやすい情報を得られるようにできればよいと思います。
(特に括弧の入れ子構造は正規表現で解析するのが困難なので)
私の環境設定(本来は Vimのスクリーンショットのようになる ??)に問題があるかも
しれませんので、ご意見をいただけたらと思います。
よろしくお願いします。
The text was updated successfully, but these errors were encountered: