Code Monkey home page Code Monkey logo

php-enhanced-treesitter.nvim's Introduction

🔦 Php enhanced treesitter

This plugin improve default php treesitter grammar.

✨ Features

Using this plugin, you will have

  • SQL syntax for string, heredoc and nowdoc strings containing SQL ;
  • Some improvements on highlights ($ will have a different color than the variable name, different color for namespace prefix...)

⚡️ Requirements

  • Neovim >= 0.9.1

📦 Installation

Install the plugin with your preferred package manager:

-- Lua
require("lazy").setup(
  { "gbprod/php-enhanced-treesitter.nvim" }
)

You should have Php and SQL syntax treesitter syntax installed.

php-enhanced-treesitter.nvim's People

Contributors

gbprod avatar kedodrill avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

php-enhanced-treesitter.nvim's Issues

Highlight missing on simple UPDATE query

Hello.

There is no highlight for the following query:

UPDATE table_name SET column = 'value' WHERE column = 'value'

This happens because the UPDATE injection is expecting the "FROM" keyword, which is not required on the "UPDATE" statement.
I think it might be as simple as removing the "FROM" keyword from the "UPDATE" statement.

By the way, great job on the plugin/query injection, very helpful.

Variable Reference in string SQL Query Breaks Highlighting

Thank you for the work you've done on this plugin.

The main PHP code base I work in has a ton of SQL queries in strings. I've noticed while using this plugin, the SQL syntax highlighting inside of those strings works great, except for when a variable is used in that string. In that case, the highlighting stops for every character after that variable reference. Not sure if that would need to be fixed with the injection in this plugin or on the Tree-Sitter SQL side. Let me know if you have any ideas on how to get around this. I have attached a screen shot of one very small query that has this issue.

Screenshot 2023-03-01 at 10 57 31 AM

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.