0

I am writing Typescript in Neovim, with plugins leafgarland/typescript-vim and benekastah/neomake, among others, and whenever I save the file gets compiled.

My understanding (I could be wrong) is that when a file is opened, created or saved Neomake is run as indicated by au BufRead,BufNewFile,BufWritePost * Neomake. I still want this to happen so that I can get error messages displayed on save, but I don't want it to compile the Typescript file I am working on.

Removing typescript-vim stops the compilation but there are no error messages, sytax highlighting or auto-indentation.

Relevant code from nvim/nvimrc

let g:neomake_typescript_tsc_maker = {
        \ 'args': ['--module', 'system', '--target', 'ES5', '--experimentalDecorators'] }

let g:neomake_warning_sign = { 'text': '!', 'texthl': 'WarnMsg' }
let g:neomake_airline = 1

au BufRead,BufNewFile,BufWritePost * Neomake

Here are the rest of my dotfiles which contain the rest of the nvimrc.

Thanks in advance :)

2
  • How do you think you will get all your error messages if your code is not compiled? Commented Jan 12, 2016 at 8:18
  • Perhaps by getting neomake to capture the output from tslint rather than tsc? Commented Jan 12, 2016 at 21:16

1 Answer 1

0

By adding the --noEmit flag to the args of neomake when settings the typescript maker, a compiler javascript file no longer appears in the directory upon save.

let g:neomake_typescript_tsc_maker = {
    \ 'args': ['--module', 'system', '--target', 'ES5', '--experimentalDecorators', '--noEmit'] }
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.