Helix Plugin for modeline
git clone https://github.com/mattwparas/helix.git -b steel-event-system
then build/install the helix fork with:
cargo xtask steel
to install the plugin with forge:
forge pkg install --git https://github.com/gerblesh/modeline.hx.git
add the lines to your scm file to configure the modeline
(require "modeline/modeline.scm")
;; Make sure to put these AFTER your lsp configs in steel so that the document is reloaded with the LSP
;; register the modeline to automatically run on save/open
(modeline-enable)
;; this steel function refreshes the modeline, you can bind a key to call it manually in your helix/init.scm or config.toml
(refresh-modeline)
supports very basic emacs and vim modelines with some caveats:
example modelines:
# vim:ts=4 ft=py
# ex:ts=4:ft=py:et
# -*- mode: py; tab-width: 4; indent-tabs-mode: nil -*-
supported modeline fields:
et
, expandtab
: use spaces for indent
noet
, noexpandtab
: use tabs for indent (tab width not supported)
tab-width
, ts
, tabstop
, sw
, shiftwidth
, sts
, softtabstop
: tab width (only affects spaces)
language
, mode
, ft
, filetype
: language/syntax highlighting, only some filetype aliases are supported and may vary
indent-tabs-mode
: can either be nil
(spaces) or t
(tabs)