This repo contains the syntax highlighting rules that I used for sway config in Vim. Sway syntax is similar to i3 syntax with a few differences in keywords.
The syntax file has been added to
vim
and neovim and their maintainence
will continue on the vim
branch. The master
branch will host a standalone
version of the plugin.
There is no specific extension for sway config file. The plugin checks for the
word sway in the buffer or the filepath to set the filetype. Additonally, you an
add # vim: filetype=swayconfig
anywhere in your config file.
Both vim and neovim should have the swayconfig syntax by default. If not, follow one of the steps below and reload vim afterwards.
Plugin 'jamespeapen/swayconfig.vim'
Plug 'jamespeapen/swayconfig.vim'
cd ~/.vim
git submodule add https://github.com/mboughaba/swayconfig.vim.git bundle/syntax/
git clone https://github.com/jamespeapen/swayconfig.git /tmp/swayconfig.vim
mkdir -p ~/.vim/after/syntax/
mv /tmp/swayconfig.vim/after/syntax/swayconfig.vim ~/.vim/after/syntax/swayconfig.vim
rm -rf /tmp/swayconfig.vim
Feel free to open issues or make a pull requests. I will adress them as time
permits. Make sure to add tests to cover any new syntax in test.swayconfig
.
James Eapen
Mohamed Boughaba
MIT