Support multiple controllers with the same identifier
In our project, we have two controllers with the same identifier, they share a lot of views, targets etc and essentially do the same job in different contexts, so the identifier makes sense.
The LSP only supports the first found controller here: https://github.com/marcoroth/stimulus-lsp/blob/979f8cbbf72a379131777da5cfe303008187bb89/server/src/diagnostics.ts#L611
So n VS code it's showing errors for values that do exist etc
Hey @mtownsend81, thanks for reporting this. This is a tricky one, since it's super hard to figure out the context in which the multiple Stimulus applications are running.
I have started working on parsing out the different Stimulus applications in https://github.com/marcoroth/stimulus-parser/pull/137 but even then it's not trivial to determine which application should we used in which view file, unless you explicitly tell the LSP which application to use for a glob of view files.
In wonder if it would make sense to either implement that, or to just default to looking in all parsed Stimulus applications. The downside to the latter approach is that the accuracy goes down since we can't tell it for sure.