A post-modern modal text editor.
Go to file
Philipp Mildenberger 71551d395b Adds support for multiple language servers per language.
Language Servers are now configured in a separate table in `languages.toml`:

```toml
[langauge-server.mylang-lsp]
command = "mylang-lsp"
args = ["--stdio"]
config = { provideFormatter = true }

[language-server.efm-lsp-prettier]
command = "efm-langserver"

[language-server.efm-lsp-prettier.config]
documentFormatting = true
languages = { typescript = [ { formatCommand ="prettier --stdin-filepath ${INPUT}", formatStdin = true } ] }
```

The language server for a language is configured like this (`typescript-language-server` is configured by default):

```toml
[[language]]
name = "typescript"
language-servers = [ { name = "efm-lsp-prettier", only-features = [ "format" ] }, "typescript-language-server" ]
```

or equivalent:

```toml
[[language]]
name = "typescript"
language-servers = [ { name = "typescript-language-server", except-features = [ "format" ] }, "efm-lsp-prettier" ]
```

Each requested LSP feature is priorized in the order of the `language-servers` array.
For example the first `goto-definition` supported language server (in this case `typescript-language-server`) will be taken for the relevant LSP request (command `goto_definition`).

If no `except-features` or `only-features` is given all features for the language server are enabled, as long as the language server supports these. If it doesn't the next language server which supports the feature is tried.

The list of supported features are:

- `format`
- `goto-definition`
- `goto-declaration`
- `goto-type-definition`
- `goto-reference`
- `goto-implementation`
- `signature-help`
- `hover`
- `document-highlight`
- `completion`
- `code-action`
- `workspace-command`
- `document-symbols`
- `workspace-symbols`
- `diagnostics`
- `rename-symbol`
- `inlay-hints`

Another side-effect/difference that comes with this PR, is that only one language server instance is started if different languages use the same language server.
2023-05-18 21:48:30 +02:00
.cargo enable rendering in integration tests (#5819) 2023-02-04 13:20:23 -08:00
.github Recursive create the pkgname directory when creating a release tarball 2023-04-03 10:54:57 +09:00
book Adds support for multiple language servers per language. 2023-05-18 21:48:30 +02:00
contrib Add 23.05 to the AppData 2023-05-18 16:01:26 +09:00
docs Document how to run tests (#6268) 2023-03-11 08:03:19 -06:00
helix-core Adds support for multiple language servers per language. 2023-05-18 21:48:30 +02:00
helix-dap Fix unwrap bug in DAP (#6786) 2023-04-17 15:36:04 -05:00
helix-loader Fix warnings from clippy (#7013) 2023-05-11 14:44:52 +09:00
helix-lsp Adds support for multiple language servers per language. 2023-05-18 21:48:30 +02:00
helix-parsec revamped snippet text element parsing 2023-03-16 15:46:08 +09:00
helix-term Adds support for multiple language servers per language. 2023-05-18 21:48:30 +02:00
helix-tui Fix warnings from clippy (#7013) 2023-05-11 14:44:52 +09:00
helix-vcs build(deps): bump gix from 0.44.0 to 0.44.1 (#6933) 2023-05-02 09:58:06 +09:00
helix-view Adds support for multiple language servers per language. 2023-05-18 21:48:30 +02:00
runtime Update nightfox theme (#7061) 2023-05-18 03:16:25 +02:00
xtask Adds support for multiple language servers per language. 2023-05-18 21:48:30 +02:00
.envrc Work around a nix-direnv issue 2022-02-25 18:01:47 +09:00
.gitattributes Add .gitattributes (#3318) 2022-08-03 08:21:51 -05:00
.gitignore Remove vale from .gitignore 2022-07-26 10:22:28 +09:00
.ignore Add a .ignore file to make ripgrep more useful (#3315) 2022-08-03 09:00:39 -05:00
base16_theme.toml Set ui.text.inactive for official themes 2022-12-17 13:59:05 -06:00
Cargo.lock build(deps): bump serde from 1.0.162 to 1.0.163 (#7056) 2023-05-16 10:26:16 +09:00
Cargo.toml Update tree-sitter to v0.20.10 (#6608) 2023-04-06 12:29:17 +09:00
CHANGELOG.md Add changelog notes for the 23.05 release 2023-05-18 16:01:26 +09:00
default.nix build(nix): update flake deps, add default.nix file 2022-06-21 17:39:30 -05:00
flake.lock nix: Update flake dependencies 2023-05-11 11:30:46 +09:00
flake.nix build(nix): update flake dependencies, remove deprecated code from flake 2023-04-02 01:58:10 +03:00
grammars.nix nix: replace runCommandNoCC with runCommand (#3992) 2022-09-27 08:01:58 -05:00
languages.toml Adds support for multiple language servers per language. 2023-05-18 21:48:30 +02:00
LICENSE Add the LICENSE file. 2021-05-11 01:44:00 +09:00
logo_dark.svg Add logo with text included (#4973) 2022-12-03 11:05:15 +09:00
logo_light.svg Add logo with text included (#4973) 2022-12-03 11:05:15 +09:00
logo.svg Add the new logo! 2022-12-02 12:06:17 +09:00
README.md Rewrite and refactor all documentation (#5534) 2023-03-06 18:27:17 +09:00
rust-toolchain.toml update MSRV to 1.65 2023-03-05 15:54:02 +09:00
rustfmt.toml Add rustfmt.toml to force formatting to use rustfmt defaults 2021-07-23 18:11:22 +09:00
screenshot.png update screenshot (#1879) 2022-03-30 00:16:57 +09:00
shell.nix build(nix): update flake deps, add default.nix file 2022-06-21 17:39:30 -05:00
theme.toml feat(debug): highlight current line (#5957) 2023-03-29 12:52:19 +09:00
VERSION Bump the version to 23.05 2023-05-18 16:01:26 +09:00

Helix

Build status GitHub Release Documentation GitHub contributors Matrix Space

Screenshot

A Kakoune / Neovim inspired editor, written in Rust.

The editing model is very heavily based on Kakoune; during development I found myself agreeing with most of Kakoune's design decisions.

For more information, see the website or documentation.

All shortcuts/keymaps can be found in the documentation on the website.

Troubleshooting

Features

  • Vim-like modal editing
  • Multiple selections
  • Built-in language server support
  • Smart, incremental syntax highlighting and code editing via tree-sitter

It's a terminal-based editor first, but I'd like to explore a custom renderer (similar to Emacs) in wgpu or skulpin.

Note: Only certain languages have indentation definitions at the moment. Check runtime/queries/<lang>/ for indents.scm.

Installation

Installation documentation.

Packaging status

Contributing

Contributing guidelines can be found here.

Getting help

Your question might already be answered on the FAQ.

Discuss the project on the community Matrix Space (make sure to join #helix-editor:matrix.org if you're on a client that doesn't support Matrix Spaces yet).

Credits

Thanks to @JakeHL for designing the logo!