vlang / v-analyzer

The @vlang language server, for all your editing needs like go-to-definition, code completion, type hints, and more.
MIT License
92 stars 10 forks source link

build: prefer automatic generation of treesitter parser from grammar #29

Closed ttytm closed 4 months ago

ttytm commented 5 months ago

The PR deletes and ignores generated static files in the repository.

This would remove the overhead that we are currently encountering in terms of repository size growth, additional effort and error potential.

Running tree-sitter generate will generate the necessary src/ directory and files(keeping the src dir should not be required). Generating the files can be automated by projects that use the parser, like nvim-treesitter. It's an approach that e.g. tree-sitter Swift is using.

Refs.:

Required for: https://github.com/nvim-treesitter/nvim-treesitter/pull/6300


TODO

ttytm commented 5 months ago

Before continuing on this, I'd like to confirm that the change the PR is trying to achieve has a chance.

I'd put the work to keep things running and testable with much convenience as possible then.

JalonSolov commented 5 months ago

Seems to me that automating things this way will mean the tool will be kept more up-to-date with the compiler, which sounds like a good thing.

Just have to keep the grammar updated.

ttytm commented 5 months ago

K started working on it. There are several more advantages that already reveal themselves in the process. The coming week is quite full. So I think the week after I'll push an update and leave an overview.

ttytm commented 4 months ago

Not planned for now backlogging for a potentially future version