Shopify / Shopify/ruby-lsp

Add support for `slim` files

Open
#1,233 9 comments 13 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help-wanted pinned
Dominant language
Ruby
Stars
2k
Forks
281
Avg merge
2h 14m
Merged PRs (30d)
6

Description

I have checked that this feature is not already implemented
  • This feature does not exist
Use case

Slim is a fairly popular choice among ruby/rails devs and adding support for it is actually not a lot of work once ERB support is merged

Description

Ruby intellisense for slim printing lines, none-printing lines and ruby code blocks

ruby:
 print_msg = true

- if print_msg
  = 'hello world'.capitalize
Implementation

Following the same Idea in issue#1055 the LSP can require slim gem from the main bundle and provide the feature only if it's found
As for parsing slim, The lsp doesn't have to worry about that!
instead it can use Slim::ERBConverter.new(options).call(slim_code) which outputs erb code

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading issue #1055 and the Ruby LSP bundle-loading path. Investigate how Slim::ERBConverter.new(options).call(slim_code) can provide ERB input when the slim gem is available. Done means Slim files support Ruby intellisense for printing lines, non-printing lines, and Ruby code blocks without requiring Slim when it is absent.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.