helix-editor / helix

A post-modern modal text editor.
https://helix-editor.com
Mozilla Public License 2.0
32.77k stars 2.41k forks source link

Git Commit Config Parsing Error #8224

Closed ProjectInitiative closed 1 year ago

ProjectInitiative commented 1 year ago

Summary

When setting hx as the default editor for git, or other CLI tools, I get the following errors:

hint: Waiting for your editor to close the file... Bad config: TOML parse error at line 6, column 1
  |
6 | completion-replace = true
  | ^^^^^^^^^^^^^^^^^^
unknown field `completion-replace`, expected one of `scrolloff`, `scroll-lines`, `mouse`, `shell`, `line-number`, `cursorline`, `cursorcolumn`, `gutters`, `middle-click-paste`, `auto-pairs`, `auto-completion`, `auto-format`, `auto-save`, `idle-timeout`, `completion-trigger-len`, `auto-info`, `file-picker`, `statusline`, `cursor-shape`, `true-color`, `search`, `lsp`, `terminal`, `rulers`, `whitespace`, `bufferline`, `indent-guides`, `color-modes`, `soft-wrap`

Press <ENTER> to continue with default config

My config is as follows:

theme = "onedark_transparent"

[editor]
line-number = "relative"
bufferline = "always"
completion-replace = true

[editor.indent-guides]
render = true
character = "╎"

[editor.soft-wrap]
enable = true

[editor.lsp]
display-inlay-hints = true
display-signature-help-docs = false

Reproduction Steps

I tried this: 1. `git commit` I expected this to happen: Helix to open with my home config Instead, this happened: I got the error above, and it defaults to helix's default config. `hx` by itself has no issue, or editing code in any other directories. Just when invoked by CLI tools like git Commenting out `completion-replace = true` and `display-inlay-hints = true` makes the error go away, but those setting are no longer present for any other `hx` session opened, which is not ideal. ### Helix log
~/.cache/helix/helix.log ``` 2023-09-09T15:19:01.587 helix_lsp::transport [ERROR] err: <- StreamClosed 2023-09-09T15:19:01.587 helix_lsp [ERROR] failed to initialize language server: server closed the stream 2023-09-09T15:19:38.680 helix_lsp::transport [ERROR] err <- "ERROR operation failed error=the LSP is not part of this build, please consult the documentation about enabling the functionality\n" 2023-09-09T15:19:38.685 helix_lsp [ERROR] failed to initialize language server: server closed the stream 2023-09-09T15:19:38.685 helix_lsp::transport [ERROR] err: <- StreamClosed 2023-09-09T15:23:12.979 helix_lsp::transport [ERROR] err <- "ERROR operation failed error=the LSP is not part of this build, please consult the documentation about enabling the functionality\n" 2023-09-09T15:23:12.987 helix_lsp [ERROR] failed to initialize language server: server closed the stream 2023-09-09T15:23:12.987 helix_lsp::transport [ERROR] err: <- StreamClosed ```
### Platform Linux ### Terminal Emulator alacritty 0.12.0-dev (d5e9d1d8) ### Helix Version helix 23.05 (7f5940be)
ProjectInitiative commented 1 year ago

Configuration built from docs: https://docs.helix-editor.com/configuration.html#editor-section

pascalkuthe commented 1 year ago

This is related to your local setup somehow. It seems you have multiple versions of helix installed (one that seems to be 23.5 and one that is older than 23.3, likely 22.12) which gets started by your CL tools for whatever reason.