ElmCast / elm-vim

Elm plugin for Vim
BSD 3-Clause "New" or "Revised" License
572 stars 102 forks source link

Disable spell checking for parameters and fields? #184

Open francium opened 5 years ago

francium commented 5 years ago

I've noticed that in the following code,

update msg model =
    ...

type alias model =
    { url : ... }

Vim shows msg and url as misspelled. I've been able to work around this by modifying the syntax rules, you can see the patched syntax files on my fork.

Is this spell checking intentional? Can I submit my patch as a PR is this is indeed a bug?

ravicious commented 2 years ago

Thanks for the patch, it makes the editor much less cluttered. I'm all for this landing on the main branch.

One thing I noticed: for some reason binding and function names are still being highlighted. Unfortunately I don't have time to debug that.

screenshot showing how binding and function names have a red underline below them

Leaving the code snippet in case someone wants to test it:

```elm update : Msg -> Model -> ( Model, Cmd Msg ) update msg model = case msg of GotFiles files -> let validatedFiles = Nonempty.map validateMimeType files ticketStatuses = Nonempty.map (\validationResult -> case validationResult of Ok _ -> Parsing Err parseError -> Failure parseError ) validatedFiles cmds = Cmd.batch <| Nonempty.toList <| Nonempty.indexedMap (\index validationResult -> case validationResult of Ok file -> parsePdf ( index, file ) Err _ -> Cmd.none ) validatedFiles in ( { model | pageStatus = ShowingTickets ticketStatuses , hasHover = False } , cmds ) ```
francium commented 2 years ago

Hey. It's been so long, I had forgotten about this. I haven't used Elm probably since around the time this issue was opened, so I can't help debug that issue at present.