Rudimentary Vim plugin for the Silq quantum programming language.
- Filetype detection for
*.slqfiles - Syntax highlighting (keywords, comments, strings, primed identifiers)
- Indentation matching
silq-mode.elbehaviour:- Tabs for structural indentation, spaces for token alignment
then/elsealign to their matchingiftokenelse-chains align to the outermostifof the cascade- Closing delimiters
})]align with their opener's line
Plug 'silq-lang/vim-silq'{ 'silq-lang/vim-silq' }Copy the three directories into your ~/.vim/ (Vim) or ~/.config/nvim/ (Neovim):
ftdetect/silq.vim
syntax/silq.vim
indent/silq.vim
Vim's indentexpr returns a single integer (the target column), which cannot
separately encode structural tabs and alignment spaces. To work around this,
lines requiring alignment (i.e. then/else) return -1 from indentexpr
and are instead handled by a custom s:ApplyIndent function that writes the
correct tab+space prefix directly. This is hooked into <CR> in insert mode
and ==/= in normal and visual mode.