Skip to content

Commit

Permalink
fix ncm2/ncm2#190, add option ncm2_jedi#callsig_hint
Browse files Browse the repository at this point in the history
  • Loading branch information
roxma committed Aug 6, 2020
1 parent b28bf6d commit d378d3e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,9 @@ Defaults to `{}`.

Read [jedi-settings](https://jedi.readthedocs.io/en/latest/docs/settings.html)
for more information.

### `g:ncm2_jedi#call_sig_hint`

Defaults to `1`

Set it to 0 [to disable function argument hint](https://github.com/ncm2/ncm2/issues/190)
4 changes: 4 additions & 0 deletions autoload/ncm2_jedi.vim
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ let g:ncm2_jedi#settings = get(g:,
\ 'ncm2_jedi#settings',
\ {})

let g:ncm2_jedi#call_sig_hint = get(g:,
\ 'ncm2_jedi#call_sig_hint',
\ 1)

if g:ncm2_jedi#python_version != 2
let g:ncm2_jedi#proc = yarp#py3('ncm2_jedi')
else
Expand Down
5 changes: 5 additions & 0 deletions pythonx/ncm2_jedi.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ def __init__(self, vim):
for name in rc_settings:
setattr(settings, name, rc_settings[name])

self._call_sig_hint = vim.vars['ncm2_jedi#call_sig_hint']

def get_env(self):
return self._env

Expand Down Expand Up @@ -68,6 +70,9 @@ def on_complete(self, ctx, lines):

if callsig_pat.search(typed):

if not self._call_sig_hint:
return

sig_text = ''
sig = None
try:
Expand Down

0 comments on commit d378d3e

Please sign in to comment.