Skip to content

Comments

feat: add VHDL language support#213

Open
AmbatiThrinay wants to merge 1 commit intoblopker:mainfrom
AmbatiThrinay:feat/add-vhdl-support
Open

feat: add VHDL language support#213
AmbatiThrinay wants to merge 1 commit intoblopker:mainfrom
AmbatiThrinay:feat/add-vhdl-support

Conversation

@AmbatiThrinay
Copy link

Summary

Add VHDL as a supported language for spell checking using the tree-sitter-vhdl grammar (v1.3.1).

Changes

File Change
Cargo.toml Added tree-sitter-vhdl git dependency (not on crates.io)
crates/codebook/Cargo.toml Added workspace dependency
crates/codebook/src/queries.rs Added VHDL enum variant, language setting, match arm
crates/codebook/src/queries/vhdl.scm Tree-sitter query capturing comments, strings, identifiers
examples/example.vhd Example file with intentional spelling errors
crates/codebook/tests/test_vhdl.rs 2 tests: simple spell check + byte-position verification
README.md Added VHDL to supported languages table

Query Captures

  • Comments: line_comment, block_comment (via comment_content)
  • Strings: string_literal
  • Identifiers: entity, architecture, signal, variable, constant, function, procedure, component, type, subtype, alias declarations
  • Ports: interface_declaration, interface_signal_declaration, interface_variable_declaration, interface_constant_declaration
  • Labels: label

Testing

  • cargo test -p codebook --lib — 32/32 pass (including test_all_queries_are_valid)
  • cargo test -p codebook --test test_vhdl — 2/2 pass
  • make test — full suite passes with 0 failures

Add VHDL as a supported language for spell checking using tree-sitter-vhdl
grammar from jpt13653903/tree-sitter-vhdl (v1.3.1, git dependency).

Changes:
- Add tree-sitter-vhdl workspace and crate dependencies
- Add VHDL variant to LanguageType enum with language setting
- Create vhdl.scm query capturing comments, strings, identifiers
  (entity, architecture, signal, variable, constant, function,
  procedure, component, type, subtype, port, label, alias)
- Add example.vhd with intentional spelling errors
- Add test_vhdl.rs with simple and location verification tests
- Add VHDL to supported languages table in README
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant