Konfigurasi Sublime Text untuk develop aplikasi Laravel

Image
Categories
laravel
Content

Berikut merupakan konfigurasi yang saya gunakan ketika develop aplikasi laravel menggunakan sublime text text editor.

PLUGINS

  • git
  • git blame
  • git gutter
  • sidebar menu advanced
  • syncedsidebar
  • lsp
  • lsp intelephense
  • lsp bash
  • lsp dockerfile
  • lsp eslint
  • lsp volar
  • vue syntax highlight
  • lsp svelte
  • lsp tailwindcss
  • terminus
  • fileicons
  • a file icon
  • codeium
  • shell exec

untuk menginstall plugin buka command pallete dengan cmd + shift + p / alt + shift + p pilih install plugin

LSP

untuk plugin LSP memerlukan nodejs, jadi pertama-tama kita install nodejs

cara install https://github.com/nvm-sh/nvm#installing-and-updating

cara penggunaan https://github.com/nvm-sh/nvm#usage

setelah terinstall jalankan perintah ini:

npm -g i intelephense

Buka Menu LSP > Servers > LSP-intelephense dibawah menu Package Settings

{
    "enabled": true,
    "command": [
        "intelephense",
        "--stdio",
    ],
    "scopes": ["source.php", "embedding.php"],
    "syntaxes": ["Packages/PHP/PHP.sublime-syntax"],
    "languageId": "php",
    "initializationOptions": {
        "clearCache": false,
        "licenceKey": "",
    },
}

buka command palette pilih enable LSP: Enable Language Server

Settings Preferences

buka cmd + , / alt + ,

{
	"ignored_packages":
	[
		"Git",
		"Git blame",
		"GitGutter",
		"Vintage",
	],
	"save_on_focus_lost": true,
    "shell_exec_executable": "/bin/zsh",
	"shell_exec_output": "panel",
	"shell_exec_output_word_wrap": false
}

Key Bindings
[
    {
        "command": "lsp_symbol_definition",
        "args": {
            "side_by_side": false
        },
        "keys": [
            "super+enter"
        ],
        "context": [
            {
                "key": "lsp.session_with_capability",
                "operator": "equal",
                "operand": "definitionProvider"
            },
            {
                "key": "auto_complete_visible",
                "operator": "equal",
                "operand": false
            }
        ]
    },

    {
        "command": "lsp_format_document",
        "keys": [
            "super+shift+'"
        ],
        "context": [
            {
                "key": "lsp.session_with_capability",
                "operator": "equal",
                "operand": "documentFormattingProvider | documentRangeFormattingProvider"
            }
        ]
    },
    { "keys": ["super+b"], "command": "toggle_side_bar" },
    { "keys": ["super+t"], "command": "toggle_terminus_panel" },
    { "keys": ["super+shift+o"], "command": "close_all" },
    {
        "keys": ["super+shift+t"],
        "caption": "Terminus: Open Default Shell in Split Tab",
        "command": "terminus_open",
        "args": {
            "post_window_hooks": [
                ["carry_file_to_pane", {"direction": "down"}]
            ]
        }
    },
    {
      "keys": ["super+shift+;"],
      "command": "shell_exec_run",
      "args": {
        "format": "./vendor/bin/pint"
      }
    }
]
Mouse Bindings
[
    {
        "button": "button1", 
        "count": 1, 
        "modifiers": ["super"],
        "press_command": "drag_select",
        "command": "lsp_symbol_definition"
    },
	{
		"button": "button1", "count": 1, "modifiers": ["ctrl"],
		"press_command": "drag_select",
		"press_args": {"additive": true}
	}
]

Mac M1(M2)

Sublime Text build 4169

1 . open your terminal

cd "/Applications/Sublime Text.app/Contents/MacOS/" || exit
md5 -q sublime_text | grep -i "3AEA5F094739BC66C5A6C11A4EA08B58" || exit
echo 000A5AAB: 48 C7 C0 00 00 00 00 C3 | xxd -r - sublime_text
echo 0000C7D5: 90 90 90 90 90 | xxd -r - sublime_text
echo 0000C7ED: 90 90 90 90 90 | xxd -r - sublime_text
echo 000A701D: C3 | xxd -r - sublime_text
echo 000A56A6: C3 | xxd -r - sublime_text
echo 0108A908: 00 00 80 D2 C0 03 5F D6 | xxd -r - sublime_text
echo 010118F4: 1F 20 03 D5 | xxd -r - sublime_text
echo 01011908: 1F 20 03 D5 | xxd -r - sublime_text
echo 0108BB94: C0 03 5F D6 | xxd -r - sublime_text
echo 0108A588: C0 03 5F D6 | xxd -r - sublime_text
codesign --force --deep --sign - "/Applications/Sublime Text.app"
‘Help’ -> License

License Key:

----- BEGIN LICENSE -----
TwitterInc
200 User License
EA7E-890007
1D77F72E 390CDD93 4DCBA022 FAF60790
61AA12C0 A37081C5 D0316412 4584D136
94D7F7D4 95BC8C1C 527DA828 560BB037
D1EDDD8C AE7B379F 50C9D69D B35179EF
2FE898C4 8E4277A8 555CE714 E1FB0E43
D5D52613 C3D12E98 BC49967F 7652EED2
9D2D2E61 67610860 6D338B72 5CF95C69
E36B85CC 84991F19 7575D828 470A92AB
------ END LICENSE ------