Skip to content

Commit b71551e

Browse files
author
Phan Thanh Cong
committed
support unsaved buffers
1 parent a6b6530 commit b71551e

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Tern.sublime-settings

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"tern_argument_hints": false,
33
"tern_output_style": "tooltip",
4-
"tern_argument_completion": false
4+
"tern_argument_completion": false,
5+
// Used to get auto completion for unsaved buffers
6+
// By default, this folder is inside Packages/tern_for_sublime/
7+
"tern_default_project_dir": "default_project_dir"
58
}

default_project_dir/.gitkeep

Whitespace-only changes.

tern.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ def __del__(self):
9393
def get_pfile(view):
9494
if not is_js_file(view): return None
9595
fname = view.file_name()
96-
if fname is None: return None
96+
if fname is None:
97+
fname = os.path.join(os.path.dirname(__file__), get_setting("tern_default_project_dir", "default_project_dir"), "tmp")
9798
if fname in files:
9899
pfile = files[fname]
99100
if pfile.project.disabled: return None

0 commit comments

Comments
 (0)