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

feat: reintroduce raw-strings #117

Open
wants to merge 57 commits into
base: main
Choose a base branch
from
Open

Conversation

mrdgo
Copy link
Contributor

@mrdgo mrdgo commented Sep 25, 2024

Discussion with tree-sitter devs

This will break the current nvim-treesitter config. They have to update to also use scanner.c. People using that config might want to use "our" way to install ts-nu.

After merge, it might be necessary to run :TSUpdate nu at least once. I don't know about treesitter's caching, so let's just hope that nobody's setup breaks.

With that scanner, we can also create custom logic for unquoted strings.

.github/neovim/init.lua Outdated Show resolved Hide resolved
.github/workflows/main.yml Outdated Show resolved Hide resolved
@clason
Copy link

clason commented Nov 21, 2024

And in general, I would strongly recommend to make conceptually unrelated changes in separate PRs; that makes it much easier to review and merge preliminary steps.

(You can cherry-pick commits from PRs that are required to be merged first, as long as you clearly label them as such and rebase.)

@mrdgo
Copy link
Contributor Author

mrdgo commented Nov 21, 2024

Incorporated all reviews, removed the pipeline changes that neither provide insights nor prevent anything. Maybe pipeline is a separate issue that should be addressed at some point.

@fdncred
Copy link
Collaborator

fdncred commented Nov 21, 2024

Ping me if/when we're ready to land this and I'll push the button.

@blindFS
Copy link
Contributor

blindFS commented Nov 21, 2024

@fdncred I'm cool with it now, kudos to @mrdgo !

@mrdgo mrdgo mentioned this pull request Nov 21, 2024
@mrdgo
Copy link
Contributor Author

mrdgo commented Nov 21, 2024

Thanks to @blindFS for the thorough review! Is there someone else who would want to review? Otherwise, I'd be ready to land, again

@mrdgo mrdgo changed the title feat: reintroduce raw-strings Draft:feat: reintroduce raw-strings Nov 21, 2024
@mrdgo
Copy link
Contributor Author

mrdgo commented Nov 21, 2024

Aaah, wait a second

Edit: okay, now!

@mrdgo mrdgo marked this pull request as draft November 21, 2024 15:19
@mrdgo mrdgo changed the title Draft:feat: reintroduce raw-strings feat: reintroduce raw-strings Nov 21, 2024
@mrdgo mrdgo marked this pull request as ready for review November 21, 2024 15:21
src/scanner.c Outdated Show resolved Hide resolved
src/scanner.c Outdated Show resolved Hide resolved
@@ -90,6 +90,10 @@ file_path: (val_string) @variable.parameter
(escaped_interpolated_content) @string
(expr_interpolated ["(" ")"] @variable.parameter)

(raw_string_begin) @string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably don't need this, val_string will get it properly highlighted.

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.

5 participants