We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In php files, using php tags in html results in the php inside these tags being indented incorrectly.
Ideally, the php inside the php tags should observe the same indenting rules as any other php.
:checkhealth nvim-treesitter
nvim-treesitter: require("nvim-treesitter.health").check() Installation ~ - OK `tree-sitter` found 0.20.8 (660481dbf71413eba5a928b0b0ab8da50c1109e0) (parser generator, only needed for :TSInstallFromGrammar) - WARNING `node` executable not found (only needed for :TSInstallFromGrammar, not required for :TSInstall) - OK `git` executable found. - OK `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" } Version: cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 - OK Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI. OS Info: { machine = "x86_64", release = "5.19.0-32-generic", sysname = "Linux", version = "#33~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Jan 30 17:03:34 UTC 2" } ~ Parser/Features H L F I J - bash ✓ ✓ ✓ . ✓ - c ✓ ✓ ✓ ✓ ✓ - css ✓ . ✓ ✓ ✓ - fish ✓ ✓ ✓ ✓ ✓ - git_config ✓ . ✓ . ✓ - gitcommit ✓ . . . ✓ - html ✓ ✓ ✓ ✓ ✓ - javascript ✓ ✓ ✓ ✓ ✓ - json ✓ ✓ ✓ ✓ . - lua ✓ ✓ ✓ ✓ ✓ - markdown ✓ . ✓ ✓ ✓ - markdown_inline ✓ . . . ✓ - php ✓ ✓ ✓ ✓ ✓ - php_only ✓ ✓ ✓ ✓ ✓ - python ✓ ✓ ✓ ✓ ✓ - query ✓ ✓ ✓ ✓ ✓ - rust ✓ ✓ ✓ ✓ ✓ - scss ✓ . ✓ ✓ . - sql ✓ . . ✓ ✓ - ssh_config ✓ ✓ ✓ ✓ ✓ - toml ✓ ✓ ✓ ✓ ✓
nvim --version
NVIM v0.10.0-dev-2170+g8b2365369 Build type: Release LuaJIT 2.1.1705947465 Run "nvim -V1 -v" for more info
Here is simple code that reproduces the problem (after gg=G), so you can verify:
<?php require('/example.php'); ?> <?php $var = 0; ?> <div> <div> <div> <?php if ($var > 0) { echo 'yes'; } else { echo 'no'; } ?> </div> </div> <?php if ($var > 0) { echo 'yes'; } else { echo 'no'; } ?> </div>
How it should look:
Treesitter config in lua:
require'nvim-treesitter.configs'.setup { -- A list of parser names, or "all" (the five listed parsers should always be installed) ensure_installed = { "bash", "c", "css", "fish", "git_config", "gitcommit", "html", "javascript", "json", "lua", "php", "php_only", "query", "rust", "scss", "sql", "ssh_config", "toml", "vim", "vimdoc" }, -- Install parsers synchronously (only applied to `ensure_installed`) sync_install = false, -- Automatically install missing parsers when entering buffer -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally auto_install = true, highlight = { enable = true, additional_vim_regex_highlighting = false }, incremental_selection = { enable = true }, indent = { enable = true } }
Thank you for your time.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
In php files, using php tags in html results in the php inside these tags being indented incorrectly.
To Reproduce
Expected behavior
Ideally, the php inside the php tags should observe the same indenting rules as any other php.
Output of
:checkhealth nvim-treesitter
Output of
nvim --version
Additional context
Here is simple code that reproduces the problem (after gg=G), so you can verify:
How it should look:
Treesitter config in lua:
Thank you for your time.
The text was updated successfully, but these errors were encountered: