1

In neovim, when my completion plugin is triggered, it will print out the methods signature in a preview window

enter image description here

The preview window though, contains line numbers which is something I want to disable. So far, I though this would work

function! Preview_func()
  if &pvw
    setlocal nonum
   endif
endfunction

autocmd * BufCreate call Preview_func()

But no dice. Any ideas?

mhartington
  • 6,905
  • 4
  • 40
  • 75

1 Answers1

3

In autocommand definition file pattern ( here: * ) should come after event ( BufCreate ); also base on which autocompletion plugin you are using there may be an entrance to preview window or not so also check with WinEnter event:

autocmd WinEnter * call Preview_func()
dNitro
  • 5,145
  • 2
  • 20
  • 45