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?

1 Answer 1

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()
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.