Switch fish provider, fixes #408

This commit is contained in:
Adam Stankiewicz
2019-09-04 15:55:58 +02:00
parent a48874df4c
commit cdd6d73e39
3 changed files with 5 additions and 5 deletions

View File

@@ -76,7 +76,7 @@ If you need full functionality of any plugin, please use it directly with your p
- [emblem](https://github.com/yalesov/vim-emblem) (syntax, indent, ftplugin) - [emblem](https://github.com/yalesov/vim-emblem) (syntax, indent, ftplugin)
- [erlang](https://github.com/vim-erlang/vim-erlang-runtime) (syntax, indent) - [erlang](https://github.com/vim-erlang/vim-erlang-runtime) (syntax, indent)
- [ferm](https://github.com/vim-scripts/ferm.vim) (syntax) - [ferm](https://github.com/vim-scripts/ferm.vim) (syntax)
- [fish](https://github.com/dag/vim-fish) (syntax, indent, compiler, autoload, ftplugin) - [fish](https://github.com/georgewitteman/vim-fish) (syntax, indent, compiler, autoload, ftplugin)
- [flatbuffers](https://github.com/dcharbon/vim-flatbuffers) (syntax) - [flatbuffers](https://github.com/dcharbon/vim-flatbuffers) (syntax)
- [fsharp](https://github.com/fsharp/vim-fsharp) (syntax, indent) - [fsharp](https://github.com/fsharp/vim-fsharp) (syntax, indent)
- [git](https://github.com/tpope/vim-git) (syntax, indent, ftplugin) - [git](https://github.com/tpope/vim-git) (syntax, indent, ftplugin)

View File

@@ -11,15 +11,15 @@ function! fish#Indent()
let l:indent = 0 let l:indent = 0
let l:prevline = getline(l:prevlnum) let l:prevline = getline(l:prevlnum)
if l:prevline =~# '\v^\s*switch>' if l:prevline =~# '\v^\s*switch>'
let l:indent = l:shiftwidth * 2 return indent(l:prevlnum) + l:shiftwidth
elseif l:prevline =~# '\v^\s*%(begin|if|else|while|for|function|case)>' elseif l:prevline =~# '\v^\s*%(begin|if|else|while|for|function|case)>'
let l:indent = l:shiftwidth let l:indent = l:shiftwidth
endif endif
let l:line = getline(v:lnum) let l:line = getline(v:lnum)
if l:line =~# '\v^\s*end>' if l:line =~# '\v^\s*end>'
return indent(v:lnum) - (l:indent ==# 0 ? l:shiftwidth : l:indent) return indent(l:prevlnum) - (l:indent ==# 0 ? l:shiftwidth : l:indent)
elseif l:line =~# '\v^\s*%(case|else)>' elseif l:line =~# '\v^\s*%(case|else)>'
return indent(v:lnum) - l:shiftwidth return indent(l:prevlnum) - l:shiftwidth
endif endif
return indent(l:prevlnum) + l:indent return indent(l:prevlnum) + l:indent
endfunction endfunction

2
build
View File

@@ -186,7 +186,7 @@ PACKS="
emblem:yalesov/vim-emblem emblem:yalesov/vim-emblem
erlang:vim-erlang/vim-erlang-runtime erlang:vim-erlang/vim-erlang-runtime
ferm:vim-scripts/ferm.vim ferm:vim-scripts/ferm.vim
fish:dag/vim-fish fish:georgewitteman/vim-fish
flatbuffers:dcharbon/vim-flatbuffers flatbuffers:dcharbon/vim-flatbuffers
fsharp:fsharp/vim-fsharp:_BASIC fsharp:fsharp/vim-fsharp:_BASIC
git:tpope/vim-git git:tpope/vim-git