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

refactor: replace BufOnly plugin with two commands #10

Merged
merged 3 commits into from
Jul 19, 2024

Conversation

fidgetingbits
Copy link
Collaborator

While checking why BufOnly was being used, I realized we didn't need it, so this removes it.

@saidelike
Copy link
Owner

Sounds good to me. Rebasing to latest nvim-talon should fix the test on CI failure and we can merge. cc @pokey

@saidelike
Copy link
Owner

@fidgetingbits do you mind rebasing to nvim-talon so we confirm the tests pass before we merge?

@fidgetingbits
Copy link
Collaborator Author

@saidelike Not sure exactly how I closed this, I think I force pushed the wrong commit at first so it auto-closed, but now that I pushed the right commit it doesn't seem to re-open. Can you see if you can reopen it?

@fidgetingbits
Copy link
Collaborator Author

Actually I think I didn't realize you also recently force pushed already, so then force pushed back over it :/ Not sure if that is why..

@saidelike
Copy link
Owner

Actually I think I didn't realize you also recently force pushed already, so then force pushed back over it :/ Not sure if that is why..

Sorry ya it was my bad. I re-force pushed on top of it as there was an indent problem failing the pre-commit. Hopefully it is good now :)

@fidgetingbits
Copy link
Collaborator Author

I guess because this repo is defaulting to 4 space tabs, I will add a .stylua.toml file? Seems there isn't one for the repo, so my pre-commit is just picking up the defaults which is 2 spaces, and maybe single quoted strings. I forget if there was a reason we didn't add one before already?

@saidelike
Copy link
Owner

saidelike commented Jul 19, 2024

there is no stylua.toml because we use the .editorconfig for lua files too. Iiuc you had tabs (or maybe 4 spaces) but the .editorconfig requires 2 spaces. Not sure why your vscode does not automatically take that into account though.

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_size = 2
indent_style = space
max_line_length = 80
trim_trailing_whitespace = true

@saidelike saidelike merged commit d44187d into saidelike:nvim-talon Jul 19, 2024
14 checks passed
@fidgetingbits
Copy link
Collaborator Author

Ah right. it's because I use pre-commit hooks that re-format on git commit, so they'll change things even if vscode originally followed those rules. Guess I'll check if there is a way to make pre-commit follow editorconfig or maybe just disable pre-commit for cursorless, though I happen to quite like it for certain scenarios. I think maybe stylua should also be removed from pre-commit since I think it's probably what's breaking it, but I'll file a separate issue for that.

@fidgetingbits fidgetingbits deleted the remove-bufonly branch July 19, 2024 13:59
@pokey
Copy link
Collaborator

pokey commented Jul 19, 2024

Wait so is pre-commit doing different indentation on @fidgetingbits machine vs in CI?

Re the rebase fiasco above, I always advocate for a merge over a rebase when more than one person is looking at something. A rebase only makes sense before other people have seen it, or in extreme scenarios after coordinating with others

@fidgetingbits
Copy link
Collaborator Author

i recall I've always had issues with merge in PRs where I end up with the PR diff including all the unrelated upstream changes I merged in. Don't recall ever figuring out how to avoid it, so just always end up rebasing. I'll try it again next time. But ya, avoiding what just happened would be good lol.

@fidgetingbits
Copy link
Collaborator Author

And ya will have to experiment with pre-commit because I'm only using the commit hooks from this repo and apparently what I'm committing (lua at least?) fails.

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.

3 participants