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

references in Denite only contains filename and line number.

Open d0u9 opened this issue 3 years ago • 3 comments

Describe the bug

Running :Denite references in nvim's command line only shows file and line number but no other information about line contents.

For example, running :call LanguageClient#textDocument_references can correctly obtains references as below:

xxx/server/server.go|60 col 18 n| func (s *server) Start() {
xxx/app/app.go|69 col 13 n| app.server.Start()

However, by running :Denite references, only file name are displayed:

xxx/server/server.go:60:18 
xxx/app/app.go:69:13 

Environment

  • neovim/vim version (nvim --version or vim --version): NVIM v0.4.4 installed via homebrew on MacOS
  • This plugin version (git rev-parse --short HEAD): a42594c
  • This plugin's binary version (bin/languageclient --version): languageclient 0.1.161
  • Minimal vimrc content (A minimal vimrc is the smallest vimrc that could reproduce the issue. Refer to an example here): min-vimr.vim doesn't contains Denite
  • Language server link and version:

To Reproduce

Steps to reproduce the behavior:

As described in previous section.

Current behavior

Not show line contents.

Expected behavior

Show line contents

Screenshots

No

Additional context

No

d0u9 avatar May 13 '21 09:05 d0u9

So, any update?

d0u9 avatar May 21 '21 06:05 d0u9

Sorry for the delayed response. I'm not able to test this right now, but if you are feeling adventurous you could try changing this line: https://github.com/autozimu/LanguageClient-neovim/blob/a42594c9c320b1283e9b9058b85a8097d8325fed/rplugin/python3/denite/source/references.py#L69 to this: text = self.vim.funcs.getbufline(filepath, line)

Let me know if it helped if you do try it and we can arrange a PR for that.

martskins avatar May 27 '21 22:05 martskins

Hello martskins, I patched that line and nvim failed to response anything after invoking Denite references. It seems that nvim stacks in busy loop and CPU usage of nvim surges to 100%.

d0u9 avatar May 28 '21 03:05 d0u9