carlitux / deoplete-ternjs

deoplete.nvim source for javascript
MIT License
277 stars 24 forks source link

.tern-porn file is created not in project directory, but in current file parent directory #42

Closed yacut closed 7 years ago

yacut commented 7 years ago

I have a big javascript project with a lot of directories and files. And every time when I open a file, the .tern-port file is created in the parent directory. So I always have multiple tern servers running, but want only one :)

My configs:

let g:deoplete#enable_at_startup = 1
let g:tern_show_signature_in_pum = 1
let g:tern#command = ["tern"]
let g:tern#arguments = ["--persistent"]
let g:tern_request_timeout = 1
carlitux commented 7 years ago

I have same kind of projects and only running one tern server running.

yacut commented 7 years ago

I may have found the reason. This happens when I have no project config (.tern-project), but global (~/.tern-config). Could it be a problem?

carlitux commented 7 years ago

Really that is the reason, not the problem.

If you have a global config there is no way to know where your project start. As many users use vim in different ways. The only required is to define .tern-project.

Maybe we can force the project directory on cwd when no .tern-project found but still not sure.

yacut commented 7 years ago

I would like first to see a hint that no .tern-project found (e.g. in :messages). Anyway, thanks a lot for your help.