Skip to content

Highlight function declaration identifiers differently than other identifiers #113

Answered by Eliemer
showbiz2k asked this question in Q&A
Discussion options

You must be logged in to vote

distinguishing between functions and values in F# is near impossible without type information, which tree-sitter doesn't have (nor want). Ionide uses semantic tokening after typechecking a file to provide those more in-depth colors.

// value
let x = 1
// func as value
let y = fun () -> 1 // this is indistinguishable from just values based on syntax alone. same issue happens with partially applied functions, no way to know without type info.
// func declr
let z () = 1

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@showbiz2k
Comment options

@showbiz2k
Comment options

@vzarytovskii
Comment options

Comment options

You must be logged in to vote
2 replies
@Eliemer
Comment options

Answer selected by showbiz2k
@showbiz2k
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants