mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-09 20:13:51 -05:00
Change fsharp provider, closes #477
This commit is contained in:
@@ -79,7 +79,7 @@ If you need full functionality of any plugin, please use it directly with your p
|
|||||||
- [ferm](https://github.com/vim-scripts/ferm.vim) (syntax)
|
- [ferm](https://github.com/vim-scripts/ferm.vim) (syntax)
|
||||||
- [fish](https://github.com/georgewitteman/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/ionide/Ionide-vim) (syntax, indent)
|
||||||
- [gdscript](https://github.com/calviken/vim-gdscript3) (syntax, indent, ftplugin)
|
- [gdscript](https://github.com/calviken/vim-gdscript3) (syntax, indent, ftplugin)
|
||||||
- [git](https://github.com/tpope/vim-git) (syntax, indent, ftplugin)
|
- [git](https://github.com/tpope/vim-git) (syntax, indent, ftplugin)
|
||||||
- [glsl](https://github.com/tikhomirov/vim-glsl) (syntax, indent)
|
- [glsl](https://github.com/tikhomirov/vim-glsl) (syntax, indent)
|
||||||
|
|||||||
2
build
2
build
@@ -197,7 +197,7 @@ PACKS="
|
|||||||
ferm:vim-scripts/ferm.vim
|
ferm:vim-scripts/ferm.vim
|
||||||
fish:georgewitteman/vim-fish
|
fish:georgewitteman/vim-fish
|
||||||
flatbuffers:dcharbon/vim-flatbuffers
|
flatbuffers:dcharbon/vim-flatbuffers
|
||||||
fsharp:fsharp/vim-fsharp:_BASIC
|
fsharp:ionide/Ionide-vim:_BASIC
|
||||||
gdscript:calviken/vim-gdscript3
|
gdscript:calviken/vim-gdscript3
|
||||||
git:tpope/vim-git
|
git:tpope/vim-git
|
||||||
glsl:tikhomirov/vim-glsl:_NOAFTER
|
glsl:tikhomirov/vim-glsl:_NOAFTER
|
||||||
|
|||||||
@@ -455,9 +455,10 @@ endif
|
|||||||
|
|
||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fsharp') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fsharp') == -1
|
||||||
augroup filetypedetect
|
augroup filetypedetect
|
||||||
" fsharp, from fsharp.vim in fsharp/vim-fsharp:_BASIC
|
" fsharp, from fsharp.vim in ionide/Ionide-vim:_BASIC
|
||||||
" F#, fsharp
|
" F#, fsharp
|
||||||
autocmd BufNewFile,BufRead *.fs,*.fsi,*.fsx set filetype=fsharp
|
autocmd BufNewFile,BufRead *.fs,*.fsi,*.fsx set filetype=fsharp
|
||||||
|
autocmd BufNewFile,BufRead *.fsproj set filetype=fsharp_project
|
||||||
augroup end
|
augroup end
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ syn keyword fsharpScript contained install_printer remove_printer requirethread
|
|||||||
syn keyword fsharpScript contained trace untrace untrace_all print_depth
|
syn keyword fsharpScript contained trace untrace untrace_all print_depth
|
||||||
syn keyword fsharpScript contained print_length define undef if elif else endif
|
syn keyword fsharpScript contained print_length define undef if elif else endif
|
||||||
syn keyword fsharpScript contained line error warning light nowarn
|
syn keyword fsharpScript contained line error warning light nowarn
|
||||||
|
syn keyword fsharpScript contained I load r time
|
||||||
|
|
||||||
|
|
||||||
" comments
|
" comments
|
||||||
@@ -42,8 +43,9 @@ syn region fsharpDoubleBacktick start="``" end="``" keepend oneline
|
|||||||
|
|
||||||
|
|
||||||
" symbol names
|
" symbol names
|
||||||
syn match fsharpSymbol "\%(let\|use\|mutable\|rec\|and\|private\)\@<=!\=\s\+\zs\w\+\ze\s*[^=:]*[=:]"
|
syn match fsharpSymbol "\%(let\|use\|mutable\|rec\|and\|inline\|public\|private\|internal\|static\|member\|override\)\@<=!\=\s\+\(\w\+\.\)\=\zs\w\+\ze"
|
||||||
syn match fsharpSymbol "\%(member\)\@<=\s\+\w\+\.\zs\w\+"
|
"syn match fsharpSymbol "\%(let\|use\|mutable\|rec\|and\|private\)\@<=!\=\s\+\zs\w\+\ze\s*[^=:]*[=:]"
|
||||||
|
"syn match fsharpSymbol "\%(member\)\@<=\s\+\w\+\.\zs\w\+"
|
||||||
|
|
||||||
|
|
||||||
" types
|
" types
|
||||||
@@ -84,11 +86,16 @@ syn keyword fsharpKeyword process pure return seq tailcall trait
|
|||||||
|
|
||||||
" additional operator keywords (Microsoft.FSharp.Core.Operators)
|
" additional operator keywords (Microsoft.FSharp.Core.Operators)
|
||||||
syn keyword fsharpKeyword box hash sizeof typeof typedefof unbox ref fst snd
|
syn keyword fsharpKeyword box hash sizeof typeof typedefof unbox ref fst snd
|
||||||
syn keyword fsharpKeyword stdin stdout stderr
|
syn keyword fsharpKeyword stdin stdout stderr id compare incr decr defaultArg
|
||||||
|
syn keyword fsharpKeyword exit ignore lock using
|
||||||
|
|
||||||
|
" extra operator keywords (Microsoft.FSharp.Core.ExtraTopLevelOperators)
|
||||||
|
syn keyword fsharpKeyword array2D dict set
|
||||||
|
|
||||||
" math operators (Microsoft.FSharp.Core.Operators)
|
" math operators (Microsoft.FSharp.Core.Operators)
|
||||||
syn keyword fsharpKeyword abs acos asin atan atan2 ceil cos cosh exp floor log
|
syn keyword fsharpKeyword abs acos asin atan atan2 ceil cos cosh exp floor log
|
||||||
syn keyword fsharpKeyword log10 pown round sign sin sinh sqrt tan tanh
|
syn keyword fsharpKeyword log10 pown round sign sin sinh sqrt tan tanh truncate
|
||||||
|
syn keyword fsharpKeyword infinity infinityf nan nanf
|
||||||
|
|
||||||
syn keyword fsharpOCaml asr land lor lsl lsr lxor mod sig
|
syn keyword fsharpOCaml asr land lor lsl lsr lxor mod sig
|
||||||
|
|
||||||
@@ -100,8 +107,8 @@ endif
|
|||||||
syn keyword fsharpOpen open
|
syn keyword fsharpOpen open
|
||||||
|
|
||||||
" exceptions
|
" exceptions
|
||||||
syn keyword fsharpException try failwith failwithf finally invalid_arg raise
|
syn keyword fsharpException try failwith failwithf finally invalidArg invalidOp Failure raise
|
||||||
syn keyword fsharpException rethrow
|
syn keyword fsharpException rethrow nullArg reraise
|
||||||
|
|
||||||
" modifiers
|
" modifiers
|
||||||
syn keyword fsharpModifier abstract const extern internal override private
|
syn keyword fsharpModifier abstract const extern internal override private
|
||||||
@@ -111,17 +118,20 @@ syn keyword fsharpModifier volatile
|
|||||||
" constants
|
" constants
|
||||||
syn keyword fsharpConstant null
|
syn keyword fsharpConstant null
|
||||||
syn keyword fsharpBoolean false true
|
syn keyword fsharpBoolean false true
|
||||||
|
syn keyword fsharpSourceBuiltin __LINE__ __SOURCE_DIRECTORY__ __SOURCE_FILE__
|
||||||
|
|
||||||
" types
|
" types
|
||||||
syn keyword fsharpType array bool byte char decimal double enum exn float
|
syn keyword fsharpType array bool byte char decimal double enum exn float
|
||||||
syn keyword fsharpType float32 int int16 int32 int64 lazy_t list nativeint
|
syn keyword fsharpType float32 int int16 int32 int64 list nativeint
|
||||||
syn keyword fsharpType obj option sbyte single string uint uint32 uint64
|
syn keyword fsharpType obj option sbyte single string uint uint32 uint64
|
||||||
syn keyword fsharpType uint16 unativeint unit
|
syn keyword fsharpType uint16 unativeint unit int8 uint8 bigint
|
||||||
|
|
||||||
|
syn keyword fsharpType inref outref byref nativeptr
|
||||||
|
|
||||||
" core classes
|
" core classes
|
||||||
syn match fsharpCore "\u\a*\." transparent contains=fsharpCoreClass
|
syn match fsharpCore "\u\a*\." transparent contains=fsharpCoreClass
|
||||||
|
|
||||||
syn keyword fsharpCoreClass Array Async Directory File List Option Path Map Set contained
|
syn keyword fsharpCoreClass Array Async Directory File List Option Path Map Set Lazy contained
|
||||||
syn keyword fsharpCoreClass String Seq Tuple contained
|
syn keyword fsharpCoreClass String Seq Tuple contained
|
||||||
|
|
||||||
syn keyword fsharpCoreMethod printf printfn sprintf eprintf eprintfn fprintf
|
syn keyword fsharpCoreMethod printf printfn sprintf eprintf eprintfn fprintf
|
||||||
@@ -182,7 +192,7 @@ syn match fsharpFloat "\<-\=\d\(_\|\d\)*\.\(_\|\d\)*\([eE][-+]\=\d\(_
|
|||||||
syn match fsharpFloat "\<\d\+\.\d*"
|
syn match fsharpFloat "\<\d\+\.\d*"
|
||||||
|
|
||||||
" modules
|
" modules
|
||||||
syn match fsharpModule "\%#=1\%(\<open\s\+\)\@<=[a-zA-Z.]\+"
|
syn match fsharpModule "\%#=1\%(\<open\s\+\)\@<=[a-zA-Z0-9.]\+"
|
||||||
|
|
||||||
" attributes
|
" attributes
|
||||||
syn region fsharpAttrib matchgroup=fsharpAttribute start="\[<" end=">]"
|
syn region fsharpAttrib matchgroup=fsharpAttribute start="\[<" end=">]"
|
||||||
@@ -212,7 +222,6 @@ if version >= 508 || !exists("did_fs_syntax_inits")
|
|||||||
HiLink fsharpDoubleBacktick String
|
HiLink fsharpDoubleBacktick String
|
||||||
|
|
||||||
HiLink fsharpOpen Include
|
HiLink fsharpOpen Include
|
||||||
HiLink fsharpModPath Include
|
|
||||||
HiLink fsharpScript Include
|
HiLink fsharpScript Include
|
||||||
HiLink fsharpPreCondit Include
|
HiLink fsharpPreCondit Include
|
||||||
|
|
||||||
@@ -232,6 +241,7 @@ if version >= 508 || !exists("did_fs_syntax_inits")
|
|||||||
|
|
||||||
HiLink fsharpBoolean Boolean
|
HiLink fsharpBoolean Boolean
|
||||||
HiLink fsharpConstant Constant
|
HiLink fsharpConstant Constant
|
||||||
|
HiLink fsharpSourceBuiltin Constant
|
||||||
HiLink fsharpCharacter Character
|
HiLink fsharpCharacter Character
|
||||||
HiLink fsharpNumber Number
|
HiLink fsharpNumber Number
|
||||||
HiLink fsharpFloat Float
|
HiLink fsharpFloat Float
|
||||||
@@ -246,7 +256,6 @@ if version >= 508 || !exists("did_fs_syntax_inits")
|
|||||||
HiLink fsharpLabel Identifier
|
HiLink fsharpLabel Identifier
|
||||||
HiLink fsharpOption Identifier
|
HiLink fsharpOption Identifier
|
||||||
HiLink fsharpTypeName Identifier
|
HiLink fsharpTypeName Identifier
|
||||||
HiLink fsharpModule Identifier
|
|
||||||
|
|
||||||
HiLink fsharpType Type
|
HiLink fsharpType Type
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user