deoplete-plugins / deoplete-jedi

deoplete.nvim source for Python
MIT License
588 stars 40 forks source link

Dont add parameter-information to functions #264

Closed astier closed 4 years ago

astier commented 4 years ago

I didn't fill out all of the required information because its just a feature request. But can do so if necessary.

The completion-matches of kind function have the parameters attached to them. Examples can be seen in the first screenshot for the functions access and add_dll_directory. Is it possible remove them? I want to save some space and make the completions more compact.

Turn this:

2020-08-05-131714_528x124_scrot

into something like this:

2020-08-05-131622_233x125_scrot

Shougo commented 4 years ago

:help converter_remove_paren

                *deoplete-filter-converter_remove_paren*
converter_remove_paren
        It removes parentheses character in a candidate's word.
astier commented 4 years ago

It doesn't work. I am using NVIM v0.5.0-622-gf26df8bb6. Here is my minimal vimrc:

cal plug#begin($XDG_DATA_HOME.'/nvim/plugins')
    Plug 'deoplete-plugins/deoplete-jedi'
    Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
cal plug#end()
let g:deoplete#enable_at_startup = 1
cal deoplete#custom#source('_', 'converters', ['converter_remove_paren'])

Here is what I get:

2020-08-06-030124_527x142_scrot

I am talking about not displaying paranthesis and the parameters in the pummenu. access(path: _FdOrPathType, mode: int, ...) should be just access.

Also I did read your documentation. But I always understood converter_remove_paren such that it would prevent deoplete from auto-inserting paranthesis after selecting a completion. Also when I read your FAQ which refers to the following issue thats how I understood it https://github.com/Shougo/deoplete.nvim/issues/150

Shougo commented 4 years ago

OK. I get it. converter_remover_paren is for word attr only. I will add new converter for it.

Shougo commented 4 years ago

I have added converter_word_abbr.

call deoplete#custom#source('jedi', 'converters', ['converter_word_abbr'])
astier commented 4 years ago

Thank you. It works. Except for one minor bug. In combination with converter_auto_paren the wrong order of both converters appends one ( at the end of functions in the pummenu. The following setting:

cal deoplete#custom#source('jedi', 'converters', [
    \'converter_auto_paren',
    \'converter_word_abbr',
\])

produces this:

2020-08-06-134521_324x147_scrot

access( should be access. If you switch the order of both converters it works correctly:

cal deoplete#custom#source('jedi', 'converters', [
    \'converter_word_abbr',
    \'converter_auto_paren',
\])
Shougo commented 4 years ago

Except for one minor bug. In combination with converter_auto_paren the wrong order of both converters appends one ( at the end of functions in the pummenu.

It is not bug. You should understand what you do. converter_auto_paren changes word and converter_word_abbr change abbr to word. It is expected behavior!