Helix Editor

232 readers
8 users here now

About

Post-modern community focused on post-modern editor.

Rules

Instance rules apply here.

founded 2 years ago
MODERATORS
1
 
 

When I'm editing with helix, I often have multiple instances of it running, one for each file, in different terminals (more precisely: in different tabs of my terminal emulator, Konsole). Currently, the title of these tabs reads just "Directoryname: helix". It would be really helpful if the titles included the current filename, so that I could see which tab has which file opened. Is there a way to do this?

2
3
 
 

Helix is great, but please why can't indentation just be what is set in the language.toml file?

[[language]]
name = "zig"
indent = { tab-width = 8, unit = "\t" }

Changing indent-heuristic doesn't fix it. Why does helix give me the option to set the indentation style and then proceed to overwrite it, Instantly resetting it to 4 spaces instead of what I told it.

The behavior that is occurring is extremely weird and would be instantaneously solved if helix would just use the value in the file.

I don't want your garbage heuristic, I just want you to leave my file alone and do what I told you.

4
 
 

solution by @[email protected]

Hi,

I'm new to both using Helix and terminal multiplexers in general, so I'd appreciate some help with this. When I launch Helix without tmux, I see the default theme with a purple background, which I like:

But when I launch it using tmux, even with the -2 flag, Helix does not display the same color scheme:

I have tried making a config.toml file with an [editor] section and set true-color to true, but that didn't appear to help. How can I use the default theme with tmux? I'm using GNOME 47 with wayland on Fedora, in case that matters.

Any post I've seen involving Helix, tmux & colors seem to be with custom themes, so I don't know which threads are relevant to this, if any.___

5
19
submitted 6 months ago* (last edited 6 months ago) by [email protected] to c/[email protected]
6
7
 
 

or should I create my binding in the keymap?

8
 
 

Came out a few days ago, but I thought it was worth posting here =)

9
10
 
 

To open a file relative to the current one in Helix, you can to the do the following with 24.3:

:o <C-r>%<C-w>

Here, the Control-R allows you to select a register and the special register "%" contains the current file path and inserts into the command line, while the final Control-w chops off the last part of the file name leaving with you current directory.

This is like :o %:h from Vim/Neovim

11
12
13
5
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 
 

Hi!

I am trying to set up arduino autocompletion and syntax highlighting. I followed some of the instuctions in an issue on the github adding that to my own common sense, and it mostly overlaps now. But the syntaxhighlighting is still not there, and neither is autocompletion.

My ~/.config/helix tree looks like this now:

.
├── config.toml
├── languages.toml
├── runtime
│  └── queries
│     ├── arduino
│     │  ├── folds.scm
│     │  ├── highlights.scm
│     │  ├── indents.scm
│     │  ├── injections.scm
│     │  └── locals.scm
│     └── cpp
│        ├── folds.scm
│        ├── highlights.scm
│        ├── indents.scm
│        ├── injections.scm
│        └── locals.scm
└── themes
   └── molokai-edit.toml

and the relevant content (I removed some markdown stuff for this post) of languages.toml:

[language-server.arduino]
command = "./arduino-language-server" 
args=["-clangd","/usr/local/bin/clangd","-cli","/usr/local/bin/arduino-cli","-cli-config","~/.arduino15/arduino-cli.yaml","-fqbn","arduino:avr:uno"]

[[grammar]]
name = "cpp"
source = { git = "https://github.com/tree-sitter/tree-sitter-cpp", rev = "a90f170f92d5d70e7c2d4183c146e61ba5f3a457" }

[[grammar]]
name = "arduino"
source = { git = "https://github.com/ObserverOfTime/tree-sitter-arduino", rev = "db929fc6822b9b9e1211678d508f187894ce0345"}

# [...] < here was some config for markdown

[[language]]
name = "arduino"
scope="source.arduino"
file-types=[ "ino" ]
language-servers=[ "arduino" ]
injection-regex = "arduino"
comment-token = "//"
roots=["sketch.yaml"]

I also installed the packages arduino-language-server (with dep clangd) and arduino-cli from the arch repos.

I just remembered: I am using the helix-ext AUR package (which means I am still on 23.10.2), to be able to use the file tree on the left. here is the repo. Could that be the issue?

I have no idea anymore what I am doing wrong, could anyone tell me? If you need more information to help, just ask for it.

addition (14-4-24):
As I switched to nvim (lack of features in helix), I am not interested in setting this up anymore. Thanks!

14
23
Helix 24.03 (helix-editor.com)
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 
 

Mostly internal changes this time

15
16
2
New Helix release! 23.10 (helix-editor.com)
submitted 2 years ago* (last edited 2 years ago) by [email protected] to c/[email protected]
 
 

New helix version was released 12 minutes ago with new features:

  • multiple language servers
  • fuzzy matching with nucleo (nucleo is a project from creators of helix and is significantly faster than alternatives like fzf)
  • smart tab
  • better registers
  • initial support for LSP DidChangeWatchedFiles
  • syntax highlight regex prompts
17
 
 

I've started using Helix occasionally as I stumbled across the editor when trying to customize vim for Rust.

Immediately, I fell in love with how (mostly) plug and play Helix is.

Over the next few months, I plan to use Helix more and more. If you have any useful tips on usage, customization or anything else I am all ears.

18
19
 
 

Consider posting to the existing one?

20
 
 

Nucleo is a project from creators of helix and is significantly faster that alternatives like fzf.

If you want to use latest features, such as this one, check out helix-git AUR package. (if you are using arch btw)

21
2
submitted 2 years ago* (last edited 2 years ago) by [email protected] to c/[email protected]
 
 

I found this nice project on GitHub: DJAndries/llmvm. It doesn't seem to work as seamless as GitHub Copilot in JetBrains Rider or VSCode, for example, but since there is no plugin system yet, it's a nice option.