Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for regex in sources #54

Closed
chrbirks opened this issue Oct 16, 2019 · 4 comments
Closed

Support for regex in sources #54

chrbirks opened this issue Oct 16, 2019 · 4 comments

Comments

@chrbirks
Copy link

Hi
Is there, or do you have plans for, support for specifying multiple source files using regex or something similar? For example to include all .vhd and .vhdl files in all subdirectories:

{
   "sources": [
      "src/**/*.vhd*"
   ]
}
@suoto
Copy link
Owner

suoto commented Oct 16, 2019

Possibly yes via glob style patterns. The only issue is how to trigger searching when files are added or removed after the file has been read.

I learned recently that LSP allows servers to have custom commands, but I'd rather have this running without user intervention (and without hogging the cpu by searching over and over)

@chrbirks
Copy link
Author

Okay I wasn't aware that adding sources to the config file while the server is running was possible. So yes, indexing new files should be handled in a nice way somehow. The LSP server I currently use for VHDL cannot handling adding/removing source files while running so that hasn't been a problem.

@suoto
Copy link
Owner

suoto commented Oct 22, 2019

Support for specifying using Python glob, which allows patterns like /project/foo/*.vhd and, in case of Python 3, allows recursive inclusion with /project/**/*.vhd (will include all .vhd files inside /project/). More info on how glob behaves, have a look at https://docs.python.org/3/library/glob.html.

The server won't automatically search for files, to trigger that you can (1) remove HDL Checker work folder (<root_path>/.hdl_checker/ on Unix, <root_path>\\_hdl_checker\\ on Win) or (2) change the config file timestamp.

Thanks for reporting, let me know if there's any other issue! 👍

@chrbirks
Copy link
Author

Thanks I'll give et a try in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants