{"id":32122487,"url":"https://github.com/opensourceame/slim-vscode-extension","last_synced_at":"2026-02-21T19:34:12.643Z","repository":{"id":307853748,"uuid":"1029113105","full_name":"opensourceame/slim-vscode-extension","owner":"opensourceame","description":"A Visual Studio Code extension that adds formatting, outline view and syntax highlighting for the Slim / Trim languages.","archived":false,"fork":false,"pushed_at":"2025-12-20T14:44:30.000Z","size":2698,"stargazers_count":3,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-22T06:27:10.606Z","etag":null,"topics":["html-css-javascript","slim","templates","trim","visual-studio-code","visual-studio-code-extension","visual-studio-extension"],"latest_commit_sha":null,"homepage":"","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/opensourceame.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-30T14:40:30.000Z","updated_at":"2025-12-20T14:44:34.000Z","dependencies_parsed_at":"2025-08-02T17:31:44.461Z","dependency_job_id":"45688f55-2434-47e9-ab9d-b39d0eb071bd","html_url":"https://github.com/opensourceame/slim-vscode-extension","commit_stats":null,"previous_names":["opensourceame/slim-vscode-extension"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/opensourceame/slim-vscode-extension","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensourceame%2Fslim-vscode-extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensourceame%2Fslim-vscode-extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensourceame%2Fslim-vscode-extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensourceame%2Fslim-vscode-extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opensourceame","download_url":"https://codeload.github.com/opensourceame/slim-vscode-extension/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensourceame%2Fslim-vscode-extension/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29691045,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T18:18:25.093Z","status":"ssl_error","status_checked_at":"2026-02-21T18:18:22.435Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["html-css-javascript","slim","templates","trim","visual-studio-code","visual-studio-code-extension","visual-studio-extension"],"created_at":"2025-10-20T20:50:55.973Z","updated_at":"2026-02-21T19:34:12.631Z","avatar_url":"https://github.com/opensourceame.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Slim/Trim Language Support for VS Code\n\nA comprehensive VS Code extension that provides syntax highlighting, formatting and code folding for Slim and Trim templates.\n\n## Features\n\n### Syntax Highlighting\n- **HTML Elements**: Proper highlighting for all HTML tags\n- **Attributes**: Support for ID (#) and class (.) selectors\n- **Ruby Code**: Embedded Ruby code with proper syntax highlighting\n- **Comments**: Support for both single line and block comments\n- **Text Content**: Proper highlighting for text content with pipe (|) syntax\n- **Doctype**: Special highlighting for doctype declarations\n\n### Formatting\n- **Auto-indentation**: Automatic indentation based on Slim structure\n- **Configurable indentation**: Support for both spaces and tabs\n- **Format on Save**: Option to automatically format files when saving\n- **Range Formatting**: Format specific sections of code\n- **On-type Formatting**: Auto-indent when pressing Enter\n\n### Code Folding\n- **Intelligent Folding**: Automatic folding ranges based on content structure\n- **Block-based Folding**: Folds blocks with more than 5 lines by default\n- **Configurable Threshold**: Adjustable minimum line count for folding via settings\n- **Nested Folding**: Supports nested folding ranges for complex templates\n- **Visual Indicators**: Clear fold markers for easy navigation\n\n### Document Outline\n- **Elements with IDs**: quickly jump to any element with an ID from an alphabetical list\n- **Blocks**: jump to declarations of non-Slim blocks (CSS, Javascript, etc.)\n\n### Syntax Linting\n- **Real-time Error Detection**: Shows syntax errors and warnings as you type\n- **Configurable Rules**: Enable/disable specific linting rules via settings\n- **Syntax Validation**: Validates tag names, attributes, brackets, and Ruby code\n- **Indentation Checking**: Ensures consistent indentation throughout your templates\n- **Duplicate ID Detection**: Warns about duplicate IDs within the same document\n- **Ruby Syntax Validation**: Basic validation of embedded Ruby code syntax\n- **Smart Block Detection**: Automatically skips linting for non-Slim blocks (CSS, JavaScript, SCSS, Ruby, comments)\n\n## Installation\n\n### From Source\n1. Clone this repository\n2. Run `npm install` to install dependencies\n3. Run `npm run compile` to build the extension\n4. Press `F5` in VS Code to launch the extension in a new window\n\n### From VSIX\n1. Build the extension: `npm run compile`\n2. Package the extension: `vsce package`\n3. Install the generated `.vsix` file in VS Code\n\n## Configuration\n\nThe extension has multiple settings that can be changed:\n\n![Settings](https://raw.githubusercontent.com/opensourceame/slim-vscode-extension/master/images/screenshot-settings.png)\n\n### Basic Settings\n\n- `slim.indentSize`: Number of spaces for indentation (default: 2)\n- `slim.useTab`: Use tabs instead of spaces (default: false)\n- `slim.formatOnSave`: Format files automatically on save (default: false)\n- `slim.codeFoldingDepth`: Minimum number of lines that can be folded (default: 2)\n- `slim.preserveNonSlimIndentation`: Preserve non-Slim indentation when formatting (default: true)\n- `slim.outlineSortAlphabetically`: Sort outline items alphabetically by id#tag (default: true)\n\n### Linting Configuration\n\n- `slim.linting.enabled`: Enable/disable Slim template linting (default: true)\n- `slim.linting.validateSyntax`: Validate basic Slim syntax (tags, attributes, brackets) (default: true)\n- `slim.linting.validateIndentation`: Validate indentation consistency (default: true)\n- `slim.linting.validateRuby`: Validate embedded Ruby code syntax (default: true)\n- `slim.linting.validateIds`: Check for duplicate IDs in the document (default: true)\n- `slim.linting.warnEmptyTags`: Show warnings for empty tags with only selectors (default: false)\n\n## Usage\n\n### Syntax Highlighting\n\n![Syntax Highlighting](https://raw.githubusercontent.com/opensourceame/slim-vscode-extension/master/images/screenshot-syntax.png)\n\n### Formatting\n\n- `Format Document` (Shift+Alt+F): Format the entire document\n- `Format Selection` (Ctrl+K Ctrl+F): Format selected text\n- Auto-format on save (if enabled)\n\n![Formatting Commands](https://raw.githubusercontent.com/opensourceame/slim-vscode-extension/master/images/screenshot-formatting.png)\n\n### Outline\n\n![Outline](https://raw.githubusercontent.com/opensourceame/slim-vscode-extension/master/images/screenshot-outline.png)\n\nOutlines also show CSS/SCSS elements within a template\n\n![Outline with CSS](https://raw.githubusercontent.com/opensourceame/slim-vscode-extension/master/images/screenshot-outline-css.png)\n\n### Code folding\n\n**Folding Behavior:**\n- Adjust the threshold via `slim.codeFoldingDepth` setting\n\n### Linting\n\n![Linting](https://raw.githubusercontent.com/opensourceame/slim-vscode-extension/master/images/screenshot-linting.png)\n\n## Supported File Types\n- `.slim` files\n- `.trim` files\n\n## Requirements\n- VS Code 1.60.0 or higher\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests if applicable\n5. Submit a pull request\n\n## License\n\n(c) David Kelly 2025\n\nMIT License - see LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensourceame%2Fslim-vscode-extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopensourceame%2Fslim-vscode-extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensourceame%2Fslim-vscode-extension/lists"}