stimulus-parser
stimulus-parser copied to clipboard
Invalid Stimulus Controller with multiple layouts/js files
I have two view layouts in my rails app, application and backend, which require a different set of stimulus controllers. I've created the necessary js files for it to include, and have set up my folder structure as such (simplified):
The actual codebase works, it loads the controllers and I can connect them as such. However, the LSP is flagging my data-[controller]
attributes as invalid controllers, and the quick fix suggests I put my controllers in an extraneous controllers folder, as such:
How does Stimulus LSP infer which folders to look for controllers, the fact that it's suggesting two potential solutions indicates it does pick up my two configurations. I think that the extra "controllers" folder it requires may be a bug, or if there is a configuration option to change the folders where it thinks controllers should be, I'm not seeing it.