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

treesitter: correctly recognize shebang #26

Closed ttytm closed 5 months ago

ttytm commented 5 months ago

Regardless of how we we proceed with treating the shebangs in https://github.com/vlang/v/pull/21029

Currently, a shebang is not correctly recognized by tree-sitter. It's not highlighted and can break the highlighting of identifiers that follow it.

This PR aims to fix this.

ttytm commented 5 months ago

Working on the regression regarding reference types introduced in the recent upstream commit.

spytheman commented 5 months ago

Working on the regression regarding reference types introduced in the recent upstream commit.

what do you mean?

ttytm commented 5 months ago

what do you mean?

Tests are failing here because of a change in https://github.com/vlang/v/pull/21025. It's fixed in https://github.com/vlang/v/pull/21030. I'll see to work out a test case

spytheman commented 5 months ago

Hm, I thought it was a pure refactoring, and the main CI tests passed. A test case will be much appreciated indeed.

ttytm commented 5 months ago

Thought so too. It slipped through. But if it gives us extended test coverage, it had its blessings.