Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable spell checking for parameters and fields? #184

Open
francium opened this issue Jun 27, 2019 · 2 comments
Open

Disable spell checking for parameters and fields? #184

francium opened this issue Jun 27, 2019 · 2 comments

Comments

@francium
Copy link

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
Copy link

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:

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants