biome
biome copied to clipboard
docs: update language server setup info for Helix
Summary
The info on Helix was out of date, version 23.10
has been out for 5 weeks+: https://helix-editor.com/news/release-23-10-highlights/. It now has the multiple language servers feature built in. You can see it is widely adopted here: https://github.com/helix-editor/helix#installation, and anyone can download the binary https://github.com/helix-editor/helix/releases/tag/23.10, so it is readily available for all users.
Another point of concern is the redundancy of keys in the current configuration. Many of the keys are unnecessary duplicates, as they are already inherited from the default configuration found at https://github.com/helix-editor/helix/blob/master/languages.toml. Users should only need to specify overrides or add new keys in their personal configuration files. I have not altered that as perhaps there was a reason behind this decision I might not be aware of?
Thank you for providing information about setting up Helix; it's truly appreciated!
Deploy Preview for biomejs canceled.
Name | Link |
---|---|
Latest commit | 4211b499eb96c688ff1c20fd02028246358b2203 |
Latest deploy log | https://app.netlify.com/sites/biomejs/deploys/6579a9e8629e0400085e0d14 |
I am testing some configs out and am getting unsupported method: textDocument/formatting
in the Helix log. Is biome meant to offer LSP formatting?
Helix can use something like the previous formatter = { command = "biome", args = ["format", "--stdin-file-path", "test.js"]}
but it is only a fallback and might not even work unless biome can accept an argument to tell it what language to format, for example Prettier takes:
formatter = { command = 'prettier', args = ["--parser", "html"] }
I am testing some configs out and am getting
unsupported method: textDocument/formatting
in the Helix log. Is biome meant to offer LSP formatting?Helix can use something like the previous
formatter = { command = "biome", args = ["format", "--stdin-file-path", "test.js"]}
but it is only a fallback and might not even work unless biome can accept an argument to tell it what language to format, for example Prettier takes:formatter = { command = 'prettier', args = ["--parser", "html"] }
Formatting is enabled with dynamic capabilities, but we plan to revert this change and make the registration in standard way
@ematipico Thanks for the info! Do you have an idea when this change will happen? It will affect this pull request, so I could wait if it was expected soonish to avoid any attempts at hacky workarounds.
@ematipico Thanks for the info! Do you have an idea when this change will happen? It will affect this pull request, so I could wait if it was expected soonish to avoid any attempts at hacky workarounds.
I plan to change this in the next couple of weeks
@ematipico I have been trying to solve this formatting issue on the Helix side too, and just had a message from one of the core maintainers regarding your language server implementation. Perhaps you could have a quick look and comment? https://github.com/helix-editor/helix/discussions/8987#discussioncomment-7753651
Yeah that would work too :) although this is a change planned regardless, because there are few LSP services out there that don't support dynamic registration.
Formatting is enabled with dynamic capabilities, but we plan to revert this change and make the registration in standard way
Hi, I see https://github.com/biomejs/biome/pull/1104/files is merged, great! I assume this fixes the problem with Helix and LSP formatting... do you have an idea when a new version will be released, or a nightly with this feature on NPM?
I just published one
OK, I have made the changes I mentioned and it all seems great :) This should be ready to merge as soon as the new version of Biome is published.
@bugeats I see you made the last relevant change to these docs before me, does this look good to you?
@bugeats I see you made the last relevant change to these docs before me, does this look good to you?
Yep looks right to me but I haven't tested it verbatim in Helix.
We will merge this once the next release lands :)
The 1.5.0 release is out :)
The 1.5.0 release is out :)
Hi there. I already installed it but there is some errors:
This is an example of my config file:
{
name = "tsx";
auto-format = true;
language-servers = [
{
name = "typescript-language-server";
except-features = ["format"];
}
"biome"
];
auto-pairs = commonAutoPairs;
}
@linuxmobile The warnings are fine and should not affect things working, they just reflect what Helix can do right now. The errors seem to come from type-script-language-server so seem to be an issue with that.
Is biome working for you? It works fine for me with the settings I provided in this pull request, at least with TypeScript. Here are the warnings and errors I get running a TypeScript project, biome linting and formatting are working fine:
2024-01-13T11:14:57.592 helix_term::application [WARN] Received unregistration request for unsupported method: workspace/didChangeConfiguration
2024-01-13T11:14:57.592 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/rangeFormatting
2024-01-13T11:14:57.592 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/onTypeFormatting
2024-01-13T11:14:57.592 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/rename
2024-01-13T11:14:57.592 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/formatting
2024-01-13T11:14:57.592 helix_term::application [WARN] Ignoring a client/registerCapability request because dynamic capability registration is not enabled. Please report this upstream to the language server
2024-01-13T11:14:57.592 helix_term::application [WARN] Ignoring a client/registerCapability request because dynamic capability registration is not enabled. Please report this upstream to the language server
2024-01-13T11:14:57.592 helix_term::application [WARN] Ignoring a client/registerCapability request because dynamic capability registration is not enabled. Please report this upstream to the language server
2024-01-13T11:14:57.639 helix_term::application [ERROR] received malformed notification from Language Server: Unhandled
You can see the biome lint in the top corner:
I am running the latest Helix master, if biome is not working as intended with the settings in this pull request, could you try the latest master? Cheers!
@linuxmobile The warnings are fine and should not affect things working, they just reflect what Helix can do right now. The errors seem to come from type-script-language-server so seem to be an issue with that.
Is biome working for you? It works fine for me with the settings I provided in this pull request, at least with TypeScript. Here are the warnings and errors I get running a TypeScript project, biome linting and formatting are working fine:
2024-01-13T11:14:57.592 helix_term::application [WARN] Received unregistration request for unsupported method: workspace/didChangeConfiguration 2024-01-13T11:14:57.592 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/rangeFormatting 2024-01-13T11:14:57.592 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/onTypeFormatting 2024-01-13T11:14:57.592 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/rename 2024-01-13T11:14:57.592 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/formatting 2024-01-13T11:14:57.592 helix_term::application [WARN] Ignoring a client/registerCapability request because dynamic capability registration is not enabled. Please report this upstream to the language server 2024-01-13T11:14:57.592 helix_term::application [WARN] Ignoring a client/registerCapability request because dynamic capability registration is not enabled. Please report this upstream to the language server 2024-01-13T11:14:57.592 helix_term::application [WARN] Ignoring a client/registerCapability request because dynamic capability registration is not enabled. Please report this upstream to the language server 2024-01-13T11:14:57.639 helix_term::application [ERROR] received malformed notification from Language Server: Unhandled
You can see the biome lint in the top corner:
I am running the latest Helix master, if biome is not working as intended with the settings in this pull request, could you try the latest master? Cheers!
I'm using the helix master branch. Biome linting is working perfect. The log error in Helix happens when I want to format the code, until then the error does not appear. (Obviously it doesn't format the code)
TypeScript seems to format fine, and here is my Helix log after the format:
2024-01-13T15:50:17.200 helix_term::application [WARN] Received unregistration request for unsupported method: workspace/didChangeConfiguration
2024-01-13T15:50:17.200 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/rangeFormatting
2024-01-13T15:50:17.200 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/onTypeFormatting
2024-01-13T15:50:17.200 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/rename
2024-01-13T15:50:17.200 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/formatting
2024-01-13T15:50:17.200 helix_term::application [WARN] Ignoring a client/registerCapability request because dynamic capability registration is not enabled. Please report this upstream to the language server
2024-01-13T15:50:17.200 helix_term::application [WARN] Ignoring a client/registerCapability request because dynamic capability registration is not enabled. Please report this upstream to the language server
2024-01-13T15:50:17.200 helix_term::application [WARN] Ignoring a client/registerCapability request because dynamic capability registration is not enabled. Please report this upstream to the language server
2024-01-13T15:50:17.212 helix_term::application [ERROR] received malformed notification from Language Server: Unhandled
2024-01-13T15:50:21.940 helix_lsp::util [WARN] LSP position Position { line: 95, character: 0 } out of range assuming EOF
Why not try and format the same file as me and see if it works: https://github.com/David-Else/zombie-attack-4/blob/main/src/index.ts
Here is my Helix config:
[language-server]
biome = { command = "biome", args = ["lsp-proxy"] }
[[language-server.vscode-json-language-server.config.json.schemas]]
fileMatch = ["tsconfig.json", "tsconfig.*.json"]
url = "https://json.schemastore.org/tsconfig.json"
[[language-server.vscode-json-language-server.config.json.schemas]]
fileMatch = [ "package.json" ]
url = "https://json.schemastore.org/package.json"
[language-server.rust-analyzer.config]
check.command = "clippy"
# check = {command = "clippy", extraArgs = ["--", "-W", "clippy::unwrap_used", "-W", "clippy::expect_used", "-W", "clippy::pedantic", "-W", "clippy::nursery"]}
[language-server.ltex-ls.config]
ltex.diagnosticSeverity = "warning"
ltex.disabledRules = { "en-US" = ["PROFANITY"], "en-GB" = ["PROFANITY"] }
ltex.dictionary = { "en-US" = ["builtin", "Lazygit", "chainable", "textobject", "textobjects", "togglable", "Deno" ], "en-GB" = ["builtin", "Lazygit", "chainable", "textobject", "textobjects", "togglable", "Deno" ] }
[language-server.yaml-language-server.config.yaml]
schemas = { "https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/ansible.json#/$defs/playbook" = "*play*.{yml,yaml}" }
[[language]]
name = "markdown"
text-width = 80
soft-wrap = { wrap-at-text-width = true }
language-servers = ["ltex-ls", "marksman"]
formatter = { command = 'prettier', args = [
"--parser",
"markdown",
"--prose-wrap",
"never", # <always|never|preserve>
] }
auto-format = true
[[language]]
name = "html"
language-servers = [ "vscode-html-language-server", "tailwindcss-ls" ]
formatter = { command = 'prettier', args = ["--parser", "html"] }
[[language]]
name = "json"
language-servers = [ { name = "vscode-json-language-server", except-features = [ "format" ] }, "biome"]
[[language]]
name = "css"
language-servers = [ "vscode-css-language-server", "tailwindcss-ls" ]
formatter = { command = 'prettier', args = ["--parser", "css"] }
[[language]]
name = "yaml"
formatter = { command = 'prettier', args = ["--parser", "yaml"] }
auto-format = true
[[language]]
name = "javascript"
language-servers = [ { name = "typescript-language-server", except-features = [ "format" ] }, "biome"]
auto-format = true
[[language]]
name = "typescript"
language-servers = [ { name = "typescript-language-server", except-features = [ "format" ] }, "biome"]
auto-format = true
[[language]]
name = "bash"
formatter = { command = 'shfmt', args = ["-i", "4"] }
auto-format = true
[[language]]
name = "git-commit"
language-servers = ["ltex-ls"]
[[language]]
name = "python"
formatter = { command = "black", args = ["--quiet", "-"] }
auto-format = true
language-servers = ["pyright"]
# pyproject.toml
# [tool.pyright]
# typeCheckingMode = "strict"
@ematipico Do you think this is Biome or a Helix problem?
Why not try and format the same file as me and see if it works: https://github.com/David-Else/zombie-attack-4/blob/main/src/index.ts
I just tried this repo (bun i, just in case), and it doesn't work either.
I leave you my configuration, in case you need to check it: https://github.com/linuxmobile/kaku/blob/main/home/editors/helix/languages.nix
2024-01-13T13:24:32.494 helix_term::application [WARN] Received unregistration request for unsupported method: workspace/didChangeConfiguration
2024-01-13T13:24:32.495 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/rangeFormatting
2024-01-13T13:24:32.495 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/onTypeFormatting
2024-01-13T13:24:32.495 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/rename
2024-01-13T13:24:32.495 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/formatting
2024-01-13T13:24:32.495 helix_term::application [WARN] Ignoring a client/registerCapability request because dynamic capability registration is not enabled. Please report this upstream to the language server
2024-01-13T13:24:32.495 helix_term::application [WARN] Ignoring a client/registerCapability request because dynamic capability registration is not enabled. Please report this upstream to the language server
2024-01-13T13:24:32.495 helix_term::application [WARN] Ignoring a client/registerCapability request because dynamic capability registration is not enabled. Please report this upstream to the language server
2024-01-13T13:24:32.591 helix_term::application [ERROR] received malformed notification from Language Server: Unhandled
2024-01-13T13:24:41.810 helix_lsp::transport [ERROR] err: <- Other(failed to send a message to server
I am experiencing the same issue. How can I help in isolating this?
@linuxmobile
I leave you my configuration, in case you need to check it: https://github.com/linuxmobile/kaku/blob/main/home/editors/helix/languages.nix
I had a look, and it is wrong and not the config provided in this pull request. Am I misunderstanding something? Please try disabling your current languages.toml
and just using the provided one. If that works you can then build back your custom one from that. You don't need to be adding any format
arguments when calling the Biome executable, all the formatting is handled automatically inside the language server.
formatter = {
command = "biome";
args = ["format" "--stdin-file-path" "a.js"]; <<<< Not needed!
I had a look, and it is wrong and not the config provided in this pull request
In fact, the configuration I had was exactly what you provide, but it didn't work for me. If you look at the commit I added that yesterday. And now it works perfectly for me. I have no idea if the example you offer is wrong or what. But this way it is working for me
Hi, same problem, linter works but formatting does not.
hx --version
helix 23.10 (f6021dd0)
biome --version
Version: 1.5.3
language.toml
[language-server]
biome = { command = "biome", args = ["lsp-proxy"] } # language server definition like in doc
[[language]]
name = "rust"
auto-format = true
[[language]]
name = "go"
auto-format = true
[[language]]
name = "html"
formatter = { command = 'prettier', args = ["--parser", "html"] }
[[language]]
name = "css"
formatter = { command = 'prettier', args = ["--parser", "css"] }
[[language]]
name = "javascript"
language-servers = [ { name = "typescript-language-server", except-features = [ "format" ] }, "biome" ]
auto-format = true
[[language]]
name = "typescript"
language-servers = [ { name = "typescript-language-server", except-features = [ "format" ] }, "biome"] # like in doc
auto-format = true
[[language]]
name = "json"
language-servers = [ { name = "vscode-json-language-server", except-features = [ "format" ] }, "biome" ]
auto-format = true
helix logs
2024-01-23T17:06:27.151 helix_term::application [WARN] Received unregistration request for unsupported method: workspace/didChangeConfiguration
2024-01-23T17:06:27.151 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/rangeFormatting
2024-01-23T17:06:27.151 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/onTypeFormatting
2024-01-23T17:06:27.151 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/rename
2024-01-23T17:06:27.151 helix_term::application [WARN] Received unregistration request for unsupported method: textDocument/formatting
2024-01-23T17:06:27.153 helix_term::application [WARN] Ignoring a client/registerCapability request because dynamic capability registration is not enabled. Please report this upstream to the language server
2024-01-23T17:06:27.153 helix_term::application [WARN] Ignoring a client/registerCapability request because dynamic capability registration is not enabled. Please report this upstream to the language server
2024-01-23T17:06:27.153 helix_term::application [WARN] Ignoring a client/registerCapability request because dynamic capability registration is not enabled. Please report this upstream to the language server
2024-01-23T17:06:27.319 helix_term::application [ERROR] received malformed notification from Language Server: Unhandled
biome logs
βbiome_cli::commands::daemon::Running Server{pid=33990}
ββ0ms INFO biome_cli::service::unix Trying to connect to socket /home/belozerskiy/.cache/biome/biome-socket-1.5.3
ββ0ms INFO biome_cli::service::unix Remove socket folder /home/belozerskiy/.cache/biome/biome-socket-1.5.3
βββbiome_lsp::server::initialize{root_uri=file:///home/belozerskiy/poligon/typescript_book/chapter2, capabilities=ClientCapabilities { workspace: Some(WorkspaceClientCapabilities { apply_edit: Some(true), workspace_edit: Some(WorkspaceEditClientCapabilities { document_changes: Some(true), resource_operations: Some([Create, Rename, Delete]), failure_handling: Some(Abort), normalizes_line_endings: Some(false), change_annotation_support: None }), did_change_configuration: Some(DynamicRegistrationClientCapabilities { dynamic_registration: Some(false) }), did_change_watched_files: Some(DidChangeWatchedFilesClientCapabilities { dynamic_registration: Some(true), relative_pattern_support: Some(false) }), symbol: Some(WorkspaceSymbolClientCapabilities { dynamic_registration: Some(false), symbol_kind: None, tag_support: None, resolve_support: None }), execute_command: Some(DynamicRegistrationClientCapabilities { dynamic_registration: Some(false) }), workspace_folders: Some(true), configuration: Some(true), semantic_tokens: None, code_lens: None, file_operations: None, inline_value: None, inlay_hint: Some(InlayHintWorkspaceClientCapabilities { refresh_support: Some(false) }) }), text_document: Some(TextDocumentClientCapabilities { synchronization: None, completion: Some(CompletionClientCapabilities { dynamic_registration: None, completion_item: Some(CompletionItemCapability { snippet_support: Some(true), commit_characters_support: None, documentation_format: None, deprecated_support: Some(true), preselect_support: None, tag_support: Some(TagSupport { value_set: [Deprecated] }), insert_replace_support: Some(true), resolve_support: Some(CompletionItemCapabilityResolveSupport { properties: ["documentation", "detail", "additionalTextEdits"] }), insert_text_mode_support: None, label_details_support: None }), completion_item_kind: Some(CompletionItemKindCapability { value_set: None }), context_support: None, insert_text_mode: None, completion_list: None }), hover: Some(HoverClientCapabilities { dynamic_registration: None, content_format: Some([Markdown]) }), signature_help: Some(SignatureHelpClientCapabilities { dynamic_registration: None, signature_information: Some(SignatureInformationSettings { documentation_format: Some([Markdown]), parameter_information: Some(ParameterInformationSettings { label_offset_support: Some(true) }), active_parameter_support: Some(true) }), context_support: None }), references: None, document_highlight: None, document_symbol: None, formatting: None, range_formatting: None, on_type_formatting: None, declaration: None, definition: None, type_definition: None, implementation: None, code_action: Some(CodeActionClientCapabilities { dynamic_registration: None, code_action_literal_support: Some(CodeActionLiteralSupport { code_action_kind: CodeActionKindLiteralSupport { value_set: ["", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports"] } }), is_preferred_support: Some(true), disabled_support: Some(true), data_support: Some(true), resolve_support: Some(CodeActionCapabilityResolveSupport { properties: ["edit", "command"] }), honors_change_annotations: None }), code_lens: None, document_link: None, color_provider: None, rename: Some(RenameClientCapabilities { dynamic_registration: Some(false), prepare_support: Some(true), prepare_support_default_behavior: None, honors_change_annotations: Some(false) }), publish_diagnostics: Some(PublishDiagnosticsClientCapabilities { related_information: None, tag_support: None, version_support: Some(true), code_description_support: None, data_support: None }), folding_range: None, selection_range: None, linked_editing_range: None, call_hierarchy: None, semantic_tokens: None, moniker: None, type_hierarchy: None, inline_value: None, inlay_hint: Some(InlayHintClientCapabilities { dynamic_registration: Some(false), resolve_support: None }) }), window: Some(WindowClientCapabilities { work_done_progress: Some(true), show_message: None, show_document: None }), general: Some(GeneralClientCapabilities { regular_expressions: None, markdown: None, stale_request_support: None, position_encodings: Some([PositionEncodingKind("utf-8"), PositionEncodingKind("utf-32"), PositionEncodingKind("utf-16")]) }), experimental: None }, client_info=ClientInfo { name: "helix", version: Some("23.10 (f6021dd0)") }, root_path="/home/belozerskiy/poligon/typescript_book/chapter2", workspace_folders=[WorkspaceFolder { uri: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/home/belozerskiy/poligon/typescript_book/chapter2", query: None, fragment: None }, name: "chapter2" }]}
β ββ0ms INFO biome_lsp::server Starting Biome Language Server...
β ββ0ms WARN biome_lsp::server The Biome Server was initialized with the deprecated `root_path` parameter: this is not supported, use `root_uri` instead
β ββ0ms WARN biome_lsp::server The Biome Server was initialized with the `workspace_folders` parameter: this is unsupported at the moment, use `root_uri` instead
βββ
βββbiome_lsp::server::initialized{params=InitializedParams}
β ββ0ms INFO biome_lsp::server Attempting to load the configuration from 'biome.json' file
β βββbiome_lsp::session::load_extension_settings{}
β βββbiome_lsp::session::load_workspace_settings{}
β β βββbiome_fs::fs::os::OsFileSystem::open_with_options{path="/home/belozerskiy/poligon/typescript_book/chapter2/biome.json", options=OpenOptions { read: true, write: false, truncate: false, create: false, create_new: false }}
β β βββ
β β βββbiome_fs::fs::os::OsFile::read_to_string{}
β β βββ
β β βββbiome_json_parser::parse{}
β β βββ
β β ββ0ms INFO biome_lsp::session Loaded workspace setting
β β ββ0ms DEBUG biome_lsp::session Configuration {
β β β schema: Some(
β β β "https://biomejs.dev/schemas/1.5.3/schema.json",
β β β ),
β β β vcs: None,
β β β files: None,
β β β formatter: Some(
β β β FormatterConfiguration {
β β β enabled: Some(
β β β true,
β β β ),
β β β format_with_errors: Some(
β β β true,
β β β ),
β β β indent_style: Some(
β β β Tab,
β β β ),
β β β indent_size: Some(
β β β 2,
β β β ),
β β β indent_width: Some(
β β β 2,
β β β ),
β β β line_ending: Some(
β β β Lf,
β β β ),
β β β line_width: Some(
β β β LineWidth(
β β β 80,
β β β ),
β β β ),
β β β ignore: None,
β β β include: Some(
β β β StringSet(
β β β {
β β β "src",
β β β },
β β β ),
β β β ),
β β β },
β β β ),
β β β organize_imports: Some(
β β β OrganizeImports {
β β β enabled: Some(
β β β true,
β β β ),
β β β ignore: None,
β β β include: None,
β β β },
β β β ),
β β β linter: Some(
β β β LinterConfiguration {
β β β enabled: Some(
β β β true,
β β β ),
β β β rules: Some(
β β β Rules {
β β β recommended: Some(
β β β true,
β β β ),
β β β all: None,
β β β a11y: None,
β β β complexity: None,
β β β correctness: None,
β β β nursery: None,
β β β performance: None,
β β β security: None,
β β β style: None,
β β β suspicious: None,
β β β },
β β β ),
β β β ignore: None,
β β β include: None,
β β β },
β β β ),
β β β javascript: None,
β β β json: None,
β β β css: None,
β β β extends: None,
β β β overrides: None,
β β β }
β β βββbiome_service::workspace::server::update_settings{params=UpdateSettingsParams { configuration: Configuration { schema: Some("https://biomejs.dev/schemas/1.5.3/schema.json"), vcs: None, files: None, formatter: Some(FormatterConfiguration { enabled: Some(true), format_with_errors: Some(true), indent_style: Some(Tab), indent_size: Some(2), indent_width: Some(2), line_ending: Some(Lf), line_width: Some(LineWidth(80)), ignore: None, include: Some(StringSet({"src"})) }), organize_imports: Some(OrganizeImports { enabled: Some(true), ignore: None, include: None }), linter: Some(LinterConfiguration { enabled: Some(true), rules: Some(Rules { recommended: Some(true), all: None, a11y: None, complexity: None, correctness: None, nursery: None, performance: None, security: None, style: None, suspicious: None }), ignore: None, include: None }), javascript: None, json: None, css: None, extends: None, overrides: None }, vcs_base_path: None, gitignore_matches: [], working_directory: Some("/home/belozerskiy/poligon/typescript_book/chapter2") }}
β β βββ
β βββ
βββbiome_lsp::handlers::text_document::did_open{params=DidOpenTextDocumentParams { text_document: TextDocumentItem { uri: Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/home/belozerskiy/poligon/typescript_book/chapter2/src/index.ts", query: None, fragment: None }, language_id: "typescript", version: 0, text: "\n const a = 10\n" } }}
β βββbiome_lsp::session::update_diagnostics{url=file:///home/belozerskiy/poligon/typescript_book/chapter2/src/index.ts}
β β ββ0ms DEBUG biome_service::workspace::server File capabilities: TypeScript RomePath { path: "src/index.ts" }
β β ββ0ms DEBUG biome_service::workspace The file has the following feature sets:
β β β {Lint: Supported, OrganizeImports: Supported, Format: Supported}
β β βββbiome_service::workspace::server::pull_diagnostics{params=PullDiagnosticsParams { path: RomePath { path: "src/index.ts" }, categories: RuleCategories(SYNTAX | LINT | ACTION), max_diagnostics: 18446744073709551615 }}
β β β ββ0ms DEBUG biome_service::workspace::server File capabilities: TypeScript RomePath { path: "src/index.ts" }
β β β βββbiome_js_parser::parse::parse{}
β β β βββ
β β β ββ0ms DEBUG biome_service::workspace::server File capabilities: TypeScript RomePath { path: "src/index.ts" }
β β β βββbiome_service::workspace::server::Pulling diagnostics{categories=RuleCategories(SYNTAX | LINT | ACTION)}
β β β β βββbiome_service::file_handlers::javascript::Linting JavaScript file{path=RomePath { path: "src/index.ts" }, language=TypeScript}
β β β β β ββ0ms INFO biome_service::file_handlers::javascript Analyze file src/index.ts
β β β β βββ
β β β βββ
β β β ββ2ms INFO biome_service::workspace::server Pulled 0 diagnostic(s)
β β βββ
β βββ
βββ
β β ββ4ms INFO biome_lsp::session Loaded client configuration: Null
β β ββ4ms ERROR biome_lsp::session Couldn't set client configuration: invalid type: null, expected struct WorkspaceSettings
β βββ
β ββ5ms INFO biome_lsp::session Unregister capabilities "workspace/didChangeConfiguration, textDocument/rangeFormatting, textDocument/onTypeFormatting, textDocument/rename, textDocument/formatting, workspace/didChangeWatchedFiles"
β ββ7ms INFO biome_lsp::session Register capabilities "textDocument/rangeFormatting, textDocument/onTypeFormatting, textDocument/formatting, workspace/didChangeWatchedFiles"
β βββbiome_lsp::session::update_diagnostics{url=file:///home/belozerskiy/poligon/typescript_book/chapter2/src/index.ts}
β β βββbiome_service::workspace::server::pull_diagnostics{params=PullDiagnosticsParams { path: RomePath { path: "src/index.ts" }, categories: RuleCategories(SYNTAX | LINT | ACTION), max_diagnostics: 18446744073709551615 }}
β β β ββ0ms DEBUG biome_service::workspace::server File capabilities: TypeScript RomePath { path: "src/index.ts" }
β β β βββbiome_service::workspace::server::Pulling diagnostics{categories=RuleCategories(SYNTAX | LINT | ACTION)}
β β β β βββbiome_service::file_handlers::javascript::Linting JavaScript file{path=RomePath { path: "src/index.ts" }, language=TypeScript}
β β β β β ββ0ms INFO biome_service::file_handlers::javascript Analyze file src/index.ts
β β β β βββ
β β β βββ
β β β ββ1ms INFO biome_service::workspace::server Pulled 0 diagnostic(s)
β β βββ
β βββ
βββ
Hi, same problem, linter works but formatting does not.
hx --version helix 23.10 (f6021dd0)
biome --version Version: 1.5.3
language.toml
[language-server] biome = { command = "biome", args = ["lsp-proxy"] } # language server definition like in doc [[language]] name = "rust" auto-format = true [[language]] name = "go" auto-format = true [[language]] name = "html" formatter = { command = 'prettier', args = ["--parser", "html"] } [[language]] name = "css" formatter = { command = 'prettier', args = ["--parser", "css"] } [[language]] name = "javascript" language-servers = [ { name = "typescript-language-server", except-features = [ "format" ] }, "biome" ] auto-format = true [[language]] name = "typescript" language-servers = [ { name = "typescript-language-server", except-features = [ "format" ] }, "biome"] # like in doc auto-format = true [[language]] name = "json" language-servers = [ { name = "vscode-json-language-server", except-features = [ "format" ] }, "biome" ] auto-format = true
helix logs biome logs
Is the same problem. Fix it checking my config: https://github.com/linuxmobile/kaku/blob/main/home/editors/helix/languages.nix
That isn't actually fixing the original problem at hand though that's just calling the formatter thru the command line. It works for now however :)
I just took some biome logs using biome rage --daemon-logs
and they are right here: https://gist.github.com/Awesomerly/9e4eb89ab9b97254eb67fa310376d6ba
I'm still having this issue even with the latest version.
hx --version
helix 23.10 (f5d95de2)
biome --version
Version: 1.6.1
I followed the documentation here: https://github.com/biomejs/biome/blob/main/editors/helix/manual.md
How did the author of the demo video got it to work?
How did the author of the demo video got it to work?
I had to add this to get biome working https://github.com/linuxmobile/kaku/blob/6af541c3db25d1dbf5fe258108fcccecb83bb93f/home/editors/helix/languages.nix#L60