{"id":13600653,"url":"https://github.com/yaegassy/coc-blade","last_synced_at":"2025-10-17T12:53:47.795Z","repository":{"id":37298915,"uuid":"413298849","full_name":"yaegassy/coc-blade","owner":"yaegassy","description":"Laravel Blade Templates extension for coc.nvim. Provides \"formatter\", \"linter\", \"completion\" and more...","archived":false,"fork":false,"pushed_at":"2024-06-21T00:17:56.000Z","size":922,"stargazers_count":54,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-28T13:42:26.492Z","etag":null,"topics":["blade","coc","coc-extensions","coc-nvim","completion","formatter","laravel","linter","neovim","php","vim"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/coc-blade","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yaegassy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-04T06:24:31.000Z","updated_at":"2025-02-23T16:22:52.000Z","dependencies_parsed_at":"2024-01-16T23:26:11.319Z","dependency_job_id":"26bbadb8-79cb-460d-b9c0-1dcbfaa22381","html_url":"https://github.com/yaegassy/coc-blade","commit_stats":{"total_commits":543,"total_committers":3,"mean_commits":181.0,"dds":"0.016574585635359074","last_synced_commit":"98e92f758ef3715ca0fe33cae015df69f9780485"},"previous_names":[],"tags_count":143,"template":false,"template_full_name":null,"purl":"pkg:github/yaegassy/coc-blade","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaegassy%2Fcoc-blade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaegassy%2Fcoc-blade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaegassy%2Fcoc-blade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaegassy%2Fcoc-blade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yaegassy","download_url":"https://codeload.github.com/yaegassy/coc-blade/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaegassy%2Fcoc-blade/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274107872,"owners_count":25223472,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blade","coc","coc-extensions","coc-nvim","completion","formatter","laravel","linter","neovim","php","vim"],"created_at":"2024-08-01T18:00:45.818Z","updated_at":"2025-10-17T12:53:42.758Z","avatar_url":"https://github.com/yaegassy.png","language":"TypeScript","funding_links":[],"categories":["Language Support"],"sub_categories":[],"readme":"# coc-blade\n\nLaravel Blade Templates extension for [coc.nvim](https://github.com/neoclide/coc.nvim). Provides \"formatter\", \"linter\", \"completion\" and more...\n\n\u003cimg width=\"760\" alt=\"coc-blade-demo\" src=\"https://user-images.githubusercontent.com/188642/135827583-09771a6d-2d14-48ee-bd9e-e1081ee3c8ad.gif\"\u003e\n\n## Features\n\n- Format\n  - by [blade-formatter](https://github.com/shufo/blade-formatter)\n- Lint\n  - using [Stillat/blade-parser-typescript](https://github.com/Stillat/blade-parser-typescript)\n- Completion\n  - Blade Snippets Completion\n  - Blade Directive Completion\n- Definition\n  - Jump to template file specified by `@extends`, `@include` directive, etc.\n  - Jump to \"Blade Components\" file.\n    - **[Warning]** Class-based Components are not supported.\n  - Jump to \"Jetstream Components\" file.\n- Code Action\n  - Add a blade comment to disable the formatting.\n- Hover\n\n## Install\n\n**CocInstall**:\n\n```vim\n:CocInstall coc-blade\n```\n\n**vim-plug**:\n\n```vim\nPlug 'yaegassy/coc-blade', {'do': 'yarn install --frozen-lockfile'}\n```\n\n**Recommended coc extension**:\n\n## (Optional) Additional installation of laravel blade related coc-extension\n\n- [@yaegassy/coc-laravel](https://github.com/yaegassy/coc-laravel)\n  - Various completions, definitions, references, hovers, diagnostics, codeActions, artisan and sail commands integration and more features for Laravel projects.\n- [@yaegassy/coc-intelephense](https://github.com/yaegassy/coc-intelephense)\n  - intelephense (PHP language server) extension for coc.nvim. intelephense's various LSP features and this extension's additional features are available.\n- [coc-html](https://github.com/neoclide/coc-html)\n  - html-related support will be added in blade\n\n## Note\n\n### Filetype related\n\nThe \"filetype\" must be `blade` for this extension to work.\n\nInstall \"blade\" related plugin (e.g. [jwalton512/vim-blade](https://github.com/jwalton512/vim-blade) or [sheerun/vim-polyglot](https://github.com/sheerun/vim-polyglot) or [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) with [tree-sitter-blade](https://github.com/EmranMR/tree-sitter-blade)).\n\nFor more information on setup `tree-sitter-blade` in `nvim-treesitter`, please click here.\n\n- \u003chttps://github.com/EmranMR/tree-sitter-blade/discussions/19\u003e\n\n## Usage Topics\n\n### formatter (blade-formatter)\n\n**Run**:\n\n- `:call CocAction('format')`\n- `:CocCommand bladeFormatter.run`\n\n\u003e If there is a \"syntax error\" in the blade template, the formatting will fail.\n\n**Configuration file: .bladeformatterrc.json or .bladeformatterrc**:\n\nTo configure settings per project, put `.bladeformatterrc.json` or `.bladeformatterrc` to your project root will blade-formatter treat it as setting files.\n\nConfiguration file will like below:\n\n```json\n{\n    \"indentSize\": 4,\n    \"wrapAttributes\": \"auto\",\n    \"wrapLineLength\": 120,\n    \"endWithNewLine\": true,\n    \"useTabs\": false,\n    \"sortTailwindcssClasses\": true\n}\n```\n\n**Ignoring Files: .bladeignore**:\n\nTo ignore specific file, put `.bladeignore` to your repository root will `blade-formatter` treat it as ignored files.\n\n```gitignore\nresources/views/users/index.blade.php\nresources/views/products/*\nresources/views/books/**/*\n```\n\n**Disabling format in file**:\n\n- See: \u003chttps://github.com/shufo/blade-formatter#disabling-format-in-file\u003e\n\n\u003e In coc-blade, there is a code action feature to add a blade comment to disable the formatting.\n\n### linter (using Stillat/blade-parser-typescript)\n\nThis feature is enabled by default. If you do not need the linter feature, set `blade.bladeParserLint.enable` to `false`\n\n- [DEMO](https://github.com/yaegassy/coc-blade/pull/13)\n\n### snippets completion (laravel-blade-snippets-vscode)\n\nYou can auto-complete by typing `b:`, `lv:`, `Blade::`, `livewire::`.\n\nIt uses snippet files from [onecentlin/laravel-blade-snippets-vscode](https://github.com/onecentlin/laravel-blade-snippets-vscode) to provide completion.\n\n### directive completion\n\nYou can auto-complete by typing `@`.\n\n- [DEMO](https://github.com/yaegassy/coc-blade/pull/10)\n\n## Configuration options\n\n- `blade.enable`: Enable coc-blade extension, default: `true`\n- `blade.completion.enable`: Enable completion feature, default: `true`\n- `blade.completion.enableDirective`: Enable directive completion, default: `true`\n- `blade.completion.enableSnippets`: Enable snippets completion, default: `true`\n- `blade.completion.excludeSnippets`: Exclude specific prefix in snippet completion, e.g. `[\"b:extends\", \"lv:url\", \"Blade::component\"]`, default: `[]`\n- `blade.bladeFormatter.enable`: Enable/Disable the formatting feature by `blade-formatter`, default: `true`\n- `blade.bladeFormatter.optIndentSize`: Indent size, valid type `integer` or `null`, default: `null`,\n- `blade.bladeFormatter.optWrapLineLength`: The length of line wrap size, valid type `integer` or `null`, default: `null`\n- `blade.bladeFormatter.optWrapAttributes`: The way to wrap attributes, valid options `[\"auto\", \"force\", \"force-aligned\", \"force-expand-multiline\", \"aligned-multiple\", \"preserve\", \"preserve-aligned\"]`, valid type `string` or `null`, default: `null`\n- `blade.bladeFormatter.optEndWithNewLine`: End output with newline, default: `true`\n- `blade.bladeFormatter.optEndOfLine`: End of line character(s), valid options `[\"LF\", \"CRLF\"]`, valid type `string` or `null`, default: `null`\n- `blade.bladeFormatter.optUseTabs`: Use tab as indentation character, default: `false`\n- `blade.bladeFormatter.optSortTailwindcssClasses`: Sort Tailwindcss classes automatically. This option respects `tailwind.config.js` and sort classes according to settings, valid type `boolean` or `null`, default: `null`\n- `blade.bladeFormatter.optSortHtmlAttributes`: Sort HTML Attributes in the specified order, valid option `[\"none\", \"alphabetical\", \"code-guide\", \"idiomatic\", \"vuejs\", \"custom\"]`, default: `\"none\"`\n- `blade.bladeFormatter.optCustomHtmlAttributesOrder`: Comma separated custom HTML attributes order. To enable this you must specify sort html attributes option as `custom`. You can use regex for attribute names, valid type `string`, `string[]` or `null` default: `null`\n- `blade.bladeFormatter.optNoMultipleEmptyLines`: Collapses multiple blank lines into a single blank line, default: `false`\n- `blade.bladeFormatter.optNoPhpSyntaxCheck`: Disable PHP syntax check. Enabling this will suppress PHP syntax error reporting, default: `false`\n- `blade.bladeFormatter.optNoSingleQuote`: Use double quotes instead of single quotes for php expression, default: `false`\n- `blade.bladeFormatter.optWrapAttributesMinAttrs`: Minimum number of html tag attributes for force wrap attribute options. Wrap the first attribute only if 'force-expand-multiline' is specified in wrap attributes, valid type `integer` or `null`, default: `null`\n- `blade.bladeFormatter.optIndentInnerHtml`: Indent `\u003chead\u003e` and `\u003cbody\u003e` tag sections in html, default: `false`\n- `blade.bladeFormatter.optNoTrailingCommaPhp`: If set to true, no trailing commas are printed for php expression, default: `false`\n- `blade.bladeFormatter.optExtraLiners`: Comma separated list of tags that should have an extra newline before them, default: `[]`\n- `blade.bladeParserLint.enable`: Enable/Disable the linting feature using `stillat-blade-parser`, default: `true`\n- `blade.bladeParserLint.debug`: Output the results of the parsing of stillat-blade-parser to the channel log, default: `false`\n- `blade.bladeParserLint.optCustomIfs`: A list of custom if directives, default: `[]`\n- `blade.bladeParserLint.optDirectives`: A list of directives that can be parsed, default: `[]`\n- `blade.bladeParserLint.optIgnoreDirectives`: A list of directive names that should be ignored, default: `[]`\n\n## Commands\n\n- `blade.showOutput`: Show blade output channel\n- `blade.bladeFormatter.run`: Run blade-formatter\n- `blade.showReferences`: Show BladeDirective (`@...`) or BladeEcho (`{{ ... }}`, `{!! ... !!}`) location information for the current file\n\n## Code Actions\n\n**Example key mapping (Code Action related)**:\n\n```vim\nnmap \u003csilent\u003e ga \u003cPlug\u003e(coc-codeaction-line)\nnmap \u003csilent\u003e gA \u003cPlug\u003e(coc-codeaction)\n```\n\n**Actions**:\n\n- `Add \"blade-formatter-disable-next-line\" for this line`\n- `Add \"blade-formatter-disable\" for this line`\n- `Add \"blade-formatter-enable\" for this line`\n- `Add \"blade-formatter-disable\" for whole file`\n\n## Thanks\n\n- [shufo/blade-formatter](https://github.com/shufo/blade-formatter)\n- [shufo/vscode-blade-formatter](https://github.com/shufo/vscode-blade-formatter)\n- [Stillat/blade-parser-typescript](https://github.com/Stillat/blade-parser-typescript)\n- [onecentlin/laravel-blade-snippets-vscode](https://github.com/onecentlin/laravel-blade-snippets-vscode)\n\n## License\n\nMIT\n\n---\n\n\u003e This extension is built with [create-coc-extension](https://github.com/fannheyward/create-coc-extension)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaegassy%2Fcoc-blade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyaegassy%2Fcoc-blade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaegassy%2Fcoc-blade/lists"}