In neovim, when my completion plugin is triggered, it will print out the methods signature in a preview window
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?
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()