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

feat(#3037): add node API methods for deleting/wiping buffers #3040

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

GCrispino
Copy link

@GCrispino GCrispino commented Dec 30, 2024

This PR adds two API methods for respectively deleting and wiping the buffer for the current file under the tree cursor:

  • Api.node.buffer.delete; and
  • Api.node.buffer.wipe,

as discussed in #3037.

They both use the same underlying function defined in the new file added at lua/actions/node/utils.lua.
This function checks if there's an opened and loaded buffer for the file under the tree cursor.
If there isn't, it notifies an error message.

Otherwise, it deletes/wipes the buffer if it's not modified (unless opts.force is true)

I'm setting this as WIP because I haven't run the make commands yet.
EDIT: done

@GCrispino GCrispino changed the title WIP: feat(#2826): add node API methods for deleting/wiping buffers WIP: feat(#3037): add node API methods for deleting/wiping buffers Dec 30, 2024
@GCrispino GCrispino changed the title WIP: feat(#3037): add node API methods for deleting/wiping buffers feat(#3037): add node API methods for deleting/wiping buffers Dec 31, 2024
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.

1 participant