Open
Conversation
…lock-p` F#... doesn't have statements, which makes this name very, very confusing. This is a straight rename.
This regex is a hot mess. Fortunately, it's unused.
Okay. This got really messy, and I need to pin everything down. It turns out that F# indentation is _really hard_. Everything is relative, and the only thing that matters is that *blocks line up*. That's fine, but also hard. There are many cases where the "normal" behavior is to line up with a particular part of the preceding line, rather than with a particular indent level. So. This is slowly taking the approach that we should maintain a list of the levels of indent, and we should see: 1. Ret *mostly* goes to the same level, except in certain cases when we might *indent* 2. Tab will first increase indent one level, then go back to start, then decrease through all the preceeding levels. 3. Indentation is for semantics, lining up blocks correctly so the compiler can interpret them correctly. *Formatting* should be handled by Fantomas, either via LSP or by calling it directly.
As the comment says: during testing, I'm finding that `electric-indent-inhibit` is not being respected. This often causes the indent-line function to fire twice -- which we detect and take specific action on, which means that it firing twice is bad. Electric Indent Mode can be disabled per-buffer, so let's just do that.
This marks all the tests being up-to-date using buttercup *and passing*. Huzzah!
Contributor
Author
|
Having opened the PR, I can now see it is already more than big enough. I wont add more to this, beyond requests made here in review 👍 |
Did a pass, trying to remove unused things. Did not actually find many, alas.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello!
Apologies this took so long; I lost steam pretty badly when the unit test framework changed. Since then, I've been able to come back to both F# and learn buttercup (which is honestly lovely!), and now I'm back at it.
I don't think this PR should close anything; this work isn't complete. But, it's good progress -- a working, non-zero test suite and some improvements to how indentation works. Going to try and keep rolling with this. I'll make small updates to this PR if I find other things that seem appropriate to pull in, but otherwise I plan to mostly open new PRs for steadily more specific issues as I go.
Thanks very much!