2

I recently switched to Neovim and I tried to configure native LSP with Treesitter.

I ran into some wrong highlighting with PHP combined with HTML. Everytime when I write php in html element, closing tag is not highlighted.

enter image description here

Treesitter cfg:

local configs = require'nvim-treesitter.configs'
configs.setup {
  ensure_installed = 'maintained', --Only use parsers that are maintained
  highlight = { -- enable highlighting
    enable = true,
  },
  indent = {
    enabled = true,
  },
}

I found something about multiple lang support for one file type with language injections but I have no idea how to implement that.

1 Answer 1

2

Issue with neovim treesitter.

Issue: https://github.com/nvim-treesitter/nvim-treesitter/issues/2565

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.