Wansmer / treesj

Neovim plugin for splitting/joining blocks of code
MIT License
1k stars 29 forks source link

Support `php_only` subset #148

Closed przepompownia closed 7 months ago

Wansmer commented 7 months ago

Thanks for the PR! Please add php_only to the languages section of README.md and create test files like for regular php.

More about tests here.

przepompownia commented 7 months ago

Looks like copy-paste (because of the same parser). What do you propose to avoid duplication?

Thanks for the PR! Please add php_only to the languages section of README.md and create test files like for regular php.

Wansmer commented 7 months ago

Looks like copy-paste (because of the same parser). What do you propose to avoid duplication?

If it's just a copy and paste, you don't need to. Does php_only and php have the same file extension? If so, let me know and I'll merge the PR.

przepompownia commented 7 months ago

If I understand correctly, php_only does not include injections for HTML - look at the queries in nvim-treesitter.

przepompownia commented 7 months ago

Yes, both are for php although I need to call

vim.treesitter.language.register('php_only', {'php'})

from my configs.

przepompownia commented 7 months ago

Thanks!