d-language-server / dls

A Language Server implementation for D
http://dls.dub.pm
106 stars 15 forks source link

Static Analysis with No Auto Import #35

Closed ghost closed 5 years ago

ghost commented 5 years ago

Currently when using No Auto Import configuration, the static analysis done with dscanner will only be done with any open files. Would there be a way to set the path or pattern so that the static analysis is done for the specified files as well? I was having problems where, as part of the Android build files with the extensions '.d' were being generated and would have thousands of errors when dscanner processed them as they aren't actually D source files.

LaurentTreguier commented 5 years ago

I first thought about using manual imports, but I guess if you have D files mixed with non-D file with the same extension, using a pattern makes sense.

LaurentTreguier commented 5 years ago

What sort of patterns do you need ? With std.path.globMatch I can easily support things like {a,b}/*.d relative to the current workspace for example

ghost commented 5 years ago

I guess that glob would work, possible include in the plugin comment of how it works as I think that is a bit different than the usual vscode glob syntax. The * only matches a segment of the path in vscode.