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

Language support tracking issue #10

Open
slimsag opened this issue May 3, 2022 · 5 comments
Open

Language support tracking issue #10

slimsag opened this issue May 3, 2022 · 5 comments

Comments

@slimsag
Copy link
Member

slimsag commented May 3, 2022

This is a tracking issue for language support in doctree. If you'd like to request support for a language, or have started working on an indexer for a language, feel free to drop a comment on this issue!


Language support table

language functions types methods consts/vars search usage examples code intel
Go
Python
Zig partial
JavaScript
TypeScript
Java
Markdown n/a n/a n/a n/a n/a

Who is working on language support?

Special thanks to these fine folks who are working on language support:

Request support for a language

Feel free to leave a comment below so we know which language to target next!

Help add support for more languages

If you'd like to contribute an indexer, it's not too complex, all you need is experience coding in Go. Drop a comment in this issue so folks know you're working on support for a language, and join the Discord server so you can ask questions, get help, etc.

Right now, things are a little rough since the project is only a few weeks old! You might be better off waiting a few more weeks before diving in, as things will stabilize a lot more by then.

Here's how it all works:

The goal of an indexer is to analyze code for a specific programming language using tree-sitter queries, and produce documentation pages for all the libraries found in a directory of code in the doctree schema format.

The best indexer to take a look at as a reference is the Go indexer which produces documentation for Go code, but be sure to read the read the schema first to get an idea of what data it is trying to produce. Also check out the indexer.Language interface which describes the common interface all indexers implement.

Feel free to join the Discord server if you have any questions or want help, always happy to help people who want to learn!

@joshuabezaleel
Copy link
Contributor

joshuabezaleel commented May 24, 2022

Hi @slimsag ! I'm interested in trying for writing the indexer for methods for Go but I haven't got any experience with tree-sitter, would that be okay? Do you have any recommendations on resources to read to work on this?

Also I think we can tick the const/vars block off the Go one since I saw you implemented it yesterday when I was pulling the latest main branch just now 😄

@slimsag
Copy link
Member Author

slimsag commented May 25, 2022

@joshuabezaleel Cool, that'd be really great!

The syntax of tree-sitter queries is documented here: https://tree-sitter.github.io/tree-sitter/using-parsers#query-syntax

It's very helpful to run a simple query like (source_file) @file, and then print captures["file"] - it will explain all the nodes in an entire Go source file for you and then it's easier to write the relevant query.

Let me know if I can answer any questions etc. in the Discord, too, I'm usually pretty active

@slimsag
Copy link
Member Author

slimsag commented May 25, 2022

Oh, also, it's useful to search the grammar.json file for the language too. In this case, Go, and we'd want to look at querying this node

@slimsag slimsag mentioned this issue May 27, 2022
11 tasks
@DaivikDave
Copy link
Contributor

Hey Team,
I would like to add language support for js.

@slimsag
Copy link
Member Author

slimsag commented May 28, 2022

@DaivikDave awesome! I wrote down your name in the issue just now :) let me know if I can help at all in the Discord

@slimsag slimsag pinned this issue Jun 14, 2022
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

No branches or pull requests

3 participants