nim-lang / nim-mode

An emacs major mode for the Nim programming language
137 stars 46 forks source link

Flycheck shows false errors and using flymake-mode shows no errors at all #227

Open vitreo12 opened 4 years ago

vitreo12 commented 4 years ago

And describe your problem:

Hello everyone, I have been trying to get some basic highlighting and linting to work with nim-mode, without great success. flycheck seems to spit out errors that aren't supposed to be there, especially on import calls, like this:

Image example

I then tried to enable flymake, but it doesn't show any syntax checking and no errors are ever shown, even in very obvious cases (like trying to echo an undeclared variable).

What would be the steps to enable a proper linting for nim-mode? I am sorry if I failed in configuring something in Emacs' init file, I have tried to follow up the documentation.

krux02 commented 3 years ago

I used to get nimsuggest working. It was a lot of trouble to get it working. It never was reliable, because opening different files from different project at the same time always confused it. Then nimsuggest itself had memory leaks and created consistently growing log files and caused a lot of input lag for emacs. I eventually gave up on nimsuggest entirely and went to use compile only. With the configuration I just posted here, I managed to get a reliable workflow that allowed me to get correct error messages. Errors are not highlighted intelli sense style, but reading the error messages in the command buffer and being able to jump to the errors via the next-error command turned out to be a very efficint workflow.