[英]Can't Remove leafgarland-vim TypeScript experimentalDecorator warning
I have the leafgarland-vim plugin installed, and when I save my .ts file, I always get this warning: 我安装了leafgarland-vim插件,当我保存.ts文件时,我总是得到这个警告:
I've tried adding let g:typescript_compiler_options="--experimentalDecorators"
to my ~/.vimrc , and I've also entered that command from inside vim, after first typing ":". 我尝试将
let g:typescript_compiler_options="--experimentalDecorators"
到我的〜/ .vimrc中 ,并且在第一次输入“:”后我也从vim内部输入了该命令。 I can even do :echo g:typescript_compiler_options
and it returns --experimentalDecorators
. 我甚至可以这样做
:echo g:typescript_compiler_options
--experimentalDecorators
,它返回--experimentalDecorators
。 Yet every time I go to save I get this error. 然而,每次我去保存,我都会收到此错误。
How can I get this error to go away? 怎么才能让这个错误消失?
--experimentalDecorators
just doesn't seem to do its job. --experimentalDecorators
似乎没有做好自己的工作。
edit: I tried this from inside vim: 编辑:我在vim内部尝试过这个:
:let g:typescript_compiler_options = '--dnwejuidbnwejudbn' :让g:typescript_compiler_options =' - norwejuidbnwejudbn'
And the code still compiled, with the same warning. 代码仍然编译,同样的警告。 I don't think the let g:typescript_compiler_options is actually doing anything.
我认为let g:typescript_compiler_options实际上并没有做任何事情。
edit3: In the meantime, this hack gets rid of the warning: edit3:与此同时,这个hack摆脱了警告:
I'm guessing but I think you are seeing these warnings from another plugin, probably Syntastic. 我猜,但我认为你看到来自另一个插件的警告,可能是Syntastic。 Syntastic uses its own compiler settings.
Syntastic使用自己的编译器设置。
You could try adding something like this line to your vimrc: 你可以尝试在你的vimrc中添加类似这样的东西:
let g:syntastic_typescript_tsc_args = "--experimentalDecorators"
See :help syntastic-checker-options
for more details. 有关更多详细信息,请参阅
:help syntastic-checker-options
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.