company-tabnine icon indicating copy to clipboard operation
company-tabnine copied to clipboard

Support starting TabNine through a wrapper script

Open Schnouki opened this issue 2 years ago • 1 comments

Hi there,

I'd like to run TabNine through a wrapper script, to change a few things:

  • limit max CPU and memory that can be used by TabNine
  • adjust OOM score so that the Linux OOM kills TabNine instead of my web browser when I'm running tests that use tons of Docker containers...

Right now it's not easy to do. Would it be possible to change the way that TabNine is started so that it's easier to override? Thanks!

Schnouki avatar Dec 02 '21 13:12 Schnouki

The code looks in company-tabnine-binaries-folder for an executable file named TabNine. I haven't tested, but I expect you should be able to create a different folder with a wrapper which then redirects to the real thing after setting things up the way you like.

(This seems rather clunky; it would be nice if there was a customizable variable that let you simply name the binary you want to run. company-tabnine--get-exe hardcodes the name of the binary - on Windows, it's TabNine.exe, while on real computers it's TabNine - but you could override or advise that function, I suppose.)

fsc-eriker avatar Oct 09 '23 05:10 fsc-eriker