I'm still a beginner when it comes to dispatch and this plugin, but I am having a problem with the quickfix window from the Make output. Somehow the error parsing does not work, while it works fine in vim-dispatch if I disable vim-dispatch-neovim. I have created the following test case to reproduce the problem.
Here is my environment:
- OS: Ubuntu 16.04
- nvim: v0.2.2
- vim-dispatch: master branch
- vim-dispatch-neovim: master branch
~/.vimrc: none
~/.config/nvim/after/compiler/typescript.vim:
let current_compiler = "typescript"
CompilerSet makeprg=tsc\ $*\ --outDir\ build\ %
CompilerSet errorformat=%+A\ %#%f\ %#(%l\\\,%c):\ %m,%C%m
~/.config/nvim/pack/bundle/start: vim-dispatch and vim-dispatch-neovim
- nothing else at all in
~/.config/nvim
- nothing in
~/.vim
- node: v8.11.3
- npm: 5.6.0
- tsc: 2.9.2
I have this simple typescript file src/greeting.ts which contains two errors:
class Time {
constructor(public timestamp: Date) {}
label() {
let message: string;
let hour = this.timestamp.getHours();
if (hour < 12 && hour > 6) {
message = 1;
} else if (hour < 18) {
message = "afternoon"
} else if (hour < 21){
message = "evening"
} else {
message = "night"
}
return message;
}
}
function greeting() {
let now = new Time('now');
return `Good ${now.label()}`;
}
document.body.innerHTML = greeting();
Then I open this file in nvim, and do the following:
:compiler typescript
:Make
Here is the output in the quickfix window from Make with vim-dispatch-neovim disabled:
src/greeting.ts|9 col 7| src/greeting.ts(9,7): error TS2322: Type '1' is not assignable to type 'string'.
src/greeting.ts|23 col 22| src/greeting.ts(23,22): error TS2345: Argument of type '"now"' is not assignable to parameter of type 'Da
te'.
The :cfirst, :cnext, :cprev, :clast commands work fine and position the cursor in the source file accordingly.
By contrast, here it is with vim-dispatch-neovim enabled:
|| src/greeting.ts:9:7 - error TS2322: Type '1' is not assignable to type 'string'.
||
|| 9 message = 1;
|| ~~~~~~~
||
||
|| src/greeting.ts:23:22 - error TS2345: Argument of type '"now"' is not assignable to parameter of type 'Date'.
||
|| 23 let now = new Time('now');
|| ~~~~~
||
||
||
As you migth imagine, the :cfirst, :cnext, :cprev, :clast commands don't work in the second case. In particular, :cn and :cp simply move forward and backward one line at a time, and do not position the cursor in the source file.
I would be grateful for any insights!
For reference, this example is copied verbatim from the book "Modern Vim", and can be found in every detail in this extract made available to the public by the publisher: https://media.pragprog.com/titles/modvim/failures.pdf
I'm still a beginner when it comes to dispatch and this plugin, but I am having a problem with the quickfix window from the
Makeoutput. Somehow the error parsing does not work, while it works fine invim-dispatchif I disablevim-dispatch-neovim. I have created the following test case to reproduce the problem.Here is my environment:
~/.vimrc: none~/.config/nvim/after/compiler/typescript.vim:~/.config/nvim/pack/bundle/start: vim-dispatch and vim-dispatch-neovim~/.config/nvim~/.vimI have this simple typescript file
src/greeting.tswhich contains two errors:Then I open this file in nvim, and do the following:
Here is the output in the quickfix window from Make with vim-dispatch-neovim disabled:
The
:cfirst,:cnext,:cprev,:clastcommands work fine and position the cursor in the source file accordingly.By contrast, here it is with vim-dispatch-neovim enabled:
As you migth imagine, the
:cfirst,:cnext,:cprev,:clastcommands don't work in the second case. In particular,:cnand:cpsimply move forward and backward one line at a time, and do not position the cursor in the source file.I would be grateful for any insights!
For reference, this example is copied verbatim from the book "Modern Vim", and can be found in every detail in this extract made available to the public by the publisher: https://media.pragprog.com/titles/modvim/failures.pdf