Closed rodhash closed 2 years ago
One more thing that would be nice is to not match ">" in the middle of the line.
Currently my "=>" for the callback fn became half highlighted:
Or perhaps would be ok to apply the highlight when it's actually closing with %>
as I have inside my <li>
tag.
Can you paste an example
Sorry delay..
Sure, in this example I'm updating the title:
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title><%= pageTitle %></title>
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/forms.css">
<link rel="stylesheet" href="/css/product.css">
</head>
Here, it's a full file (404.ejs) with 3 different includes:
<%- include('./includes/head.ejs') %>
</head>
<%- include('./includes/navigation.ejs') %>
<body>
<h1>Page Not Found!</h1>
<%- include('./includes/end.ejs') %>
Here, we have two variables kindofday
and el
and a array method being used forEach
:
<body>
<h1><%= kindOfDay %> </h1>
<ul>
<% itemList.forEach( el => { %>
<li><%= el %> </li>
<% }) %>
</ul>
</body>
tree-sitter doesn't recognise them:
nvim-treesitter needs to add the embedded_template language (no checkmark): https://github.com/nvim-treesitter/nvim-treesitter#supported-languages
Hello,
Is it possible to add EJS chars for HTML lang? Like "<%" and "<%=" for opening and "%>" for closing. I tried myself but no luck there.
Thanks