Skip to content
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

(Pyls, Jedi language server, Pyright) + diagnosticls not showing preview window #414

Closed
sjeon7 opened this issue Nov 18, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@sjeon7
Copy link

sjeon7 commented Nov 18, 2020

  • nvim --version: NVIM v0.5.0-844-g8c4648421
  • nvim-lsp version(commit hash): 4f19567
  • :checkhealth result
health#lspconfig#check
========================================================================
## Checking language server protocol configuration
  - INFO: diagnosticls: configuration checked.
  - INFO: pyright: configuration checked.

health#completion_nvim#check
========================================================================
## general
  - OK: neovim version is supported

## completion source
  - OK: all completion source are valid

## snippet source
  - INFO: You haven't setup any snippet source.

  • What language server(If the problem is related to a specific language server):
    Python language servers (Pyls, Jedi language server, Pyright) and diagnosticls

  • Operating system/version:
    Ubuntu 18.04 LTS

How to reproduce the problem from neovim startup

  1. With minimal init.vim below
  2. All the language server installed
  3. Any python linter installed (flake8 is used but it can be pylint or any other linter)
  4. Open python file and preview window is not showing
all plug#begin() 
    Plug 'neovim/nvim-lspconfig'
    Plug 'nvim-lua/completion-nvim'
call plug#end()

function! s:check_back_space() abort
    let col = col('.') - 1
    return !col || getline('.')[col - 1]  =~ '\s'
endfunction

inoremap <silent><expr> <TAB>
    \ pumvisible() ? "\<C-n>" :
    \ <SID>check_back_space() ? "\<TAB>" :
    \ completion#trigger_completion()
inoremap <expr> <S-TAB> pumvisible() ? "\<C-p>" : "\<S-TAB>"

" Set completeopt to have a better completion experience
set completeopt=menuone,noinsert,noselect

lua<<EOF
local lspconfig = require('lspconfig')

local on_attach = function(_, bufnr)
  vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
  require'completion'.on_attach()
end

lspconfig['pyright'].setup{
    on_attach = on_attach,
}
lspconfig.diagnosticls.setup {
  filetypes = { "python" },
  init_options = {
    filetypes = {
      python = {"flake8"},
    },
    linters = {
      flake8 = {
        debounce = 100,
        sourceName = "flake8",
        command = "flake8",
        args = {
          "--format",
          "%(row)d:%(col)d:%(code)s:%(code)s: %(text)s",
          "%file",
        },
        formatPattern = {
          "^(\\d+):(\\d+):(\\w+):(\\w).+: (.*)$",
          {
              line = 1,
              column = 2,
              message = {"[", 3, "] ", 5},
              security = 4
          }
        },
        securities = {
          E = "error",
          W = "warning",
          F = "info",
          B = "hint",
        },
      },
    },
  }
}
EOF

Actual behaviour

Without diagnosticls, preview window pops up well.
스크린샷 2020-11-18 오후 10 07 03

After setting diagnosticls, preview window is not showing.
스크린샷 2020-11-18 오후 10 08 27

Other functionalities such as showing diagnostic, code completion etc. work but preview window is not showing.
I have tested with Pyls, Jedi LS, Pyright with diagnosticls, and all of them failed to show preview window. I also tested Nvim-completion and Deoplete which both completion manager have identical issue.

Expected behaviour

Language server should hover preview window even with diagnosticls.

@sjeon7 sjeon7 added the bug Something isn't working label Nov 18, 2020
@sjeon7
Copy link
Author

sjeon7 commented Nov 19, 2020

nvim-lua/completion-nvim#279
This PR fixes this. I think this issue can be closed after the PR is merged.

@sjeon7 sjeon7 closed this as completed Nov 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant