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

Don't highlight top-level-only keywords at different levels #24

Conversation

Hi-Angel
Copy link
Contributor

@Hi-Angel Hi-Angel commented Oct 8, 2024

The keywords being modified here only represented keywords when they are at the beginning of a line with optional whitespace.

At different levels these would represent valid record fields or other identifiers.

This was tested by adding the following code to a PureScript file:

type Foo = { type :: Int
           , module :: Int
           , import :: Int
           , data :: Int
           , class :: Int
           , newtype :: Int
           , instance :: Int
           }

…and checking that compilation succeeds.

@Hi-Angel Hi-Angel force-pushed the dont-highlight-toplevel-only-keywords branch 3 times, most recently from 719d4e2 to ab85b8d Compare October 11, 2024 09:09
@Hi-Angel
Copy link
Contributor Author

upd: added instance.

The keywords being modified here only represented keywords when they
are at the beginning of a line with optional indentation.

At different levels these would represent valid record fields or other
identifiers.

This was tested by adding the following code to a PureScript file:

    type Foo = { type :: Int
               , module :: Int
               , import :: Int
               , data :: Int
               , class :: Int
               , newtype :: Int
               }

…and checking that compilation succeeds.
@Hi-Angel Hi-Angel force-pushed the dont-highlight-toplevel-only-keywords branch from ab85b8d to ba3e997 Compare October 15, 2024 14:45
@Hi-Angel
Copy link
Contributor Author

@kritzcreek , ping?

@Hi-Angel
Copy link
Contributor Author

Hi-Angel commented Nov 5, 2024

ping

1 similar comment
@Hi-Angel
Copy link
Contributor Author

ping

PureScript, as opposed to Haskell, doesn't seem to have `deriving` as
a keyword. I grepped over `purescript` compiler `tests/` directory to
be sure. Instead it has `derive` keyword, which is a top level one
that serves similar purpose to "deriving".

So rename `deriving` to `derive`.
@Hi-Angel
Copy link
Contributor Author

Hi-Angel commented Dec 9, 2024

New commit:

Rename keyword "deriving" to "derive"

PureScript, as opposed to Haskell, doesn't seem to have `deriving` as
a keyword. I grepped over `purescript` compiler `tests/` directory to
be sure. Instead it has `derive` keyword, which is a top level one
that serves similar purpose to "deriving".

So rename `deriving` to `derive`.

@Hi-Angel
Copy link
Contributor Author

Hi-Angel commented Dec 9, 2024

@purcell hello, it seems this repository became unmaintained. It has lots of PRs at this point, one of them even fixes a regression, but there's no one to review and merge the code. The amount of PRs became so large at this point that some changes even conflict with each other, and the last commit I had to add to this PR instead of making it a separate one.

Do you mind giving me maintainer permissions? I am currently using PureScript, so I'm interested in making sure it works. I won't promise to fix issues though (unless they're regressions, of course), but I do fix from time to time some things that I stumble upon during the mode usage.

I am a co-maintainer to color-identifiers-mode.

@purcell purcell merged commit 432be8f into purescript-emacs:master Dec 9, 2024
10 checks passed
@purcell
Copy link
Member

purcell commented Dec 9, 2024

Okay, first of all I'm merging this, thanks, and taking a quick look at other PRs to get a sense of things.

@Hi-Angel
Copy link
Contributor Author

Hi-Angel commented Dec 9, 2024

Thank you!

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

Successfully merging this pull request may close these issues.

2 participants