biomejs / biome-zed

Biome extension for Zed
https://biomejs.dev
MIT License
156 stars 6 forks source link

Error: biome.json is not found but require_config_file is true #50

Closed mpicardvolvo closed 3 weeks ago

mpicardvolvo commented 3 weeks ago

Current State

Expected State

Trashpants commented 3 weeks ago

Also seeing the same message in my gutter

Screenshot 2024-10-10 at 10 36 35

if it helps here's my config:

{
    "assistant": {
        "default_model": {
            "provider": "zed.dev",
            "model": "claude-3-5-sonnet-20240620"
        },
        "version": "2"
    },
    "project_panel": {
        "dock": "right",
        "indent_size": 12
    },
    "tabs": {
        "close_position": "left"
    },
    "ui_font_size": 13,
    "buffer_line_height": "comfortable",
    "buffer_font_size": 14,
    "theme": {
        "mode": "system",
        "light": "One Light",
        "dark": "Xcode Presentation Dark"
    },
    "ui_font_family": "MonoLisa",
    "buffer_font_family": "MonoLisa",
    "format_on_save": "on",
    "autosave": "on_focus_change",
    "formatter": {
        "language_server": {
            "name": "biome"
        }
    },
    "code_actions_on_format": {
        "source.fixAll.biome": true,
        "source.organizeImports.biome": true
    },
    "lsp": {
        "biome": {
            "settings": {
                "require_config_file": true
            }
        }
    }
}
ematipico commented 3 weeks ago

Can someone provide the Daemon logs?

biome rage --daemon-logs

Trashpants commented 3 weeks ago
CLI:
  Version:                      1.9.3
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v20.18.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "bun/1.1.0"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Workspace:
  Open Documents:               0

Discovering running Biome servers...

Incompatible Biome Server: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

ℹ Rage discovered this running server using an incompatible version of Biome.

Server:
  Version:                      1.6.1

Incompatible Biome Server: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

ℹ Rage discovered this running server using an incompatible version of Biome.

Server:
  Version:                      1.7.3

Server:
  Status:                       stopped

Incompatible Biome Server: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

ℹ Rage discovered this running server using an incompatible version of Biome.

Server:
  Version:                      1.8.3
nileshmali commented 3 weeks ago

Facing same issue, here are logs from my machine:

CLI:
  Version:                      1.9.3
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           unset
  JS_RUNTIME_NAME:              unset
  NODE_PACKAGE_MANAGER:         unset

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Workspace:
  Open Documents:               0

Discovering running Biome servers...
ematipico commented 3 weeks ago

As you may have noticed, you're running multiple servers. Maybe that's the issue. Try to kill all the processes first , maybe that will solve the issue.

Trashpants commented 3 weeks ago

As you may have noticed, you're running multiple servers. Maybe that's the issue. Try to kill all the processes first , maybe that will solve the issue.

possibly stupid question, but how do I do that, I can't see any obvious guidance on how to do that?

also interestingly when I run bunx biome version I get:

CLI:        1.9.3
Server:     not connected
luckydye commented 3 weeks ago

This is actually a bug in the extension.

Woraround for now may be:

"lsp": {
  "biome": {
    "settings": {
      "config_path": "./biome.json",
      "require_config_file": true
    }
  }
}

Im working on a fix. Also trying to implement some tests finally..

Trashpants commented 3 weeks ago

looks like setting the config path both as relative or absolute doesn't seem to change things for me :( Thanks for looking into this!

mjbergman92 commented 3 weeks ago
{
  "language_servers": [
    "biome"
  ],
  "code_actions_on_format": {
    "source.fixAll.biome": true,
    "source.organizeImports.biome": true
  },
  "formatter": {
    "language_server": {
      "name": "biome"
    }
  },
  "lsp": {
    "biome": {
      "settings": {
        "config_path": "./biome.json",
        "require_config_file": true
      }
    }
  }
}

Same issue here. I have no lsp right now.

luckydye commented 3 weeks ago

There was a bug in zed. We will have to wait for https://github.com/zed-industries/zed/commit/518f8cc5b73c528f04a0d357936885aa6298fb74 to release for it to be fixed.

ematipico commented 3 weeks ago

Can the be issue closed?

luckydye commented 3 weeks ago

Yes, the extension should at least work again without additional changes I think.