Skip to content

Thorough Vim highlighting for i3/sway config syntax.

License

Notifications You must be signed in to change notification settings

litoj/i3config.vim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

i3config.vim - vim i3/sway config syntax highlighting

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.

References

Condensed showcase of swayconfig highlighting capabilities screenshot

used colourscheme: NerdContrast

Features

  • 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

File type detection

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.

Installation instructions

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"}
}

Manual installation

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.vim

Contribution

Feel 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.

License

MIT

About

Thorough Vim highlighting for i3/sway config syntax.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Vim Script 100.0%