-
Notifications
You must be signed in to change notification settings - Fork 4
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
janet.vim cannot properly indent this block of code. #15
Comments
Thanks for the details. I tried both cases and got the same results. |
Can anybody explain what's the intended behavior? For example, (defn match-mailboxes [line]
(def mailbox Looking at (defn defmacro :macro
"Define a macro."
[name & more] I guess, the rule is to indent always by two spaces except after some certain functions: What's the meaning of |
janet-ts-mode for emacs indents janet code properly. I always want indentation by two space characters for macros..... like For functions, no.... |
There is a docstring right above that bit that has the text:
May be that's a clue? |
I think fuzzy indent is not applied when I press |
I have tried to overwrite let g:janet_fuzzy_indent_patterns = ['^let', '^while', '^if', '^unless', '^with', '^fn$', '^var', '^each', '^case$', '^for$', '^loop$', '^match', '^seq', '^generate', '^edefer', '^cond', '^try', '^when', '^ev/spawn-thread$', '^ev/do-thread$', '^declare', '^forever$', '^compwhen$', '^compif$'] No matter if I include |
Do you use |
No, I don't use it via an editor. Below are some related ideas though...
There is also an in-development LSP thing for Janet which apparently got formatting based on |
This sounds good! But I still want to understand how use the auto-indentation correctly. |
I'm sorry, I don't know. May be someone else who does will come along. Or perhaps asking at the Janet repository discussions or may be the Zulip instance might get better answers. For using
The content of my buffer then became: (defn a
[x]
(+ x 1)) |
Awesome! I didn't know that it's so easy. |
Me too :) |
If I select this block visually and press
==
,it doesn't become
If I select this block visually and press
==
,it becomes
The text was updated successfully, but these errors were encountered: