()
| 30 | tern_killServer(self) |
| 31 | |
| 32 | def tern_projectDir(): |
| 33 | cur = vim.eval("b:ternProjectDir") |
| 34 | if cur: return cur |
| 35 | |
| 36 | projectdir = "" |
| 37 | mydir = vim.eval("expand('%:p:h')") |
| 38 | if not os.path.isdir(mydir): return "" |
| 39 | |
| 40 | if mydir: |
| 41 | projectdir = mydir |
| 42 | while True: |
| 43 | parent = os.path.dirname(mydir[:-1]) |
| 44 | if not parent: |
| 45 | break |
| 46 | if os.path.isfile(os.path.join(mydir, ".tern-project")): |
| 47 | projectdir = mydir |
| 48 | break |
| 49 | mydir = parent |
| 50 | |
| 51 | vim.command("let b:ternProjectDir = " + json.dumps(projectdir)) |
| 52 | return projectdir |
| 53 | |
| 54 | def tern_findServer(ignorePort=False): |
| 55 | dir = tern_projectDir() |
no outgoing calls
no test coverage detected