I have a program that I run on a file and the output of the program is a line number. If I save this line number in a temporary file, can I get vim to automatically highlight or underline this word/line like a linter would?

What's the easiest way to do this without plugins?

I was thinking, if possible, to have a file watcher, but I'm not sure how I could link this up to neovim.

  • You could look at text properties to highlight. But if your goal is to jump to those locations, I would use the quickfix or location list
    – D. Ben Knoble
    Jan 15 at 13:42
  • @D.BenKnoble, goal is not to jump to those locations, just highlight them like a linter would highlight an unused variable
    – libby
    Jan 15 at 22:51
  • I would suggest trying to integrate with something like ALE, then, but text properties are the best bet for building something solo
    – D. Ben Knoble
    Jan 16 at 14:28
  • I figured out, I think, that all I need is a python scripts with pynvim that watches file changes and communicates with vim in response. Is there a proper way to make this filewatcher asynchronously? First search brings up the python package watchdog
    – libby
    Jan 16 at 19:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.