本站资源收集于互联网,不提供软件存储服务,每天免费更新优质的软件以及学习资源!

SublimeTextConfigforLaravel

网络教程 app 1℃

SublimeTextConfigforLaravel

本文档介绍了笔者使用 Sublime Text 编辑器进行 Laravel 应用开发时的配置方案。

插件

以下插件显著提升了开发效率:

GitBlameGitGutterAdvancedNewFileSyncSideBarLSPLSP-intelephenseLSP-bashLSP-dockerfileLSP-eslintLSP-jsonVue 语法高亮LSP-slimLSP-tailwindcssTerminusFile IconsCodeiumShellExecute

插件安装方法:使用 cmd + shift + p / alt + shift + p 打开命令面板,选择“安装插件”进行安装。

LSP 配置

LSP 插件依赖 Node.js,请先安装 Node.js:

Intelephense 配置

安装 Intelephense:

npm -g i intelephense

在 Sublime Text 中,打开 Preferences > Package Settings > LSP > Servers > lsp-intelephense,配置如下:

{ "enabled": true, "mand": [ "intelephense", "–stdio", ], "scopes": ["source.php", "embedding.php"], "syntaxes": ["packages/php/php.sublime-syntax"], "languageid": "php", "initializationoptions": { "clearcache": false, "licencekey": "", },}

启用 LSP:在命令面板中选择 LSP: Enable Language Server。

Sublime Text 设置

使用 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}

按键绑定

添加以下按键绑定:

[ { "mand": "lsp_symbol_definition", "args": {"side_by_side": false }, "keys": ["super+enter" ], "context": [{ "key": "lsp.session_with_capability", "operator": "equal", "operand": "definitionprovider"},{ "key": "auto_plete_visible", "operator": "equal", "operand": false} ] }, // … (其余按键绑定保持不变)]

鼠标绑定

添加以下鼠标绑定:

[ { "button": "button1", "count": 1, "modifiers": ["super"], "press_mand": "drag_select", "mand": "lsp_symbol_definition" }, { "button": "button1", "count": 1, "modifiers": ["ctrl"], "press_mand": "drag_select", "press_args": {"additive": true} }]

更多细节请访问我的博客原文。

以上就是Sublime Text Config for Laravel的详细内容,更多请关注范的资源库其它相关文章!

转载请注明:范的资源库 » SublimeTextConfigforLaravel

喜欢 (0)