Skip to content

Commit 8f6e246

Browse files
committed
Merge branch 'master' of https://github.com/Quramy/tsuquyomi
2 parents 4ae6146 + 144526d commit 8f6e246

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

autoload/tsuquyomi.vim

+4-4
Original file line numberDiff line numberDiff line change
@@ -497,13 +497,13 @@ function! tsuquyomi#gotoDefinition(tsClientFunction, splitMode)
497497
call cursor(l:info.start.line, l:info.start.offset)
498498
elseif l:definition_split == 0
499499
call tsuquyomi#bufManager#winPushNavDef(bufwinnr(bufnr('%')), l:file, {'line': l:line, 'col': l:offset})
500-
execute 'edit +call\ cursor('.l:info.start.line.','.l:info.start.offset.') '.l:info.file
500+
execute 'edit +call\ cursor('.l:info.start.line.','.l:info.start.offset.') '.fnameescape(l:info.file)
501501
elseif l:definition_split == 1
502-
execute 'split +call\ cursor('.l:info.start.line.','.l:info.start.offset.') '.l:info.file
502+
execute 'split +call\ cursor('.l:info.start.line.','.l:info.start.offset.') '.fnameescape(l:info.file)
503503
elseif l:definition_split == 2
504-
execute 'vsplit +call\ cursor('.l:info.start.line.','.l:info.start.offset.') '.l:info.file
504+
execute 'vsplit +call\ cursor('.l:info.start.line.','.l:info.start.offset.') '.fnameescape(l:info.file)
505505
elseif l:definition_split == 3
506-
execute 'tabedit +call\ cursor('.l:info.start.line.','.l:info.start.offset.') '.l:info.file
506+
execute 'tabedit +call\ cursor('.l:info.start.line.','.l:info.start.offset.') '.fnameescape(l:info.file)
507507
endif
508508
else
509509
" If don't get result, do nothing.

autoload/tsuquyomi/es6import.vim

+5
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ function! s:removeTSExtensions(path)
157157
let l:path = substitute(l:path, '\.tsx$', '', '')
158158
let l:path = substitute(l:path, '^@types/', '', '')
159159
let l:path = substitute(l:path, '/index$', '', '')
160+
if g:tsuquyomi_javascript_support == 1
161+
let l:path = substitute(l:path, '\.d\.js$', '', '')
162+
let l:path = substitute(l:path, '\.js$', '', '')
163+
let l:path = substitute(l:path, '\.jsx$', '', '')
164+
endif
160165
return l:path
161166
endfunction
162167

0 commit comments

Comments
 (0)