GithubHelp home page GithubHelp logo

canova / brackets-php-smarthints Goto Github PK

View Code? Open in Web Editor NEW

This project forked from brackets-php/brackets-php-smarthints

0.0 2.0 0.0 1.53 MB

Trying to build a robust code hint/intelligence extension for PHP code in the Brackets editor

License: MIT License

CSS 5.72% JavaScript 91.73% HTML 2.55%

brackets-php-smarthints's Introduction

PHP-SmartHints

** Note on status for this extension ** - At the end of 2014 I was making significant progress towards phase 2 functionality outlined below. I still intend to complete this work and publish the most kick-ass PHP code hinting extension for Brackets, but it's taking more time than I had hoped due to real life and work (the kind of work that pays the bills) getting in the way. Stay tuned, this will be a very good release once I get the time to finish it ;)

This extension is the first project I started to make PHP a first-class citizen in Brackets. It is intended to be an intelligent code hinting tool to make PHP developers' lives easier when coding PHP in the Brackets code editor.

The extension makes use of the core CodeHintManager module in Brackets.

screenshot

This extension is being rolled out in phases that incrementally add useful features on the base of simple code hints on PHP code.

  • Phase 1: base release offering hinting of local variables (i.e. those declared in the current document such as $myVar), predefined variables from PHP (e.g. $_POST), predefined constants (e.g. __FILE__), predefined functions (e.g. json_encode), and PHP keywords (e.g. foreach). This release has some known issues, but is generally useful and is the most feature complete PHP code hint extension in the Brackets Registry even in this initial release.

  • Phase 2: will add further functionality to the extension. It is planned to be able to pick up class hinting from classes in scope from an include/require or use statement. The specific feature set has not been determined for this release yet, but it should be the start of putting the smart in SmartHints ;)

  • Phase 3: will try and work on parameter hinting so that you get some guidance on entering parameters with functions. This functionality is not currently covered by a core Brackets module but the core dev team has built parameter hinting in to the JS hint manager so there is some prior art to work with for this feature.

** Please note that this extension will make NO ATTEMPT to support PHP prior to version 5.3 and any issues/PRs that are specific to versions prior to 5.3 will be closed without review **

Filter PHP Functions by Module

As of release 1.1.0, you can add project-level filtering of which PHP modules are included in the hint list for PHP files. This helps reduce the size of the lists and therefore allow the suggestions to be more suited to your specific project.

The filter can be set in one of two ways:

  • using the new Project Settings Dialog UI (see below for a screenshot). This dialog is accessed using the lightbulb icon on the toolbar.
  • editing the .brackets.json file manually. This file must be in the root of your PHP project. The key you edit is: "php-sig.php-smarthints.filteredFunctionList" and it takes an array of module shortnames as modules you do want included. The module short names can be found in the phpdata/php-function-groups.json config file.

Note if there is no setting in the project-level .brackets.json file, the default is that *all modules are included in hinting.

Filter Dialog

####Changelog

CHANGELOG

note - you should also check out the execellent PHP Code Quality Tools extension from Mikael Jorhult for PHP linting and code style checking.

brackets-php-smarthints's People

Contributors

canova avatar denisov21 avatar dominic28 avatar hirse avatar mackenza avatar rainje avatar sebsebmc avatar waffle-iron avatar

Watchers

 avatar  avatar

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.