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

feature request: disable LSP file methods #462

Closed
1 task done
chnn opened this issue Aug 12, 2024 · 5 comments
Closed
1 task done

feature request: disable LSP file methods #462

chnn opened this issue Aug 12, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@chnn
Copy link

chnn commented Aug 12, 2024

Did you check existing requests?

  • I have searched the existing issues

Describe the feature

I would love to turn off the LSP file methods completely.

Provide background

I work in a large repository where those operations are too slow to ever complete successfully. Trying to complete them sometimes leaves the file tree in a chaotic messy state. In the worst case it has caused me to lose a file altogether.

What is the significance of this feature?

nice to have

Additional details

For now I'm setting timeout_ms=1.

@chnn chnn added the enhancement New feature or request label Aug 12, 2024
@csponge
Copy link
Contributor

csponge commented Aug 23, 2024

I've made some modifications locally, and I think I got something working. My modification just adds an enable option to the existing lsp_file_methods. When disabled, it won't perform the lsp actions.

Before I would do a pull request though, I had a question. Would it be possible to just disable these capabilities for the project you are working on?

  • workspace.fileOperations.willCreate
  • workspace.fileOperations.willRename
  • workspace.fileOperations.willDelete

I think it would be easier to just have a flag in the oil config, but I thought I would pose the question first.

Any thoughts?

@chnn
Copy link
Author

chnn commented Sep 9, 2024

Yeah, I think either disabling the capabilities or adding the oil config flag would work. The oil config flag is definitely easier!

@csponge
Copy link
Contributor

csponge commented Sep 11, 2024

Hi @chnn! I've pushed the changes to my branch. Would you mind pulling my version and giving it a test?

https://github.com/csponge/oil.nvim/tree/feat/disable-lsp-file-methods

You can set the lsp_file_methods:enable to false to disable it. Let me know if that fixes things for you.

@chnn
Copy link
Author

chnn commented Sep 11, 2024

@csponge Gave it a whirl, seems to be working great! I'll continue testing it in day-to-day work

@bew
Copy link

bew commented Dec 20, 2024

since #477 was merged, can we close this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants