Skip to content
New issue

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

Signature hints for certain Python libs truncated, no line breaks #4171

Open
12 tasks done
benchatt opened this issue Aug 9, 2023 · 0 comments
Open
12 tasks done

Signature hints for certain Python libs truncated, no line breaks #4171

benchatt opened this issue Aug 9, 2023 · 0 comments
Labels
bug PR Welcome A good quality PR for this feature would be considered.

Comments

@benchatt
Copy link

benchatt commented Aug 9, 2023

Issue Prelude

Please complete these steps and check these boxes (by putting an x inside
the brackets) before filing your issue:

  • I have read and understood YCM's CONTRIBUTING document.
  • I have read and understood YCM's CODE_OF_CONDUCT document.
  • I have read and understood YCM's README, especially the
    Frequently Asked Questions section.
  • I have searched YCM's issue tracker to find issues similar to the one I'm
    about to report and couldn't find an answer to my problem. (Example Google
    search.
    )
  • If filing a bug report, I have included the output of vim --version.
  • If filing a bug report, I have included the output of :YcmDebugInfo.
  • If filing a bug report, I have attached the contents of the logfiles using
    the :YcmToggleLogs command.
  • If filing a bug report, I have included which OS (including specific OS
    version) I am using.
  • If filing a bug report, I have included a minimal test case that reproduces
    my issue, using vim -Nu /path/to/YCM/vimrc_ycm_minimal, including what I
    expected to happen and what actually happened.
  • If filing a installation failure report, I have included the entire output
    of install.py (or cmake/make/ninja) including its invocation
  • I understand this is an open-source project staffed by volunteers and
    that any help I receive is a selfless, heartfelt gift of their free time. I
    know I am not entitled to anything and will be polite and courteous.
  • I understand my issue may be closed if it becomes obvious I didn't
    actually perform all of these steps.

Thank you for adhering to this process! It ensures your issue is resolved
quickly and that neither your nor our time is needlessly wasted.

Issue Details

Note: thanks for looking into this, and for such a great tool.

  • What did you do?
  1. install python package playwright.
  2. vim -Nu /path/to/YCM/ycm_vimrc_minimal
  3. :edit test.py
  4. Enter insert mode and type:
from playwright.sync_api import APIRequestContext

a = APIRequestContext()

a.get(

The signature docs for this package must be formatted differently than expected, because I'm seeing ^@ instead of line breaks where I would expect them. The signature hints are not shown in full, as they cut off after the line exceeds the width of the window.

If you made changes to vimrc_ycm_minimal, paste them here:

N/A

  • What did you expect to happen?

Expected multiline signature help or line wrap.

  • What actually happened?
Screenshot 2023-08-09 at 2 30 53 PM

Single-line hint, with ^@ instead of line breaks, cut off at the window width.

Diagnostic data

Output of vim --version

VIM - Vi IMproved 9.0 (2022 Jun 28, compiled May 13 2023 12:55:09)
macOS version - arm64
Included patches: 1-1550
Compiled by Homebrew
Huge version without GUI.  Features included (+) or not (-):
+acl               +file_in_path      +mouse_urxvt       -tag_any_white
+arabic            +find_in_path      +mouse_xterm       -tcl
+autocmd           +float             +multi_byte        +termguicolors
+autochdir         +folding           +multi_lang        +terminal
-autoservername    -footer            -mzscheme          +terminfo
-balloon_eval      +fork()            +netbeans_intg     +termresponse
+balloon_eval_term +gettext           +num64             +textobjects
-browse            -hangul_input      +packages          +textprop
++builtin_terms    +iconv             +path_extra        +timers
+byte_offset       +insert_expand     +perl              +title
+channel           +ipv6              +persistent_undo   -toolbar
+cindent           +job               +popupwin          +user_commands
-clientserver      +jumplist          +postscript        +vartabs
+clipboard         +keymap            +printer           +vertsplit
+cmdline_compl     +lambda            +profile           +vim9script
+cmdline_hist      +langmap           -python            +viminfo
+cmdline_info      +libcall           +python3           +virtualedit
+comments          +linebreak         +quickfix          +visual
+conceal           +lispindent        +reltime           +visualextra
+cryptv            +listcmds          +rightleft         +vreplace
+cscope            +localmap          +ruby              +wildignore
+cursorbind        +lua               +scrollbind        +wildmenu
+cursorshape       +menu              +signs             +windows
+dialog_con        +mksession         +smartindent       +writebackup
+diff              +modify_fname      +sodium            -X11
+digraphs          +mouse             +sound             -xfontset
-dnd               -mouseshape        +spell             -xim
-ebcdic            +mouse_dec         +startuptime       -xpm
+emacs_tags        -mouse_gpm         +statusline        -xsmp
+eval              -mouse_jsbterm     -sun_workshop      -xterm_clipboard
+ex_extra          +mouse_netterm     +syntax            -xterm_save
+extra_search      +mouse_sgr         +tag_binary        
-farsi             -mouse_sysmouse    -tag_old_static    
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/opt/homebrew/share/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X -DMACOS_X_DARWIN -g -O2 -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 
Linking: clang -o vim -lm -lncurses -lsodium -liconv -lintl -framework AppKit -L/opt/homebrew/opt/lua/lib -llua5.4 -mmacosx-version-min=13.3 -fstack-protector-strong -L/opt/homebrew/opt/perl/lib/perl5/5.36/darwin-thread-multi-2level/CORE -lperl -L/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/config-3.11-darwin -lpython3.11 -framework CoreFoundation -lruby.3.2 -L/opt/homebrew/Cellar/ruby/3.2.2/lib 

Output of YcmDebugInfo

Printing YouCompleteMe debug information...
-- Resolve completions: Up front
-- Client logfile: /var/folders/hj/9pmw116x6y5bx341rr0ns27w0000gn/T/ycm__6320hjg.log
-- Server Python interpreter: /Users/benchatterton/.pyenv/versions/3.10.8/Library/Frameworks/Python.framework/Versions/3.10/bin/python
-- Server Python version: 3.10.8
-- Server has Clang support compiled in: True
-- Clang version: clang version 16.0.1 (https://github.com/ycm-core/llvm f6d8fd76462bf638dd3368ddb7f60a23f82e8bad)
-- Extra configuration file found and loaded
-- Extra configuration path: /Users/benchatterton/.vim/bundle/YouCompleteMe/.ycm_extra_conf.py
-- Python completer debug information:
--   Python interpreter: /Users/benchatterton/.vim/bundle/YouCompleteMe/.venv/bin/python
--   Python root: /Users/benchatterton/.vim/bundle/YouCompleteMe
--   Python path: ['/Users/benchatterton/.vim/bundle/YouCompleteMe/python', '/Users/benchatterton/.vim/bundle/YouCompleteMe/third_party/requests-futures', '
/Users/benchatterton/.vim/bundle/YouCompleteMe/third_party/ycmd', '/Users/benchatterton/.vim/bundle/YouCompleteMe/third_party/requests_deps/idna', '/Users/b
enchatterton/.vim/bundle/YouCompleteMe/third_party/requests_deps/chardet', '/Users/benchatterton/.vim/bundle/YouCompleteMe/third_party/requests_deps/urllib3
/src', '/Users/benchatterton/.vim/bundle/YouCompleteMe/third_party/requests_deps/certifi', '/Users/benchatterton/.vim/bundle/YouCompleteMe/third_party/reque
sts_deps/requests', '/opt/homebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python310.zip', '/opt/homebrew/Cellar/python@3.1
0/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10', '/Users/benchatterton/.vim/bundle/YouCompleteMe/third_party/python-future/src', '/opt/h
omebrew/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10/lib-dynload', '/Users/benchatterton/.vim/bundle/YouCompleteMe/.v
env/lib/python3.10/site-packages', '/opt/homebrew/opt/python-tk@3.10/libexec']
--   Python version: 3.10.11
--   Jedi version: 0.18.2
--   Parso version: 0.8.3
-- Server running at: http://127.0.0.1:51771
-- Server process ID: 66432
-- Server logfiles:
--   /var/folders/hj/9pmw116x6y5bx341rr0ns27w0000gn/T/ycmd_51771_stdout_qnp_ncyn.log
--   /var/folders/hj/9pmw116x6y5bx341rr0ns27w0000gn/T/ycmd_51771_stderr_o65znoxn.log
-- Semantic highlighting supported: True
-- Virtual text supported: True
-- Popup windows supported: True

Output of YcmDiags

No warnings or errors detected.

Output of git rev-parse HEAD in YouCompleteMe installation directory

f09c2f69f7fe4d6adf64396a5daa2736714f67a0
(YouCompleteMe) 

Contents of YCM, ycmd and completion engine logfiles

Link to my gist containing all of the log files listed by :YcmToggleLogs.

OS version, distribution, etc.

MacOS Ventura 13.4.1 (c), Apple silicon

@puremourning puremourning added bug PR Welcome A good quality PR for this feature would be considered. labels Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug PR Welcome A good quality PR for this feature would be considered.
Projects
None yet
Development

No branches or pull requests

2 participants