Fork me on GitHub
#editors
<
2018-04-06
>
maxp04:04:14

@pez could you help with such a problem `

maxp04:04:18

@pez could you help with such a problem `

maxp04:04:02

@pez could you help with such a problem

(defstate worker
  :start
That is defstate from mount and it defines worker. But that var marked red with 'Unable to resolve symbol worker'.

pez06:04:17

Hello, @maxp. You are running into a limitation of the Joker linter, it doesn't do a full scan of all files and does not recognize defstate (in your case) as a macro. But all is not lost! To get rid of the error messages, add defstate to Joker's list of known macros. Create a .joker file somewhere in the path from the root of your project to where you are using the macro (I prefer to have it in the project root), and add:

{:known-macros [some-ns/defstate]}
Replace some-ns with whatever namespace you are requiring the macro from. Read more about Joker's linter mode here: https://github.com/candid82/joker#linter-mode

pez06:04:03

There is also a #joker channel, I just realized.

maxp07:04:53

Thank you. It works.

metal 4