LanguageClient-neovim icon indicating copy to clipboard operation
LanguageClient-neovim copied to clipboard

textDocument_references doesn't seem to work in the whole project

Open stephanos-lyst opened this issue 5 years ago • 4 comments

Describe the bug

Environment

  • neovim/vim version (nvim --version or vim --version): NVIM v0.3.4 Build type: Release LuaJIT 2.0.5 Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wconversion -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -Wno-array-bounds -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim/src/build/config -I/build/neovim/src/neovim-0.3.4/src -I/usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neovim/src/build/include Compiled by builduser

Features: +acl +iconv +jemalloc +tui See ":help feature-compile"

system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

  • This plugin version (git rev-parse --short HEAD): 75c7280
  • This plugin's binary version (bin/languageclient --version): languageclient 0.1.136
  • Minimal vimrc content (A minimal vimrc is the smallest vimrc that could reproduce the issue. Refer to an example here): call plug#begin('~/.local/share/nvim/plugged') Plug 'autozimu/LanguageClient-neovim', { \ 'branch': 'next', \ 'do': 'bash install.sh', \ } call plug#end()

let g:LanguageClient_serverCommands = {'python': ['/usr/bin/pyls']}

  • Language server link and version: https://github.com/palantir/python-language-server

To Reproduce

Steps to reproduce the behavior: Create the following structure src ├── one │   ├── init.py │   └── first.py └── two ├── init.py └── second.py

Current behavior

If I import something from one.first to two.second, in two.second, LanguageClient#textDocument_definition() will send me to the definition in one.first, but from the place where it is defined, LanguageClient#textDocument_references() will only show me the references in the same file.

Expected behavior

I was expecting to find all the references in the whole project

stephanos-lyst avatar Jan 31 '19 12:01 stephanos-lyst

What is the project root echoed when you open one of the file?

autozimu avatar Mar 15 '19 23:03 autozimu

I'm suspecting the project root might be detected as one or two when it should be src.

autozimu avatar Mar 15 '19 23:03 autozimu

The project root is actually src. Actually, the references found are only the ones in the same directory, not in the nested ones or the siblings.

stephanos-lyst avatar May 21 '19 14:05 stephanos-lyst

The same. References are not complete out of the box. Jumping to definition works ok and renaming works ok as well.

Is additional configuration necessary? What additional information do you require?

P.S. Great job on the client.

LukaK avatar Oct 20 '19 16:10 LukaK