Skip to content

Instantly share code, notes, and snippets.

@PyaeSoneAungRgn
Last active February 25, 2023 03:48
Show Gist options
  • Save PyaeSoneAungRgn/e868e42d1237b81e374fc99b158f7b37 to your computer and use it in GitHub Desktop.
Save PyaeSoneAungRgn/e868e42d1237b81e374fc99b158f7b37 to your computer and use it in GitHub Desktop.
My Personal Sublime Setup

Requirements

php-cs-fixer

composer global require friendsofphp/php-cs-fixer

php-cs-fixer --version

phpactor

cd ~
git clone git@github.com:phpactor/phpactor
cd phpactor
composer install
cd /usr/local/bin
sudo ln -s ~/phpactor/bin/phpactor phpactor

phpactor --version

Packages

Settings

{
    "ignored_packages":[
        "Vintage",
    ],
    "color_scheme":"Packages/GitHub Theme/schemes/GitHub Light.sublime-color-scheme",
    "theme":"GitHub Adaptive.sublime-theme",
    "font_face":"JetBrains Mono", 
    "font_size":18,
    "line_padding_bottom":7,
    "line_padding_top":7,
    "caret_extra_bottom":12,
    "caret_extra_top":12,
    "hide_tab_scrolling_buttons":true,
    "highlight_line":false,
    "highlight_gutter": false,
    "margin":10, 
    "mini_diff": "auto",
}

Key Bindings

[
    { "keys":["alt+i"], "command":"phpactor_import_class" },
    { "keys":["alt+n"], "command": "phpactor_transform", "args": { "transform": "fix_namespace_class_name" } },
    { "keys":["alt+g"], "command":"phpactor_goto_definition" },
    { "keys":["alt+r"], "command":"phpactor_references" },
    { "keys":["alt+r", "alt+n"], "command":"phpactor_rename_variable" },
    { "keys":["alt+enter"], "command":"phpactor_context_menu" },
]

Package Settings

LSP

{
    "show_diagnostics_panel_on_save": 0,
    "diagnostics_gutter_marker": "dot",
    "document_highlight_style": "",
    "diagnostics_highlight_style": {
        "error": "squiggly",
        "warning": "squiggly",
        "info": "squiggly",
        "hint": "squiggly"
   },
   "clients": {
        "phpactor": {
            "command": [
                "phpactor",
                "language-server",
            ],
            "enabled": true,
            "languageId": "php",
            "scopes": [
                "source.php",
                "embedding.php"
            ],
            "syntaxes": [
                "Packages/PHP/PHP.sublime-syntax"
            ]
        }
    }
}

PHP CS Fixer

{
    "on_save": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment