diff options
Diffstat (limited to 'js/baba-yaga/dev/vim/README.md')
-rw-r--r-- | js/baba-yaga/dev/vim/README.md | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/js/baba-yaga/dev/vim/README.md b/js/baba-yaga/dev/vim/README.md new file mode 100644 index 0000000..fb1090e --- /dev/null +++ b/js/baba-yaga/dev/vim/README.md @@ -0,0 +1,95 @@ +# Baba Yaga Vim/NeoVim Syntax + +Syntax highlighting for the Baba Yaga programming language in Vim and NeoVim. + +## Installation + +### Method 1: Manual Installation +1. Copy the files to your Vim runtime directory: + ```bash + # For Vim + cp syntax/baba.vim ~/.vim/syntax/ + cp ftdetect/baba.vim ~/.vim/ftdetect/ + + # For NeoVim + cp syntax/baba.vim ~/.config/nvim/syntax/ + cp ftdetect/baba.vim ~/.config/nvim/ftdetect/ + ``` + +2. Restart Vim/NeoVim + +### Method 2: Using a Plugin Manager (Recommended) + +#### Vim-Plug +Add to your `.vimrc` or `init.vim`: +```vim +Plug 'your-username/baba-yaga', { 'rtp': 'dev/vim' } +``` + +#### Vundle +Add to your `.vimrc`: +```vim +Plugin 'your-username/baba-yaga' +``` + +#### NeoVim with Packer +Add to your `init.lua`: +```lua +use { + 'your-username/baba-yaga', + config = function() + vim.cmd('set runtimepath+=dev/vim') + end +} +``` + +### Method 3: Using Pathogen +```bash +cd ~/.vim/bundle +git clone https://github.com/your-username/baba-yaga.git +``` + +## Features +- Syntax highlighting for Baba Yaga language +- Automatic filetype detection for `.baba` files +- Highlighting for: + - Keywords (when, then, is, with, etc.) + - Types (Bool, Int, Float, String, etc.) + - Operators (->, =>, +, -, etc.) + - Functions and variables + - Strings and numbers + - Comments (// and /* */) + - When expressions + - Lists and tables + - IO functions (io.out, io.in, etc.) + +## Usage +Open any `.baba` file and Vim/NeoVim should automatically detect the language and apply syntax highlighting. + +## Customization +You can customize the colors by modifying your color scheme or adding custom highlighting: + +```vim +" Add to your .vimrc or init.vim +hi babaKeyword ctermfg=blue guifg=blue +hi babaType ctermfg=green guifg=green +hi babaOperator ctermfg=red guifg=red +``` + +## File Structure +``` +dev/vim/ +├── syntax/ +│ └── baba.vim # Syntax highlighting rules +├── ftdetect/ +│ └── baba.vim # Filetype detection +└── README.md # This file +``` + +## Troubleshooting +If syntax highlighting doesn't work: + +1. Check that the files are in the correct directories +2. Verify filetype detection: `:set filetype?` +3. Force syntax highlighting: `:set syntax=baba` +4. Check for syntax errors: `:syntax sync fromstart` |