allan-simon / docker-dev-rust

Docker image meant for portable rust dev environment, with rustup , rust language server, neovim
2 stars 1 forks source link

Syntax checker #4

Open jean553 opened 7 years ago

jean553 commented 7 years ago

Does neovim actually checks the syntax ? In fact, I get no error when writing simple syntax errors as e piston_window::*; instead of use piston_window::* or f main() instead of fn main(). Is there anyway to enable syntax check (like syntastic) in your container ?

allan-simon commented 7 years ago

can you give me an exemple project ? also have you tried with a simple main.rs from a brand new project , to be here you're not hitting some corner case (after all the whole ecosystem is still in alpha)

allan-simon commented 7 years ago

what happen when you do in /tmp a cargo init and you start filling the main function with some code ?

allan-simon commented 7 years ago

this is for the "realtime" check synta, if you want to have the check like with syntastic add this to your

~/.config/nvim/init.vim

" Neomake configuration.
augroup my_neomake_cmds
    autocmd  " <= not sure this line is actually necessary
    " Have neomake run cargo when Rust files are saved.
    autocmd BufWritePost *.rs Neomake cargo
augroup END