Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📝 editorconfig: max_line_length is ignored when using LSP #3923

Closed
1 task done
chrisgrieser opened this issue Sep 16, 2024 · 0 comments · Fixed by #3948
Closed
1 task done

📝 editorconfig: max_line_length is ignored when using LSP #3923

chrisgrieser opened this issue Sep 16, 2024 · 0 comments · Fixed by #3948
Assignees
Labels
A-LSP Area: language server protocol S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@chrisgrieser
Copy link

chrisgrieser commented Sep 16, 2024

When setting max_line_length to a value, that value is respected when using biome --format, but ignored when using the biome LSP from inside the editor.

Environment information

CLI:
  Version:                      1.9.1
  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:           "v22.8.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/10.8.2"

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

Formatter:
  Format with errors:           true
  Indent style:                 Tab
  Indent width:                 2
  Line ending:                  Lf
  Line width:                   80
  Attribute position:           Auto
  Bracket spacing:              BracketSpacing(true)
  Ignore:                       []
  Include:                      []

JavaScript Formatter:
  Enabled:                      true
  JSX quote style:              Double
  Quote properties:             AsNeeded
  Trailing commas:              All
  Semicolons:                   Always
  Arrow parentheses:            Always
  Bracket spacing:              unset
  Bracket same line:            false
  Quote style:                  Double
  Indent style:                 unset
  Indent width:                 unset
  Line ending:                  unset
  Line width:                   unset
  Attribute position:           unset

JSON Formatter:
  Enabled:                      true
  Indent style:                 unset
  Indent width:                 unset
  Line ending:                  unset
  Line width:                   unset
  Trailing Commas:              unset

CSS Formatter:
  Enabled:                      true
  Indent style:                 unset
  Indent width:                 unset
  Line ending:                  unset
  Line width:                   unset
  Quote style:                  Double

GraphQL Formatter:
  Enabled:                      false
  Indent style:                 unset
  Indent width:                 unset
  Line ending:                  unset
  Line width:                   unset
  Bracket spacing:              unset
  Quote style:                  unset

Workspace:
  Open Documents:               0

Configuration

biome.jsonc

{
  "formatter": {
    "useEditorconfig": true
  }
}

editorconfig

root = true

[*]
max_line_length = 100

Playground link

I do not know how to showcase the cli and LSP difference via the Playground.

to reproduce

  • biome check --write → uses line length of 100 (correct)
  • running LSP formatting (in my case: vim.lsp.buf.format() in nvim) → uses line length 80 (false)

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@ematipico ematipico self-assigned this Sep 16, 2024
@ematipico ematipico added A-LSP Area: language server protocol S-Bug-confirmed Status: report has been confirmed as a valid bug labels Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LSP Area: language server protocol S-Bug-confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants