Registry / devops / coc-blade-formatter

coc-blade-formatter

JSON →
library0.5.3jsnpmunverified

A coc.nvim extension providing Laravel Blade template formatting using blade-formatter (v0.5.3). This project is archived and no longer maintained; users should migrate to the successor coc-blade. It formats .blade.php files with configurable indent size, wrap line length, and wrap attributes. Requires the filetype to be set to 'blade' and coc.nvim >= 0.0.80. The extension can format via CocAction('format') or the :CocCommand bladeFormatter.run.

npm install coc-blade-formatter
INSTALL
IMPORT
SIG · COC-BLADE-FORMATTE
C
coc-blade-formatter
devopsjavascriptv0.5.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

bladeFormatter.run
run via :CocCommand bladeFormatter.run
attempting to require('coc-blade-formatter')
This is a coc.nvim extension, not a Node.js library. It provides commands accessible via coc.nvim, not exports.
Format on save
Use coc.nvim settings: 'coc.preferences.formatOnSaveFiletypes': ['blade']
trying to call format function from a script
Formatting is triggered through coc.nvim's built-in format actions.
Configuration
Set in coc-settings.json: { 'bladeFormatter.enable': true }
importing config from the extension package
Configuration options are set via coc.nvim's JSON settings file.

Shows installation via vim-plug, filetype setup, and usage of the format command.

" Install coc-blade-formatter with vim-plug Plug 'yaegassy/coc-blade-formatter', {'do': 'yarn install --frozen-lockfile'} " In your .vimrc, ensure filetype is set au BufNewFile,BufRead *.blade.php set filetype=blade " Then use :CocCommand bladeFormatter.run to format the current file
Debug
Known issues
deprecatedThis project is archived and no longer maintained. Please migrate to coc-blade.
fix
Uninstall coc-blade-formatter and install coc-blade (see GitHub).
affects: >=0.0
gotchaThe extension will not work unless the filetype is set to 'blade'.
fix
Add 'au BufNewFile,BufRead *.blade.php set filetype=blade' to vimrc.
affects: >=0.0
breakingcoc-blade-formatter depends on coc.nvim engine ^0.0.80. Older versions of coc.nvim may break.
fix
Update coc.nvim to >= 0.0.80.
affects: <0.0.80
Errors
Common errors & fixes
CocAction('format') does nothing
Filetype is not set to 'blade' or bladeFormatter.enable is false.
fix
Set filetype to blade and ensure bladeFormatter.enable is true in coc-settings.json.
E492: Not an editor command: CocCommand bladeFormatter.run
coc-blade-formatter is not installed or coc.nvim is not running.
fix
Install the extension via :CocInstall coc-blade-formatter and restart Neovim.
blade-formatter not found
bladeFormatter.path is set incorrectly or the built-in formatter is missing.
fix
Leave bladeFormatter.path empty to use the built-in blade-formatter, or provide a valid absolute path.
Upgrade
Version history
0.5.3latest on npm
Audit
Dependencies
coc.nvimrequiredRequired runtime host for the extension, engine coc ^0.0.80
Agent activity
4 hits · last 30 days
node
4
Resources
coc-blade-formatter — npm install coc-blade-formatter · libregistry