ruby icon indicating copy to clipboard operation
ruby copied to clipboard

monorepo with multi languages

Open Stanislav-Lapata opened this issue 1 year ago • 2 comments

I have repo with structure

repo-name/
  backend/
    app/
    ...
    Gemfile
    Gemfile.lock
    ...
  frontend/
  admin/
  ...

backend folder include rails app I run zed from repo-name folder and expect that ruby extension detects Gemfile file and will start ruby-lsp/solargraph/rubocop inside backend/ folder not root folder but it starts lsp from root and creates .ruby-lsp folder in root folder screenshot-2024-11-29-07-33-39

.zed/settings.json file

{
 "languages": {
   "Ruby": {
     "language_servers": [
       "ruby-lsp",
       "!solargraph",
       "..."
     ],
     "format_on_save": "on",
   },
 },
}

Stanislav-Lapata avatar Nov 29 '24 07:11 Stanislav-Lapata

Hello! AFAIK this is not currently possible but there is a related discussion about extending the Extension API to support running multiple LSPs in different directories - https://github.com/zed-industries/zed/discussions/21990

You might be able to work around this by adding project folders from the monorepo as separate folders to your workspace.

vitallium avatar Dec 14 '24 18:12 vitallium

@vitallium thanks for the answer

Stanislav-Lapata avatar Dec 16 '24 04:12 Stanislav-Lapata