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

Fix indentation issues and modeline issue. #5

Merged
merged 8 commits into from
Jun 14, 2021
Merged

Fix indentation issues and modeline issue. #5

merged 8 commits into from
Jun 14, 2021

Conversation

crocket
Copy link
Contributor

@crocket crocket commented Jun 10, 2021

No description provided.

@crocket crocket changed the title Indent try block Indent try block. Properly indent a function call with arguments on the next lines. Jun 11, 2021
@crocket
Copy link
Contributor Author

crocket commented Jun 11, 2021

It fixes #6

If a function call appears and its arguments appear on the next lines,
the function call is indented as if it were a special form like try
block.
@crocket crocket changed the title Indent try block. Properly indent a function call with arguments on the next lines. Fix indentation issues. Jun 11, 2021
@crocket
Copy link
Contributor Author

crocket commented Jun 11, 2021

It fixes #4

crocket added 4 commits June 11, 2021 23:41
When pressing enter, remove leading spaces in the current line, and
remove trailing spaces in the previous line.
* '(+)' can now be indented properly.
* Indenting past the last letter of the line that has
the opening parenthesis is now possible.
* non-special forms are now not recognized as special forms.
* indentation code is made more efficient.
@crocket crocket changed the title Fix indentation issues. Fix indentation issues and modeline issue. Jun 12, 2021
Upper-case options are empty after `modeline-parse`
is executed. Thus, janet_autolint and janet_autoformat
were empty after `modeline-parse` was manually executed.

Executing `:w` after executing `modeline-parse` caused
janet.kak to execute jfmt and jlnt even though
janet_autolint and janet_autoformat were false.

By turning upper-case options to lower-case options,
janet_autolint and janet_autoformat are not empty
after executing `modeline-parse` automatically.
@crocket
Copy link
Contributor Author

crocket commented Jun 13, 2021

This pull request is ready.

@pepe
Copy link
Owner

pepe commented Jun 13, 2021

Sorry for the wait. I spent last week caring for all three kids, as they were sick. Yesterday CET I will merge it.

Copy link
Owner

@pepe pepe left a comment

Choose a reason for hiding this comment

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

This looks very nice. After I finish the job work, I will check it and merge it. Thank you very much!

I also simplified indentation code.
@pepe pepe merged commit 83834a2 into pepe:master Jun 14, 2021
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