Code Monkey home page Code Monkey logo

php-namespace-resolver's Introduction

PHP Namespace Resolver

Latest Release Installs Rating

PHP Namespace Resolver can import and expand your class. You can also sort your imported classes by line length or in alphabetical order.

Demo

Commands

Search these commands by the title on command palette.

[
    {
        "title": "Import Class",
        "command": "namespaceResolver.import"
    },
    {
        "title": "Import All Classes",
        "command": "namespaceResolver.importAll"
    },
    {
        "title": "Expand Class",
        "command": "namespaceResolver.expand"
    },
    {
        "title": "Sort Imports",
        "command": "namespaceResolver.sort"
    },
    {
        "title": "Highlight Not Imported Classes",
        "command": "namespaceResolver.highlightNotImported"
    },
    {
        "title": "Highlight Not Used Classes",
        "command": "namespaceResolver.highlightNotUsed"
    },
    {
        "title": "Generate namespace for this file",
        "command": "namespaceResolver.generateNamespace"
    }
]

Settings

You can override these default settings according to your needs.

{
    "namespaceResolver.exclude": "**/node_modules/**",  // Exclude glob pattern while finding files
    "namespaceResolver.showMessageOnStatusBar": false,  // Show message on status bar instead of notification box
    "namespaceResolver.autoSort": true,                 // Auto sort after imports
    "namespaceResolver.sortOnSave": false,              // Auto sort when a file is saved
    "namespaceResolver.sortAlphabetically": false,      // Sort imports in alphabetical order instead of line length
    "namespaceResolver.sortNatural": false,             // Sort imports using a 'natural order' algorithm
    "namespaceResolver.leadingSeparator": true,         // Expand class with leading namespace separator
    "namespaceResolver.highlightOnSave": false,         // Auto highlight not imported and not used when a file is saved
    "namespaceResolver.highlightOnOpen": false          // Auto highlight not imported and not used when a file is opened
}

Keybindings

You can override these default keybindings on your keybindings.json.

[
    {
        "command": "namespaceResolver.import",
        "key": "ctrl+alt+i",
        "when": "editorTextFocus"
    },
    {
        "command": "namespaceResolver.importAll",
        "key": "ctrl+alt+a",
        "when": "editorTextFocus"
    },
    {
        "command": "namespaceResolver.expand",
        "key": "ctrl+alt+e",
        "when": "editorTextFocus"
    },
    {
        "command": "namespaceResolver.sort",
        "key": "ctrl+alt+s",
        "when": "editorTextFocus"
    },
    {
        "command": "namespaceResolver.highlightNotImported",
        "key": "ctrl+alt+n",
        "when": "editorTextFocus"
    },
    {
        "command": "namespaceResolver.highlightNotUsed",
        "key": "ctrl+alt+u",
        "when": "editorTextFocus"
    },
    {
        "command": "namespaceResolver.generateNamespace",
        "key": "ctrl+alt+g",
        "when": "editorTextFocus"
    }
]

Author

License

MIT License.

Copyright (c) 2017 Mehedi Hassan

php-namespace-resolver's People

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.