Skip to content

Update grammars #78

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

Merged
merged 1 commit into from
Apr 11, 2025
Merged

Conversation

rrudakov
Copy link
Contributor

@rrudakov rrudakov commented Apr 10, 2025

Close #77

Some highlights:

  • I renamed markdown_inline to markdown-inline. markdown-ts-mode was added to Emacs master and it expects markdown-inline grammar (https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/textmodes/markdown-ts-mode.el#n62), so I decided to make clojure-ts-mode aligned with Emacs master (otherwise there would be 2 markdown inline binaries)
  • I added clojure-ts-reinstall-grammars function
  • I have been using it with enabled markdown-inline feature and I couldn't reproduce memory leak. Hopefully it's fixed by updating the grammar. But I'm still observing the problem with incorrect fontification when backticks in the docstrings are unbalanced, as mentioned in Issues with markdown inline #60. I'm thinking about submitting a bug report to Emacs and get some help regarding this situation.
  • I've updated query for highlighting variables in docstrings with markdown-inline grammar, now when backticks are balanced, they are always highlighted correctly.

Before submitting a PR mark the checkboxes for the items you've done (if you
think a checkbox does not apply, then leave it unchecked):

  • You've run M-x checkdoc and fixed any warnings in the code you've written.
  • You've updated the changelog (if adding/changing user-visible functionality).
  • You've updated the readme (if adding/changing user-visible functionality).

Thanks!

@rrudakov
Copy link
Contributor Author

I can add more queries for inline markdown:

image

Would it be useful?

@rrudakov rrudakov force-pushed the feature/77-update-grammars branch from 7dacca0 to 5110cf5 Compare April 10, 2025 19:18
@rrudakov rrudakov force-pushed the feature/77-update-grammars branch from 5110cf5 to 32fd205 Compare April 11, 2025 07:41
@rrudakov
Copy link
Contributor Author

I see that purcell/package-lint#292 was merged and released (v0.25) and we're using the most recent version here, but it's still complaining about the version:

clojure-ts-mode.el:10:23 (package-lint-warning) This makes the package uninstallable in all released Emacs versions.

@bbatsov any ideas what could it be?

@bbatsov
Copy link
Member

bbatsov commented Apr 11, 2025

I'm not sure how Eldev uses package-lint exactly. I have a note in my todo to just disable package-lint there, so feel free to do this if you have time to look into it.

@rrudakov
Copy link
Contributor Author

I've figured that package-lint v0.25 doesn't include the version bump. We need to wait for the next release.

@bbatsov
Copy link
Member

bbatsov commented Apr 11, 2025

In general our config for Eldev seems broken, as by mistake I had set it to run only one linter, and it still seems to run all of them. Go figure! That's the relevant docs https://emacs-eldev.github.io/eldev/#linting I realized this only recently while looking at the package-lint problem. 🤦 See also emacs-eldev/eldev#113

@bbatsov
Copy link
Member

bbatsov commented Apr 11, 2025

I've figured that package-lint v0.25 doesn't include the version bump. We need to wait for the next release.

Still, it'd be faster to just disable it. It's the least useful linter anyways, as it checks super basic stuff.

@bbatsov
Copy link
Member

bbatsov commented Apr 11, 2025

I can add more queries for inline markdown:
image

Would it be useful?

Yeah, that would be very useful!

I'm thinking about submitting a bug report to Emacs and get some help regarding this situation.

Good idea.

Great changes overall! Thanks!

@bbatsov
Copy link
Member

bbatsov commented Apr 11, 2025

I'll merge the PR as it's in a good shape. The Eldev config and the Markdown improvements can be tackled separately.

@bbatsov bbatsov merged commit dc66d67 into clojure-emacs:main Apr 11, 2025
2 of 3 checks passed
@rrudakov rrudakov deleted the feature/77-update-grammars branch April 11, 2025 08:18
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.

Update the ts grammar
2 participants