Coder Social home page Coder Social logo

ddc-nvim-lsp-doc's People

Contributors

matsui54 avatar shougo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

delphinus shougo

ddc-nvim-lsp-doc's Issues

Float window not closing

When I open parenthesis for a function the float pops up as expected but then it never goes away. I expected the float to go away when I closed parenthesis for the function or escape out of edit mode.

image

float foo(int a, double b)
{
  return 1.f;
}

int main(int, char**)
{
  if(foo(1,2) 
  {
    return 1;
  }
  return 0;
}
  • latest version of all plugins (called dein#update() before testing)
  • checkhealth reports no problems (except missing python 2)
  • Arch Linux (freshly updated)
  • nvim info
NVIM v0.6.1
LuaJIT 2.0.5
  • init.vim
" .#vimrc
if &compatible
  set nocompatible
endif

set runtimepath+=~/.cache/dein/repos/github.com/Shougo/dein.vim
call dein#begin('~/.cache/dein')

call dein#add('~/.cache/dein/repos/github.com/Shougo/dein.vim')
call dein#add('Shougo/ddc-nvim-lsp')
call dein#add('Shougo/ddc.vim')
call dein#add('matsui54/ddc-nvim-lsp-doc')
call dein#add('neovim/nvim-lspconfig')
call dein#add('vim-denops/denops.vim')
call dein#end()
call dein#save_state()

call ddc#enable()
call ddc_nvim_lsp_doc#enable()
lua require('lspconfig').clangd.setup{cmd={'clangd'}}

Support denops restart

If denops.vim crashed, ddc-nvim-lsp-doc does not work like this.

スクリーンショット_2021-09-18_14-51-40

I think the restart should be supported.

Some language server return 0 instead of falsy value

I noticed bash-language-server returns 0 for textDocument/signatureHelp when it has failed. Then ddc-nvim-lsp-doc show errors.

[denops] error: Uncaught (in worker "ddc_nvim_lsp_doc") (in promise) Error: Failed to call 'call' with ["luaeval","require('ddc_nvim_lsp_doc.helper').get_signature_help(_A.arg)",{"arg":{"col":6}}]: Error: Failed to call 'nvim_call_function' with ["luaeval",["require('ddc_nvim_lsp_doc.helper').get_signature_help(_A.arg)",{"arg":{"col":6}}]]: [0,"Vim:E5108: Error executing lua /root/local/nvim/share/nvim/runtime/lua/vim/lsp/util.lua:853: attempt to index local 'signature_help' (a number value)"]
[denops]     at Session.call (https://deno.land/x/[email protected]/session.ts:207:13)
[denops]     at async Service.call (file:///root/.local/share/nvim/site/pack/packer/start/denops.vim/denops/@denops-private/service.ts:96:65)
[denops]     at async Session.call (file:///root/.local/share/nvim/site/pack/packer/start/denops.vim/denops/@denops-private/service.ts:70:25)
[denops]     at async Session.dispatch (https://deno.land/x/[email protected]/session.ts:98:6)
[denops]     at async https://deno.land/x/[email protected]/session.ts:108:15
[denops]     at async Session.handleRequest (https://deno.land/x/[email protected]/session.ts:104:25)
[denops]       throw new Error(
[denops]             ^
[denops]     at Session.call (https://deno.land/x/[email protected]/session.ts:207:13)
[denops]     at async DenopsImpl.call (file:///root/.local/share/nvim/site/pack/packer/start/denops.vim/denops/@denops/denops.ts:141:65)
[denops] thread 'worker-1' panicked at 'coding error: either js is polling or the worker is terminated', runtime/web_worker.rs:531:9
[denops] note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[denops] thread 'worker-0' panicked at 'dispatch dropped without returning error', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.10/src/client/conn.rs:316:35
[denops] error:
[denops] Uncaught (in promise) Error: Unhandled error event reached main worker.
[denops]     at Worker.#pollControl (deno:runtime/js/11_workers.js:261:23)
[denops] server terminated unexpectedly: 1
Error detected while processing function denops#notify[1]..denops#server#notify:
line    2:
E605: Exception not caught: The server is not ready yet

Reproducible Dockerfile → link

  1. docker run -it --rm ddc-testing
  2. nvim /tmp/hoge.sh
  3. Insert while (
  4. You can see errors with :mes<CR>.

Bug

Please read the diff

diff --git a/autoload/ddc_nvim_lsp_doc.vim b/autoload/ddc_nvim_lsp_doc.vim
index 3ce8548..8c75384 100644
--- a/autoload/ddc_nvim_lsp_doc.vim
+++ b/autoload/ddc_nvim_lsp_doc.vim
@@ -37,7 +37,7 @@ endfunction
 function! s:denops_running() abort
   return exists('g:loaded_denops')
         \ && denops#server#status() ==# 'running'
-        \ && denops#plugin#is_loaded('ddc')
+        \ && denops#plugin#is_loaded('ddc_nvim_lsp_doc')
 endfunction

 function! ddc_nvim_lsp_doc#notify(method, arg) abort

Incorrect syntax highlighting in preview window with vimtex plugin

Thank you for your work. While writing latex , I found that the plugin does not display Vsnip code correctly in the floating window when vimtex is loaded

minimal.vim

if &compatible
    set nocompatible               " Be iMproved
endif
set runtimepath+=~/.cache/nvim/dein/repos/github.com/Shougo/dein.vim
let s:dein_path = $HOME . '/.cache/nvim/dein'
let g:dein#auto_recache = 1
call dein#begin(s:dein_path)
call dein#add('~/.cache/nvim/dein/repos/github.com/Shougo/dein.vim')
call dein#add('vim-denops/denops.vim')
call dein#add('Shougo/ddc.vim')
call dein#add('Shougo/ddc-matcher_head')
call dein#add('Shougo/ddc-sorter_rank')
call dein#add('Shougo/ddc-nvim-lsp')
call dein#add('matsui54/ddc-nvim-lsp-doc')
call dein#add('lervag/vimtex')
call dein#add('neovim/nvim-lspconfig')
call dein#add('hrsh7th/vim-vsnip')
call dein#add('hrsh7th/vim-vsnip-integ')
call dein#add('rafamadriz/friendly-snippets')
call dein#end()
call dein#call_hook('source')
call dein#call_hook('post_source')
" Required:
filetype plugin indent on
syntax enable
set background=light

call ddc#custom#patch_global('sources',
    \ [ 'nvim-lsp','vsnip'],
    \ )
call ddc#custom#patch_global('sourceOptions', {
    \ '_': {
    \   'ignoreCase': v:true,
    \   'matchers': ['matcher_head'],
    \   'sorters': ['sorter_rank'],
    \ },
    \ 'nvim-lsp': {
    \   'mark': 'LSP',
    \   'isVolatile': v:true,
    \   'minAutoCompleteLength': 1,
    \   'forceCompletionPattern': '\.\w*|:\w*|->\w*|\\\w*'
    \ },
    \ 'vsnip': {
    \   'mark': 'Vsnip',
    \   'dup': v:true
    \ },
    \ })

" autocmd CompleteDone * silent! pclose!
call ddc#enable()
call ddc_nvim_lsp_doc#enable()
autocmd BufRead,BufNewFile *.tex set filetype=tex
" autocmd FileType tex set syn=tex
set completeopt-=preview
lua << EOF
    require'lspconfig'.clangd.setup{}
    require'lspconfig'.texlab.setup{}
EOF

Steps to Reproduce

  1. nvim -u minimal.vim test.tex
  2. type \fig

screenshot

Snipaste_2021-09-30_08-16-21

Floating window not displaying

I tried adding this plugin to my configuration for neovim (0.5.1) with ddc, but it doesnt seem to work. When I try to complete a call to a c++ stl function (such as vector.push_back()), there is nothing displayed besides the completion suggestions window
Here is my full config: http://paste.awesom.eu/bNiJ

[BUG] about ddc_nvim_lsp_doc#enable_signaturehelp

Hi,

I tried setting this global variable to 0:

let g:ddc_nvim_lsp_doc#enable_signaturehelp = 0

I also tried setting it directly here:

let g:ddc_nvim_lsp_doc_config = {
        \ 'documentation': {
        \   'enable': v:true,
        \ },
        \ 'signature': {
        \   'enable': v:false,
        \ },
        \ }

, however it still shows the signature help. I checked for the variable in the code and is does not seem to be referenced anywhere. It is implemented?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.