Skip to content

Commit

Permalink
feat(json): support goto json file.
Browse files Browse the repository at this point in the history
  • Loading branch information
hotoo committed Sep 21, 2016
1 parent 052fba3 commit c107331
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Imporved JavaScript `gf` command.
Support:

* CommonJS (node_modules, package.json:main, /index.js)
* JSON (*.json)
* React (*.jsx)
* TypeScript (*.ts, *.tsx)

Expand Down
3 changes: 2 additions & 1 deletion plugin/jsgf.vim
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ endif
let loaded_jsgf_plugin = 1

function! InitJSGF()
setlocal suffixesadd+=.js,.jsx,.ts,.tsx
setlocal suffixesadd+=.js,.json,.jsx,.ts,.tsx
setlocal isfname+=@-@
" setlocal includeexpr=v:fname.'/index'
let node_modules = finddir('node_modules', expand('%:p:h') . ';')
Expand All @@ -22,6 +22,7 @@ function! FindFileOrDir(filename)
let filenames = [
\ a:filename,
\ a:filename . '.js',
\ a:filename . '.json',
\ a:filename . '.jsx',
\ a:filename . '.ts',
\ a:filename . '.tsx'
Expand Down

0 comments on commit c107331

Please sign in to comment.