https://github.com/yoheimuta/vim-protolint
Vim integration for protolint. https://github.com/yoheimuta/protolint
https://github.com/yoheimuta/vim-protolint
ale fixer linter protobuf protoc protocol-buffers protolint syntastic vim-plugin vim-protolint
Last synced: 2 months ago
JSON representation
Vim integration for protolint. https://github.com/yoheimuta/protolint
- Host: GitHub
- URL: https://github.com/yoheimuta/vim-protolint
- Owner: yoheimuta
- License: mit
- Created: 2019-12-05T02:08:41.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-10T05:14:10.000Z (about 4 years ago)
- Last Synced: 2025-01-20T10:48:09.272Z (4 months ago)
- Topics: ale, fixer, linter, protobuf, protoc, protocol-buffers, protolint, syntastic, vim-plugin, vim-protolint
- Language: Vim script
- Homepage:
- Size: 458 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vim-protolint
This provides Vim integration for protolint linting and fixing via the [ALE engine](https://github.com/dense-analysis/ale).
- NOTE: [The latest ale](https://github.com/dense-analysis/ale/pull/2911) supports protolint natively. If you use ale as a linting solution, this repository is in favor of the upstream support. The setting specified in .vimrc works as before.
It also enables you to check errors with [Syntastic](https://github.com/vim-syntastic/syntastic).
## Installation
[protolint](https://github.com/yoheimuta/protolint) must be installed.
Note that the binary with **v0.22.0 or above** is supported### Installation with Vim package management
In Vim 8 and NeoVim, you can install plugins easily without needing to use any
other tools. Simply clone the plugin into your pack directory.```
mkdir -p ~/.vim/pack/git-plugins/start# NOTE: In recent, dense-analysis/ale incorporated the same source code this repository has maintained.
## Thus, you don't have to install this repository to run protolint on ale.
git clone --depth 1 https://github.com/yoheimuta/vim-protolint.git ~/.vim/pack/git-plugins/start/vim-protolint# NOTE: Install either ale or syntastic if you haven't installed yet.
git clone --depth 1 https://github.com/dense-analysis/ale.git ~/.vim/pack/git-plugins/start/ale
git clone --depth 1 https://github.com/vim-syntastic/syntastic.git ~/.vim/pack/git-plugins/start/syntastic
```## Demo
## Usage
### Error checking with ALE
Add the following to your .vimrc.
```vim
let g:ale_linters = {
\ 'proto': ['protolint'],
\}let g:ale_fixers = {
\ 'proto': ['ale#fixers#protolint#Fix'],
\}" We recommend you set this.
let g:ale_lint_on_text_changed = 'never'" You can remove comment outs below if you want to configure parameters.
" let g:ale_proto_protolint_executable = "/usr/local/bin/protolint"
" let g:ale_proto_protolint_config =
" \ "/path/to/config/.protolint.yaml"```
See [doc/ale-proto.txt](doc/ale-proto.txt) in more detail.
### Error checking with Syntastic
Add the following to your .vimrc.
```vim
let g:syntastic_proto_checkers = ['protolint']" You can remove comment outs below if you want to configure parameters.
" let g:syntastic_proto_protolint_exec = "/usr/local/bin/protolint"
" let g:syntastic_proto_protolint_args =
" \ "-config_path= /path/to/config/.protolint.yaml"
```