{"id":13898149,"url":"https://github.com/castwide/vscode-solargraph","last_synced_at":"2025-04-05T09:09:17.274Z","repository":{"id":18857995,"uuid":"85450354","full_name":"castwide/vscode-solargraph","owner":"castwide","description":"A Visual Studio Code extension for Solargraph.","archived":false,"fork":false,"pushed_at":"2023-12-05T22:07:16.000Z","size":2465,"stargazers_count":419,"open_issues_count":80,"forks_count":26,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-04-14T19:37:11.354Z","etag":null,"topics":["intellisense","language-server","ruby","solargraph","vscode"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/castwide.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}},"created_at":"2017-03-19T04:18:36.000Z","updated_at":"2024-06-09T01:56:07.860Z","dependencies_parsed_at":"2022-08-13T19:50:10.003Z","dependency_job_id":"5c7eb713-169a-478f-951c-31f25b8f8f86","html_url":"https://github.com/castwide/vscode-solargraph","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/castwide%2Fvscode-solargraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/castwide%2Fvscode-solargraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/castwide%2Fvscode-solargraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/castwide%2Fvscode-solargraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/castwide","download_url":"https://codeload.github.com/castwide/vscode-solargraph/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247312082,"owners_count":20918344,"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","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":["intellisense","language-server","ruby","solargraph","vscode"],"created_at":"2024-08-06T18:04:07.455Z","updated_at":"2025-04-05T09:09:17.257Z","avatar_url":"https://github.com/castwide.png","language":"TypeScript","readme":"# VS Code Solargraph Extension\n\nSolargraph is a language server that provides intellisense, code completion, and inline documentation for Ruby.\n\n![Screenshot](vscode-solargraph-0.34.1.gif)\n\n## Features\n\n* Context-aware suggestions and documentation for the Ruby core\n* Detection of some variable types and method return values (e.g., `String.new.` returns String instance methods)\n* Identification of local, class, and instance variables within the current scope\n* Find references and rename symbols (experimental as of solargraph gem v0.22.0)\n* Support for gems\n* Near-complete support for the Ruby core and stdlib\n* Partial support for Ruby on Rails\n\n## Requirements\n\nYou need to install the Ruby gem:\n\n    gem install solargraph\n\n## Usage\n\n### Code Completion\n\nOpen a Ruby file and start typing. Solargraph should start providing contextual code suggestions. To start a search manually, hit ctrl-space. Example:\n\n    Stri # \u003c- Hitting ctrl-space here will suggest String\n\nMethod arguments and documentation can be seen by starting parentheses after the method call. Example:\n\n    String.new.casecmp( # \u003c- Displays arguments and documentation for String#casecmp\n\n### Documentation\n\nSolargraph provides a command to access searchable documentation directly from the IDE.\n\n* Hit ctrl+shift+r (or hit ctrl+shift+p and find `Search Ruby Documentation`).\n* Enter a keyword or path to search; e.g., `String` or `Array#join`.\n\nThe documentation includes the Ruby core, required gems, and the current workspace. Documentation from the workspace is automatically updated when you save the corresponding file.\n\nYou can also hover over variables, constants, and method calls to see popup information with links to more documentation.\n\n#### Documenting Your Code\n\nUsing [YARD](http://www.rubydoc.info/gems/yard/file/docs/GettingStarted.md) for inline documentation is highly recommended.\nSolargraph will use YARD comments to provide the best code completion and API reference it can.\n\nIn addition to the standard YARD tags, Solargraph defines a `@type` tag for documenting variable types. It works with both\nlocal and instance variables. Example:\n\n    # @type [String]\n    my_variable = some_method_call\n    my_variable. # \u003c= Hitting crtl-space here will suggest String instance methods\n\n### Intellisense\n\nSolargraph also provides hovers and go to definition.\n\nHover your mouse over code to see method definitions, return values, and links to documentation.\n\nTo go to a method or variable's definition, right-click and select \"Go to Definition\" from the context menu, or press F12 for the definition at the cursor.\n\n### Gem Support\n\nSolargraph is capable of providing code completion and documentation for gems. When your code uses `require` to include a gem, its classes and methods become available in completion and intellisense.\n\nThe language server will automatically cache documentation for your gems in the background. You can also build the caches with the commands `Build new gem documentation` or `Rebuild all gem documentation` in the command palette.\n\n### Solargraph and Bundler\n\nIf your project uses Bundler, the most comprehensive way to use your bundled gems is to bundle Solargraph.\n\nIn the Gemfile:\n\n    gem 'solargraph', group: :development\n\nStart the language server with Bundler by setting the `solargraph.useBundler` option to `true`. The language server will automatically map your bundle's gems.\n\n\u003e Note: solargraph.bundlerPath should be an absolute path to bundler executable.\n\n### Diagnostics (Linting)\n\nTo enable diagnostics, set the `solargraph.diagnostics` configuration to `true`.\n\nSolargraph uses RuboCop for diagnostics by default. If your project has a .solargraph.yml file, you can configure the diagnostics in its `reporters` section. Example:\n\n    reporters:\n    - rubocop\n\nSee [the configuration guide](https://solargraph.org/guides/configuration) for more information about the .solargraph.yml file.\n\nUse a .rubocop.yml file in your project's root folder to customize the linting rules.\n\n### Restarting Solargraph\n\nSome changes you make to a project, such as updating the Gemfile, might require you to restart the Solargraph server.\nInstead of reloading the VS Code window, you can run Restart Solargraph from the Command Palette.\n\n### Project Configuration\n\nSolargraph will use the .solargraph.yml file for configuration if it exists in the workspace root. The extension provides\na command to `Create a Solargraph config file`, or you can do it from the command line:\n\n    $ solargraph config .\n\nThe default file should look something like this:\n\n    include:\n      - ./**/*.rb\n    exclude:\n      - spec/**/*\n\nThis configuration tells Solargraph to parse all .rb files in the workspace excluding the spec folder.\n\n## Extension Settings\n\nThis extension contributes the following settings:\n\n* `solargraph.commandPath`: Path to the solargraph command.  Set this to an absolute path to select from multiple installed Ruby versions.\n* `solargraph.useBundler`: Use `bundle exec` to run solargraph. (If this is true, `solargraph.commandPath` is ignored.)\n* `solargraph.bundlerPath`: Path to the bundle command.\n* `solargraph.checkGemVersion`: Check if a new version of the Solargraph gem is available. Default is true (recommended).\n* `solargraph.diagnostics`: Enable diagnostics reporting. See [the configuration guide](https://solargraph.org/guides/configuration) for diagnostics options.\n* `solargraph.completion`: Enable autocompletion.\n* `solargraph.hover`: Enable tips on hover.\n* `solargraph.autoformat`: Enable automatic formatting while typing.\n* `solargraph.formatting`: Enable document formatting. The gem currently uses RuboCop for formatting.\n* `solargraph.symbols`: Enable search for document and workspace symbols.\n* `solargraph.definitions`: Enable go-to-definition.\n* `solargraph.rename`: Enable symbol renaming.\n* `solargraph.references`: Enable finding references.\n* `solargraph.folding`: Enable folding ranges.\n* `solargraph.transport`: socket (default), stdio, or external. See [Transport Options](#transport-options) for more information.\n* `solargraph.externalServer`: The host and port for external transports. See [Transport Options](#transport-options) for more information.\n* `solargraph.logLevel`: The logging level. Options in ascending amount of detail are `warn`, `info`, and `debug`. The default is `warn`.\n\n## Transport Options\n\nExtension version 0.18.0 introduces the `solargraph.transport` setting with the following options:\n\n* `socket`: Run a TCP server. This is the default option.\n* `stdio`: Run a STDIO server.\n* `external`: Connect to an external server instead of starting a new one.\n\nMost users should use the default `socket` option or switch to `stdio` in case of network issues.\n\nThe `external` option is intended for cases where the project is hosted in a different environment from the editor,\nsuch as a docker container or a remote server. Users can opt to run a socket server in the remote environment and connect\nto it via TCP. Example configuration:\n\n    \"solargraph.transport\": \"external\",\n    \"solargraph.externalServer\": {\n        \"host\": \"localhost\",\n        \"port\": 7658\n    }\n\n## More Information\n\nSee the [Solargraph website](https://solargraph.org) for guides, tips, and updates.\n\n## Known Issues\n\n* Partial support for Rails (see [https://solargraph.org/guides/rails](https://solargraph.org/guides/rails))\n* Documentation pages need better design/layout\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcastwide%2Fvscode-solargraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcastwide%2Fvscode-solargraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcastwide%2Fvscode-solargraph/lists"}