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

WIP: Adding cycling indent *NOT READY FOR MERGE* #1

Merged
merged 2 commits into from
May 18, 2022

Conversation

jackcviers
Copy link

  • Functionality conceptually complete (haven't tested it yet)
  • Trying to figure out how to test this with ERT before I QA it.

* Functionality conceptually complete (haven't tested it yet)
* Trying to figure out how to test this with ERT before I QA it.
@jackcviers
Copy link
Author

Ok. So I've been looking at how haskell-tng.el did their indentation tests, how scalafmt does its indentation tests, and so on. I have an idea for creating a set of indentation tests for this repo based upon the ideas there, but it's probably overkill for my toggle, and probably needs to be a separate pr for this package.

I will get some ert tests that use a demo scala buffer by tomorrow afternoon, then hopefully we can discuss this with the finished poc.

@jackcviers
Copy link
Author

@Kazark So I have it cycling between 0 and current-indent when the custom scala-indent:use-cycle-indent is t. Can I get another set of eyes on it?

@jackcviers
Copy link
Author

I haven't added tests, but I have verified it at several indent levels. One thing that's weird for me is that <TAB> is saying:

call-interactively@ido-cr+-record-current-command: Wrong type argument: commandp, t

and debug-on-error isn't giving me a backtrace. I don't think I touched that, so not sure what's going on here.

@Kazark
Copy link
Owner

Kazark commented May 16, 2022

@jackcviers Hey sorry for the no-show here. I lost momentum on my Scala 3 work because this is a blocker for me. I will try to take a look at this soon though and at least merge it into my branch.

Copy link
Owner

@Kazark Kazark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change very much looks additive to me. I can't see how it can break my stuff, and it looks well done as far as I can tell. Thank you. I will merge it into my branch. Feel free to send follow-up PRs.

I definitely have some bugs still on my branch that need to be worked out.

@Kazark Kazark merged commit 35f265f into Kazark:scala3 May 18, 2022
@jj1uzh
Copy link

jj1uzh commented May 19, 2022

Wrong type argument: commandp, t error occurs here

(if scala-indent:use-cycle-indent
(call-interactively t 'scala-indent:cycle-indent-line)
(call-interactively t 'scala-indent:strategy-indent-line)))

jackcviers added a commit to jackcviers/scala-mode2 that referenced this pull request May 19, 2022
Incorrect order of arguments causes wrong type argument error in
scala-indent:indent-line. Swapping argument order fixes the error reported by
@jj1uzh [here](Kazark#1 (comment)).
jackcviers added a commit to jackcviers/scala-mode2 that referenced this pull request Jun 6, 2022
Incorrect order of arguments causes wrong type argument error in
scala-indent:indent-line. Swapping argument order fixes the error reported by
@jj1uzh [here](Kazark#1 (comment)).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants