Git Product home page Git Product logo

tsuquyomi's People

Contributors

ajcrites avatar bobrippling avatar dannysu avatar donniewest avatar greenkeeper[bot] avatar gurdiga avatar heavenshell avatar ichizok avatar icholy avatar jasonharrison avatar joshuavial avatar lumakernel avatar m5oul avatar majecty avatar mattn avatar mrpeabody avatar myitcv avatar nickspoons avatar oliverjash avatar ondrowan avatar op avatar pocke avatar quramy avatar rcarraretto avatar remyoudemans avatar rhysd avatar thinca avatar vlebedeff avatar willfrew avatar ymgch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tsuquyomi's Issues

Cannot find interfaces if definition file is in the same path as ts file

Let's say I have a project with the following set up:

app
└── directives
    └── popover
        ├── popover.d.ts
        └── popover.ts

Where popover.ts has some property that uses an interface name (lets call it IPopoverConfig) defined in popover.d.ts.

When I open popover.ts and save, I get an error saying something along the lines of

app/directives/popover/popover.ts|6 col 37 error| Cannot find name 'IPopoverConfig'.

The error is not "real", meaning that with my compile and build tasks, I can get the whole TypeScript app to work without problems. So it seems a bit strange. Especially considering that I have another folder, typings, that is a sibling to app, which contains other definition files that I am using that I'm not getting errors on.

app/
typings
├── some-file.d.ts
└── some-other-file.d.ts

If I include a reference path to popover.d.ts in popover.ts

/// <reference path="./popover.d.ts" />

Everything works fine.

If I move popover.d.ts into my typings directory, everything works fine.
In fact, if I move popover.d.ts into any directory that isn't app/directives/popover, everything works fine.
It seems the only time I get an error complaining about not finding the interfaces defined in popover.d.ts is when it is in the same path as popover.ts.

I'm not sure why this is. I am not sure how tsuquyomi traverses a project directory structure at compile time, but have you ever seen a case where definition files somehow appear "invisible" to the corresponding TypeScript files in the same path unless you include a reference path? Any light you can shed on this would be appreciated greatly.

FWIW, my co-worker using atom-typescript does not seem to have this issue. I would prefer to continue using vim and I love this TypeScript plugin and am thankful for all the work you've done on it, it's just this one thing that's causing a problem. If it's unsolvable for the time being, I can just make sure to have all of my definition files not in the same path as any .ts files using them.

Thanks.

Implement "retry" to request to TSServer

Problem:

  • Call tsOpen .
  • Immediately, call some commands(e.g. tsReferences), vimproc interprets timedout because TSServer is busy to opening the file.

In the present, tsClient return a empty list, but it's undesirable.

In this case, tsClient should wait that the response is returned.

Autocompletion with YouCompleteMe

How to automatically show completion menu without explicitly triggering it with shortcut. YouCompleteMe isn't showing suggestion from tsuquyomi. How can i make both of them work together?

Local tsserver checks for JS instead of script

Right now, tsuquyomi#config#tsscmd() checks for "node_modules/typescript/bin/tsserver.js". In newer releases (1.6+), all JavaScript files will be in typescript/lib and all scripts will be in typescript/bin. Because of this change, tsuquyomi#config#tsscmd() doesn't find a local tsserver.js for the nightlies. tsuquyomi#config#tsscmd() should instead be checking for "node_modules/typescript/bin/tsserver" since it exists in 1.5+ and can be passed to the node executable.

Command :TsuquyomiOpen does not exist?

Running into this error message:

echom '[Tsuquyomi] Buffers ['.join(not_opend, ', ').'] are not opened by TSServer. Please exec command ":TsuquyomiOpen '.join(not_opend).'" and retry.'

Amusingly with the tsconfig.json file opened (several times). But there is no TsuquyomiOpen command available :(

Error coming up with latest release in neovim

Getting an error inside of neovim

Error detected while processing function tsuquyomi#complete..tsuquyomi#tsClient#tsCompletions..tsuquyomi#tsClient#sendCommandSyncResponse..<SNR>222_
decode:
line   17:
E114: Missing quote: "declar
Error detected while processing function tsuquyomi#complete..tsuquyomi#tsClient#tsCompletions..tsuquyomi#tsClient#sendCommandSyncResponse..<SNR>222_
decode:
line   17:
E15: Invalid expression: {"seq":0,"type":"response","command":"completions","request_seq":0,"success":true,"body":[{"name":"AbstractWorker","kind":"
interface","kindModifiers":"declare","sortText":"0"},{"name":"ActiveXObject","kind":"interface","kindModifiers":"declare","sortText":"0"},{"name":"a
ddEventListener","kind":"function","kindModifiers":"declare","sortText":"0"},{"name":"alert","kind":"function","kindModifiers":"declare","sortText":
"0"},{"name":"Algorithm","kind":"interface","kindModifiers":"declare","sortText":"0"},{"name":"AnalyserNode","kind":"interface","kindModifiers":"dec
lare","sortText":"0"},{"name":"ANGLE_instanced_arrays","kind":"interface","kindModifiers":"declare","sortText":"0"},{"name":"AnimationEvent","kind":
"interface","kindModifiers":"declare","sortText":"0"},{"name":"animationStartTime","kind":"var","kindModifiers":"declare","sortText":"0"},{"name":"a
ny","kind":"keyword","kindModifiers":"","sortText":"0"},{"name":"applicationCache","kind":"var","kindModifiers":"declare","sortText":"0"
Error detected while processing function tsuquyomi#complete..tsuquyomi#tsClient#tsCompletions..tsuquyomi#tsClient#getResponseBodyAsList:
line    5:
E715: Dictionary required
Pattern not found

Neovim Version: NVIM 0.0.0-alpha+201510160154 (compiled Oct 17 2015 09:48:05)
OSX 10.11
Iterm 2 nightligh builds.

What other information do you need?

Add the outline feature

Add the outline feature.

Tasks:

  • Implement a client method that calls navbar
  • Implement a extension of unite-outline.

Tries to compile fugitive buffer

I think this plugin tries to compile the file in the fugitive staging buffer somehow and fails badly. It also gets stuck, so I have to <C-C> out of it constantly.

To reproduce, install fugitive, open a file under source control and when editing the file in vim, run :Gvd. Then, edit the staged file by e.g. adding some hunks or making any changes and save the file.

This is the last lines of output from running :20verbose w in that buffer:

continuing in BufWritePost Auto commands for "*"
Executing BufWritePost Auto commands for "*.ts"
autocommand silent! call tsuquyomi#reloadAndGeterr()
line 0: silent! call tsuquyomi#reloadAndGeterr()

Also note it only happens for typescript files, that is for files of filetype typescript (the staging buffer will have the same filetype as the original file).

Omni-complete on Object Properties

If you want to show a method's signature in the preview window when you complete this method's arguments:

(The preview window isn't shown when completion properties or variables)

Is there a way to make the completion for properties show up as soon as you type the . on an object? Something like the picture below, but without having to manually type <C-x><C-o> in insert mode in order to get it to show the window?

screen shot 2015-12-18 at 8 54 04 pm

file type bug with fugitive

I have a bug that the file type of a Gstatus will be set to typescript erroneously.
Here is my .vimrc
"NeoBundle Scripts-----------------------------
if has('vim_starting')
if &compatible
set nocompatible " Be iMproved
endif

" Required:
set runtimepath+=/home/hao/.vim/bundle/neobundle.vim/
endif

" Required:
call neobundle#begin(expand('/home/hao/.vim/bundle'))

" Let NeoBundle manage NeoBundle
" Required:
NeoBundleFetch 'Shougo/neobundle.vim'

" Essential
NeoBundle 'tpope/vim-fugitive'
NeoBundle 'Shougo/vimproc.vim', {'build' : {'linux' : 'make'}}
NeoBundle 'Quramy/tsuquyomi'
NeoBundle 'bling/vim-airline'
call neobundle#end()

" Required:
filetype off
filetype plugin indent on

" If there are uninstalled bundles found on startup,
" this will conveniently prompt you to install them.
NeoBundleCheck
"End NeoBundle Scripts-------------------------

and here is the step to reproduce the bug:

  1. open a .tsx file
  2. :Gst
    You'll find the .git/index buffer is detected as typescript.

This bug then becomes more serious because it will detect all other files as typescript.

Rename identifiers in comments

Add a function or command to replace identifiers in comments.

It's enabled that the argument name contained in @param someArg is replaced when renaming someArg is called.

How to use with pathogen?

I'm not up for all this fancy NeoBundle stuff with 12,000 million configuration options. I just want to copy and paste some curl script and have magic happen like what I'm used to. How do I do this the easy way with pathogen?

...and yes, I'm hangry so I probably should go eat a sandwich :-)

Scratch File Created on Completion

I'm not sure if this is a configuration setting for Vim that I just haven't learned about and therefore don't have set, but I've never seen it before and it only seems to happen in this plugin. When I run <C-x><C-o> to omni-complete a property, I always get this random [Scratch] file that pops up.
screen shot 2015-12-18 at 9 05 02 pm
Is there a way to keep that new file from opening in my my current buffer? It's quite obtrusive.

Thanks a ton for making this plugin, it's incredible :)

Disable quickfix?

Is it possible to disable the quickfix popup on save? I use neomake to provide similar feedback and don't like the window popping up.

Error in Ubuntu TSServer not found when installed. Node 4.x. Neovim

I'm getting this error on XUbuntu:

[Tsuquyomi] tsserver is not installed. Try "npm -g install typescript".

when I type which tsserver I get:

/home/jon/.node/bin/tsserver

when I run tsserver it seems to work.

I'm using node v4.2.2.

I'm using neovim

NVIM 0.0.0-alpha (compiled Oct 30 2015 08:52:19)

Support for tsconfig filesGlob

The filesGlob options for tsconfig.json is supported by the tsconfig utility in NPM, however tsuquyomi ignores it and so you get errors from any files you are expecting it to pick up.

Is it a simple thing to support this?

File changes not being picked up

I have a TypeScript code generation process that re-runs when a definition file changes. However, tsuquyomi (or the underlying TSServer) doesn't seem to pick up this change, because the auto-complete suggestions presented don't include new methods/functions etc defined in the regenerated code.

Is this expected to work?

PS massive thanks for this project

Showing type information instead of `import` in `tsuquyomi#hint`

Given a file a.ts:

// a.ts
export default class A {
  name: string;
  age: number;
}

And a file b.ts;

import A from './a.ts';

A // put vim cursor over A, and run :echo tsuquyomi#hint()
  // output: `import A`

In this case, you can see that the only information given back is that it is import A. Is there a way to get back the type information of A as opposed to just the import A?

Error in Rename Symbol

Hello!

I get this error when running :TsuquyomiRenameSymbol

[Tsuquyomi] New symbol name : AppState2Error detected while processing function tsuquyomi#renameSymbol..<SNR>89_renameSymbolWithOptions..<SNR>89_renameLocal:
line    3:
E716: Key not present in Dictionary: /Users/derek/SlideroomGIT/goodprospect2015-ui/src/models/app-state.ts
E15: Invalid expression: s:locs_dict[expand('%:p')]
line    5:
E121: Undefined variable: locations_in_buf
E15: Invalid expression: locations_in_buf

Changed 4 locations.

it is an export class name that I am trying to rename. Let me know if you need other information!

Is there a way to disable check-on-save?

When I save a file it is auto-compiled and checked to show the error list. However it causes a pause. Since I save often this wastes time. Can I disable check-on-save and instead manually issue a command for it?

Support for showing the type of the identifier under the cursor

Would you consider adding support for a command that shows (via an echom perhaps?) the type of the identifier at the current cursor position?

e.g.

// cursor position shown by '_'
let test_Var = "test";

call the new command, output at the bottom of the window is:

string

Thanks

False warning of experimentalDecorators

Hey there. So it seems that in my current projects tsconfig is being ignored for a project

screen shot 2016-01-23 at 8 14 59 am

screen shot 2016-01-23 at 8 15 10 am

Any time I use an experimental decorator, I get a warning, even though I have the compiler option for decorators enabled. Any ideas?

Search local executable tsserver under jspm env

Now, tsuquyomi search tsserver from:

  1. ./node_modules/typescript (locally installed)
  2. tssserver (globally installed)

When project's package.json has the following, tsuquyomi can't get local typescript module.

{
  "jspm": {
    "directories": {
      "baseURL": "src"
    },
    "dependencies": {
    },
    "devDependencies": {
      "typescript": "npm:[email protected]"
    }
  }
}
- src/                                
 |- jspm_packages/                    
  |+ github/                          
  |- npm/                             
   |- [email protected]/               
    |- bin/                           
     |  tsc                           
     |  tsserver
- package.json

Searching for contextual tsserver.js

If TypeScript is installed locally, switch to use it( not use global installed one).

It will works only if g:tsuquyomi_use_dev_noed_module is 0.

  • add an option to search tsserver.js installed locally

Cannot compile external modules unless the --module flag is provided

When I save a change to a file that exports things, I get the error message above.
I have a tsconfig.json in the top directory of my project and it specifies "module": "amd" in the "compilerOptions" section. Is there something else I need to do or does tsuquyomi not support this yet?

TsuquyomiGoBack not working

TsuquyomiDefinition works successfully, but subsequent TsuquyomiGoBack does not and messages "[Tsuquyomi] No items in navigation stack... "

Cleanup compiled files

When I save a foo.ts file I notice it leaves behind the compiled foo.js file on the hard drive.
I tried setting noEmit: true and out: /dev/null in the tsconfig.json but this behavior still happens.
Any idea why this is happening and how I can stop it?

tsuquyomi hangs when used with fugutive in neovim

related to #55

I found this is a neovim specific issue. Maybe it is not a bug for tsuquyomi.

Minimal set up:

set rtp+=~/.vim/dein/repos/github.com/Shougo/dein.vim/
call dein#begin(expand('~/.vim/dein'))
call dein#add('Shougo/dein.vim')
call dein#add('Shougo/vimproc.vim', {'build': 'make'})
call dein#add('airblade/vim-gitgutter')
call dein#add('Quramy/tsuquyomi')
call dein#end()

filetype plugin indent on
syntax enable

neovim version: NVIM 0.1.3-dev

I cannot reliably reproduce this. Quite strange...

Support [email protected]

  • add new commands(projectInfo, reloadProjects, geterrForProject)
  • add new unite source with projectInfo

Support for definitions by referance

Not sure if this is supported at the moment but I tried to reference a type definition file and omnicomplete wouldn't work.

But if I setup the interfaces inside the file, omnicomplete works fine.

Is this not supported?
What more informations do you need from me?

Support "tooltip" in terminal vim.

It would be very nice if the "tooltip" functional worked in terminal vim (which doesn't support balloon functionality).

Would it be possible to have the option to show the "tooltip" in something like the preview window?

Add "go back" command

Add "go back" Ex command, which move the cursor to the location where :TsuquyomiDefinition was called.

And, I will map this command to Ctrl-t. (emulates tag's mapping).

Tsuquyomi doesn't pick up new file settings correctly

When adding a new file to an existing project with an existing tsconfig.json and attempting to write to the new file, Tsuquyomi prints the following error message: error| Cannot compile modules unless the '--module' flag is provided.. However, the module flag is provided in the project's tsconfig.json, and restarting Vim fixes the problem — Tsuquyomi stops printing bogus error messages on write.

I've tried a few things to fix the problem, like running :TsuReloadProject, but nothing seems to fix it other than a full Vim restart. Any ideas?

tsuquyomi#open() does not work well

ENV:
I'm using Terminal.app + tmux on OSX
it works well under Terminal.app, but under tmux.

On OSX, /tmp is a soft link to /private/tmp

Given the file: /tmp/hello.ts :
When under tmux, :echo tsuquyomi#bufManager#isOpened("/tmp/hello.ts") outputs 1, however, :echo tsuquyomi#bufManager#isOpened("/private/tmp/hello.ts") outputs 0 and expand("%:p") echoes '/tmp/hellots'. I stepped into that fuction, only to found the variable $file is /tmp/hello.ts. Obviously, the problem has something to do with link.

I'm not familiar with this project, nor have enough time to handle it. I'd appreaciate it if you are to cope with it.

PS: my gut feeling tell me that if can also be an upstream issue caused by tsserver's handling link.

Error occurred with huge type definition files

I could see the error reported in #45, but with classic vim. Here is the procedure for reproducing.

# clone my repository
git clone https://github.com/delphinus35/tsuquyomi-error-reproducing
cd tsuquyomi-error-reproducing
# clone neobundle.vim
git submodule update --init
# install vimproc & tsuquyomi
vim -N -u ./vimrc -U NONE -i NONE +NeoBundleInstall +q
# edit sample vim
vim -N -u ./vimrc -U NONE -i NONE us.ts

# in vim, try to show Underscore.js methods
# jo_.<C-X><C-O>
# ↑(cursor down)(new line)(input _.)(start omni completion)

Then you see errors below. With huge definition files (this time, it is underscore.d.ts), tsserver makes wrong return values, I think.

Messages maintainer: Bram Moolenaar <[email protected]>
"us.ts" 2L, 43C
Error detected while processing function tsuquyomi#complete[48]..tsuquyomi#makeCompleteMenu[2]..tsuquyomi#tsClient#tsCompletionEntryDetails[2]..tsuquyomi#tsClient#sendCommandSyncResponse[7]..<SNR>63_decode:
line   17:
E114: Missing quote: "UnderscoreStatic
Error detected while processing function tsuquyomi#complete[48]..tsuquyomi#makeCompleteMenu[2]..tsuquyomi#tsClient#tsCompletionEntryDetails[2]..tsuquyomi#tsClient#sendCommandSyncResponse[7]..<SNR>63_decode:
line   17:
E15: Invalid expression: {"seq":0,"type":"response","command":"completionEntryDetails","request_seq":3,"success":true,"body":[{"name":"after","kindModifiers":"declare","kind":"method","displayParts":[{"text":"(","kind":"punctuation"},{"te
xt":"method","kind":"text"},{"text":")","kind":"punctuation"},{"text":" ","kind":"space"},{"text":"UnderscoreStatic","kind":"interfaceName"},{"text":".","kind":"punctuation"},{"text":"after","kind":"methodName"},{"text":"(","kind":"punctu
ation"},{"text":"count","kind":"parameterName"},{"text":":","kind":"punctuation"},{"text":" ","kind":"space"},{"text":"number","kind":"keyword"},{"text":",","kind":"punctuation"},{"text":" ","kind":"space"},{"text":"fn","kind":"parameterN
ame"},{"text":":","kind":"punctuation"},{"text":" ","kind":"space"},{"text":"Function","kind":"localName"},{"text":")","kind":"punctuation"},{"text":":","kind":"punctuation"},{"text":" ","kind":"space"},{"text":"Function","kind":"localNam
e"}],"documentation":[{"text":"Creates a version of the function that wi
Error detected while processing function tsuquyomi#complete[48]..tsuquyomi#makeCompleteMenu[2]..tsuquyomi#tsClient#tsCompletionEntryDetails[3]..tsuquyomi#tsClient#getResponseBodyAsList:
line    5:
E715: Dictionary required

Press ENTER or type command to continue

My setting

  • vim 7.4.936 (installed from homebrew)
  • Mac OS X 10.11.1
  • Terminal.app
  • See vimrc in repository for neobundle setting

tsx files no longer working

Open a .tsx file that has known compile errors.

:copen will show nothing.

:cnext will give the error:

E42: No Errors

Completion etc works fine, but any compilation errors are not available.

i.e. cwindow shows nothing.

Anyone else seeing this?

Am I missing something obvious?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.