vim ale插件

来源:互联网 发布:淘宝店铺头像大全 编辑:程序博客网 时间:2024/06/18 07:17

下载flake8
pip install flake8
下载
pip install rstcheck

在vimrc中添加

let g:ale_linters = {'python': ['flake8'], 'reStructuredText': ['rstcheck']}let g:ale_fixers = {'python': ['remove_trailing_lines', 'trim_whitespace', 'autopep8']}

ale_linters的详细说明

g:ale_linters                                                     Type: |Dictionary|  Default: `{}`  The |g:ale_linters| option sets a |Dictionary| mapping a filetype to a  |List| of linter programs to be run when checking particular filetypes.  This |Dictionary| will be merged with a default dictionary containing the  following values: >  {  \   'csh': ['shell'],  \   'go': ['gofmt', 'golint', 'go vet'],  \   'help': [],  \   'perl': ['perlcritic'],  \   'python': ['flake8', 'mypy', 'pylint'],  \   'rust': ['cargo'],  \   'spec': [],  \   'text': [],  \   'zsh': ['shell'],  \}<  This option can be used to enable only a particular set of linters for a  file. For example, you can enable only `eslint` for JavaScript files: >  let g:ale_linters = {'javascript': ['eslint']}<  If you want to disable all linters for a particular filetype, you can pass  an empty list of linters as the value: >  let g:ale_linters = {'javascript': []}<  All linters will be run for unspecified filetypes. All available linters can  be enabled explicitly for a given filetype by passing the string `'all'`,  instead of a List. >  let g:ale_linters = {'c': 'all'}<  Linters can be configured in each buffer with buffer-local variables. ALE  will first look for linters for filetypes in the `b:ale_linters` variable,  then `g:ale_linters`, and then the default Dictionary mentioned above.  `b:ale_linters` can be set to a List, or the string `'all'`. When linters  for two different filetypes share the same name, the first linter loaded  will be used. Any ambiguity can be resolved by using a Dictionary specifying  which linter to run for which filetype instead. >  " Use ESLint for the buffer if the filetype includes 'javascript'.  let b:ale_linters = {'javascript': ['eslint'], 'html': ['tidy']}  " Use a List for the same setting. This will work in most cases.  let b:ale_linters = ['eslint', 'tidy']  " Disable all linters for the buffer.  let b:ale_linters = []  " Explicitly enable all available linters for the filetype.  let b:ale_linters = 'all'
阅读全文
'); })();
0 0
原创粉丝点击
热门IT博客
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 汽车棚安装 活动汽车遮阳棚 汽车遮阳棚多少钱 汽车 遮阳棚 汽车棚图片 汽车棚多少钱 阳光棚图片 玻璃阳光棚 阳光棚多少钱一个平方 庭院阳光棚图片 玻璃阳光棚图片 阳光棚材料 不锈钢阳光棚图片 窗户遮阳棚 门头遮阳棚 遮阳棚图片 阳台遮阳棚 露台遮阳棚 车载遮阳棚 楼顶遮阳棚 汽车自动遮阳棚 汽车遮阳棚图片 雨阳棚 雨棚遮阳蓬 汽车棚厂家 汽车棚公司 电三轮车棚 汽车棚顶 摩托车棚 汽车棚拍 轿车棚布 遮阳帆 伸缩折叠遮阳棚图片 电动车防雨遮阳棚 三轮电动车遮阳棚 电动三轮车遮阳棚 乖趴在汽车做椅上 汽车投诉榜 汽车销量榜 汽车销售榜 国产汽车排名榜