Skip to content

Clarification regarding textDocument/signatureHelp #130

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

Closed
grcruz opened this issue Sep 18, 2017 · 1 comment
Closed

Clarification regarding textDocument/signatureHelp #130

grcruz opened this issue Sep 18, 2017 · 1 comment

Comments

@grcruz
Copy link

grcruz commented Sep 18, 2017

Hi, apologies if I'm missing something very basic but I don't understand how to enable function signatures. I've tried both deoplete and nvim-completion-manager with both python-language-server and eclipse-jdt-ls, both of which I'm sure support signature help.

Based on #105 I thought the function signature was supposed to be sent in the detail/info fields, however doing some logging in rplugin/python3/deoplete/sources/LanguageClientSource.py showed that none of the fields of the items sent to the deoplete source contained signatures.

Upon further reading it seems like function signatures are handled by a entirely separate event textDocument/signatureHelp which is triggered by either '(' or ',' however (as seen in the logs) the event did not go off.

What am I misunderstanding? Apologies again and thanks in advance.

Required information

  • Neovim version: NVIM v0.2.1-816-g46a4099df
  • Plugin version: 88430f5
  • Minimal init.vim
call plug#begin('~/.local/share/nvim/plugged')

Plug 'autozimu/LanguageClient-neovim', { 'do': ':UpdateRemotePlugins' }
Plug 'Shougo/deoplete.nvim'

call plug#end()

autocmd BufReadPost *.py setlocal filetype=python
let g:LanguageClient_serverCommands = {
    \ 'python': ['pyls'],
    \ }
let g:deoplete#enable_at_startup=1
  • CheckHealth
health#deoplete#check
========================================================================
## deoplete.nvim
  - SUCCESS: has("nvim") was successful
  - SUCCESS: has("python3") was successful
  - INFO: If you're still having problems, try the following commands:
    $ export NVIM_PYTHON_LOG_FILE=/tmp/log
    $ export NVIM_PYTHON_LOG_LEVEL=DEBUG
    $ nvim
    $ cat /tmp/log_{PID}
    and then create an issue on github

health#nvim#check
========================================================================
## Configuration
  - SUCCESS: no issues found

## Performance
  - SUCCESS: Build type: RelWithDebInfo

## Remote Plugins
  - SUCCESS: Up to date

## terminal
  - INFO: key_backspace (kbs) terminfo entry: key_backspace=\177
  - INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~

health#provider#check
========================================================================
## Clipboard (optional)
  - SUCCESS: Clipboard tool found: xsel

## Python 2 provider (optional)
  - INFO: `g:python_host_prog` is not set.  Searching for python2 in the environment.
  - INFO: Executable: /usr/bin/python2
  - INFO: Python2 version: 2.7.13
  - INFO: python2-neovim version: 0.1.14dev
  - SUCCESS: Latest python2-neovim is installed: 0.1.13

## Python 3 provider (optional)
  - INFO: `g:python3_host_prog` is not set.  Searching for python3 in the environment.
  - INFO: Executable: /usr/bin/python3
  - INFO: Python3 version: 3.6.2
  - INFO: python3-neovim version: 0.1.14dev
  - SUCCESS: Latest python3-neovim is installed: 0.1.13

## Ruby provider (optional)
  - WARNING: `ruby` and `gem` must be in $PATH.
    - SUGGESTIONS:
      - Install Ruby and verify that `ruby` and `gem` commands work.
  • Content of ~/.local/share/nvim/rplugin.vim.
" python3 plugins
call remote#host#RegisterPlugin('python3', '/home/greg/.local/share/nvim/plugged/LanguageClient-neovim/rplugin/python3/LanguageClient', [
      \ {'sync': v:true, 'name': 'LanguageClient_alive', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': 'LanguageClient_call', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': 'LanguageClient_completionItem/resolve', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': 'LanguageClient_completionManager_refresh', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': 'LanguageClient_exit', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': 'LanguageClient_FZFSinkTextDocumentDocumentSymbol', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': 'LanguageClient_FZFSinkTextDocumentReferences', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': 'LanguageClient_FZFSinkWorkspaceSymbol', 'type': 'function', 'opts': {}},
      \ {'sync': v:true, 'name': 'LanguageClient_getState', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': 'BufReadPost', 'type': 'autocmd', 'opts': {'pattern': '*', 'eval': '{''languageId'': &filetype, ''filename'': expand(''%:p'')}'}},
      \ {'sync': v:false, 'name': 'BufWritePost', 'type': 'autocmd', 'opts': {'pattern': '*', 'eval': '{''languageId'': &filetype, ''filename'': expand(''%:p'')}'}},
      \ {'sync': v:false, 'name': 'CursorMoved', 'type': 'autocmd', 'opts': {'pattern': '*', 'eval': '[&buftype, line(''.'')]'}},
      \ {'sync': v:false, 'name': 'TextChanged', 'type': 'autocmd', 'opts': {'pattern': '*', 'eval': '{''filename'': expand(''%:p''), ''buftype'': &buftype}'}},
      \ {'sync': v:false, 'name': 'TextChangedI', 'type': 'autocmd', 'opts': {'pattern': '*', 'eval': '{''filename'': expand(''%:p''), ''buftype'': &buftype}'}},
      \ {'sync': v:false, 'name': 'LanguageClient_initialize', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': 'LanguageClient_notify', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': 'LanguageClient_registerServerCommands', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': 'LanguageClient_rustDocument_implementations', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': 'LanguageClient_setLoggingLevel', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': 'LanguageClientStart', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
      \ {'sync': v:false, 'name': 'LanguageClientStop', 'type': 'command', 'opts': {}},
      \ {'sync': v:false, 'name': 'LanguageClient_textDocument_completion', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': 'LanguageClient_textDocument_completionOmnifunc', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': 'LanguageClient_textDocument_definition', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': 'LanguageClient_textDocument_didClose', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': 'LanguageClient_textDocument_documentSymbol', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': 'LanguageClient_textDocument_formatting', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': 'LanguageClient_textDocument_hover', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': 'LanguageClient_textDocument_rangeFormatting', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': 'LanguageClient_textDocument_references', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': 'LanguageClient_textDocument_rename', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': 'LanguageClient_textDocument_signatureHelp', 'type': 'function', 'opts': {}},
      \ {'sync': v:false, 'name': 'LanguageClient_workspace_symbol', 'type': 'function', 'opts': {}},
     \ ])
call remote#host#RegisterPlugin('python3', '/home/greg/.local/share/nvim/plugged/deoplete.nvim/rplugin/python3/deoplete', [
      \ {'sync': v:false, 'name': '_deoplete', 'type': 'function', 'opts': {}},
     \ ])

" ruby plugins

" python plugins
@autozimu
Copy link
Owner

As far as I know, textDocument/signatureHelp is not used by this plugin, nor echodoc.

echodoc works by take property of the completion item after a completion is finished, and currently has nothing to do with textDocument/signatureHelp.

Of course, you can call the function directly with :call LanguageClient_textDocument_signatureHelp(), or with a shortcut suits you need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants