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

Update README.md | Update Auto-disable Example #6676

Closed

Conversation

alirezaalavi87
Copy link

since vim.loop is deprecated, updated the function.
This is also more concise and easier to understand.

Written with help from chatGPT3.5 turbo

since `vim.loop` is deprecated, updated the function.
@clason
Copy link
Contributor

clason commented May 22, 2024

That's about the sort of PR I would expect from a glorified Markov chain.

@clason clason closed this May 22, 2024
@alirezaalavi87
Copy link
Author

Wow!
You are so insecure that you get offended by PRs?

Having outdated examples in your document isn't a good thing.
I just spent some time trying to fix it for myself and thought it will be helpful for other people too.

you seem like a small person.

@alirezaalavi87 alirezaalavi87 deleted the patch-1 branch May 22, 2024 20:55
Comment on lines +134 to +140
local max_filesize = 100 * 1024 -- 100 KB
local filename = vim.api.nvim_buf_get_name(buf)
local file_size = vim.fn.getfsize(filename)

if file_size > max_filesize then
return true
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getfsize returns -1, which doesn't seem to be handled here?

Additionally, why not just move vim.loop to vim.uv now that vim.uv is in latest release version of Neovim?

@alirezaalavi87 alirezaalavi87 restored the patch-1 branch May 23, 2024 10:54
@alirezaalavi87 alirezaalavi87 deleted the patch-1 branch May 23, 2024 10:54
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.

None yet

3 participants