├── ftdetect └── fluent.vim ├── images └── screenshot.png ├── LICENSE ├── README.md └── syntax └── fluent.vim /ftdetect/fluent.vim: -------------------------------------------------------------------------------- 1 | autocmd BufNewFile,BufReadPost *.ftl set filetype=fluent ts=4 et sts=4 sw=4 2 | -------------------------------------------------------------------------------- /images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nazariglez/fluent.vim/master/images/screenshot.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Project Fluent 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # fluent.vim 2 | 3 | Fluent syntax highlighting for VIM/NeoVIM. 4 | 5 | ![Screenshot](https://github.com/projectfluent/fluent.vim/blob/master/images/screenshot.png?raw=true) 6 | 7 | 8 | ## Installation 9 | 10 | ### Using [Vundle] 11 | 12 | 1. Add `Plugin 'projectfluent/fluent.vim'` to `~/.vimrc` 13 | 2. `:PluginInstall` or `$ vim +PluginInstall +qall` 14 | 15 | *Note:* Vundle will not automatically detect Rust files properly if `filetype on` is executed before Vundle. Please check the [quickstart][vqs] for more details. 16 | 17 | ### Using [Pathogen][] 18 | 19 | ```shell 20 | git clone --depth=1 https://github.com/projectfluent/fluent.vim.git ~/.vim/bundle/fluent.vim 21 | ``` 22 | 23 | ### Using [NeoBundle][] 24 | 25 | 1. Add `NeoBundle 'projectfluent/fluent.vim'` to `~/.vimrc` 26 | 2. Re-open vim or execute `:source ~/.vimrc` 27 | 28 | ### Using [vim-plug][] 29 | 30 | 1. Add `Plug 'projectfluent/fluent.vim'` to `~/.vimrc` 31 | 2. `:PlugInstall` or `$ vim +PlugInstall +qall` 32 | 33 | ### Using [lazy.nvim] 34 | 1. Add `{ "projectfluent/fluent.vim", ft = "fluent" }` to your list of plugins. 35 | 36 | 37 | ## Status 38 | 39 | The syntax highlighting is very basic and fragile at the moment. 40 | Feel free to take over and improve - we'll gladly accept patches. 41 | 42 | ## Learn more 43 | 44 | Find out more about Project Fluent at [projectfluent.org][], including links to implementations, and information about how to get involved. 45 | 46 | [Fluent Syntax Guide]: http://projectfluent.org/fluent/guide 47 | [projectfluent.org]: http://projectfluent.org 48 | [Vundle]: https://github.com/gmarik/vundle 49 | [vqs]: https://github.com/gmarik/vundle#quick-start 50 | [Pathogen]: https://github.com/tpope/vim-pathogen 51 | [NeoBundle]: https://github.com/Shougo/neobundle.vim 52 | [vim-plug]: https://github.com/junegunn/vim-plug 53 | [lazy.nvim]: https://github.com/folke/lazy.nvim/ 54 | -------------------------------------------------------------------------------- /syntax/fluent.vim: -------------------------------------------------------------------------------- 1 | if exists("b:current_syntax") 2 | finish 3 | endif 4 | 5 | syntax region fluentComment start="\v^#" end="\v^(#)@!" contains=fluentGroupComment,fluentResourceComment 6 | syntax region fluentGroupComment start=/\v(^##)@" 24 | 25 | highlight link fluentComment Comment 26 | highlight link fluentGroupComment Constant 27 | highlight link fluentResourceComment Define 28 | highlight link fluentIdentifier Identifier 29 | highlight link fluentPattern String 30 | highlight link fluentAttribute Keyword 31 | highlight link fluentFunction Function 32 | highlight link fluentStringLiteral String 33 | highlight link fluentNumberLiteral Number 34 | highlight link fluentVariantKey Tag 35 | highlight link fluentVariable Keyword 36 | highlight link fluentIdentifierExpression Identifier 37 | highlight link fluentIdentifierTerm Special 38 | highlight link fluentDelimiter Operator 39 | highlight link fluentVariantSelectorOperator Operator 40 | 41 | let b:current_syntax = "fluent" 42 | --------------------------------------------------------------------------------