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 function indentation for new override syntax #30

Open
jclsn opened this issue Jun 4, 2022 · 2 comments
Open

Fix function indentation for new override syntax #30

jclsn opened this issue Jun 4, 2022 · 2 comments

Comments

@jclsn
Copy link

jclsn commented Jun 4, 2022

The new override syntax is not completely fixed for functions yet. The indentation works with

do_compile() {
    make
}

but

do_compile:append() {
make
}

will not get indented right.

@kergoth
Copy link
Owner

kergoth commented Jun 6, 2022

Hmm, well spotted. This is a tough one given the way the indenter is currently implemented. Right now, we punt to the existing Vim shell indenter if we didn't pick up on the python function definition, but as a result, it means that initial indent is purely handled by the shell indenter, which doesn't support colons in definitions. I think we can easily fix this for python functions by correcting the pattern for bbPyFuncDef, I'll see about doing that. Fixing it for shell will involve shifting the handling the initial indent from shell.vim to us, if that's possible.

I'll look into fixing the python one in the next day or two, the other may have to wait until I get more time, or pull in Chris Laplante if he's still around.

@jclsn
Copy link
Author

jclsn commented Jun 6, 2022 via email

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

No branches or pull requests

2 participants