Spaces:
Sleeping

batonai-coding-assistant[bot] commited on
Commit
ce480bd
·
unverified ·
1 Parent(s): c501ccb

Add Go language support for syntax highlighting

Browse files

- Extend `get_language_by_extension()` to recognize `.go` files, returning 'go' for Go language.
- Update `CodeParser` class to support Go:
- Add 'go' to `language_extension_map`.
- Modify `_install_parsers()` to clone and build the `tree-sitter-go` repository.
- Include relevant syntax nodes for Go in `_get_node_types_of_interest()`:
- import_declaration => 'Import'
- function_declaration => 'Function'
- Add more as needed.
- Update `_get_nodes_for_comments()` to recognize Go comments.

These changes are necessary to provide syntax highlighting capabilities for Go code in the application, improving usability for developers working with Go files.

2 files changed +16 -1
Files changed (2)
CodeParser.py+14-1
app.py+2