This file contains the syntax highlighting that I use for i3/sway config in NeoVim. It aims to guide you through configuration by distinctive and detailed highlights that make it clear if your configuration is valid. It also helps in navigating through.
Condensed showcase of swayconfig highlighting capabilities

used colourscheme: NerdContrast
- nice and clear syntax highlighting of i3 keywords and operators,
- wrong syntax will be highlighted as an error or like the first word (keyword)
- if something is not an error but wrong highlighting, please report it to this repo
Nowadays we usually use *i3/config, therefore the filetype is used in
connection with such path. But for convenience anything as *i3config/*swayconfig is recognized.
Additonally, you can add # vim: filetype=i3config or swayconfig to the bottom of your config file.
This plugin is a reference for syntax files included in vim, so it serves mainly for testing
purposes. All changes should make its way to vim - in case of differences, please report an issue in this repo.
Similar to the installation for Vundle, just change Plugin to Plug:
Add
Plug 'litoj/i3config.vim'to .vimrc and run :PlugInstall.
return {
'litoj/i3config.vim',
lazy = true,
ft = {"i3config", "swayconfig"}
}git clone https://github.com/litoj/i3config.vim.git /tmp/i3config.vim
mkdir -p ~/.vim/syntax/
mv /tmp/i3config.vim/syntax/i3config.vim ~/.vim/syntax/i3config.vim
rm -rf /tmp/i3config.vimFeel free to make a pull request, I will integrate it when time permits.
Make sure to add a line to cover your test in test.swayconfig.
MIT