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

Use setbufline() and deletebufline() for :ALEFix where available #1739

Closed
w0rp opened this issue Jul 20, 2018 · 4 comments · Fixed by #2541
Closed

Use setbufline() and deletebufline() for :ALEFix where available #1739

w0rp opened this issue Jul 20, 2018 · 4 comments · Fixed by #2541

Comments

@w0rp
Copy link
Member

w0rp commented Jul 20, 2018

More recent Vim patches have setbufline() and deletebufline() functions for modifying buffers other than the current one. These functions can be used to fix buffers which are not in view straight away, instead of waiting for the user to switch to them again. These functions do not exist in NeoVim, but it does offer nvim_buf_set_lines in some versions. I am not sure if that function supports deleting lines or not.

@w0rp
Copy link
Member Author

w0rp commented May 20, 2019

I have implemented this now. I tested out supporting nvim_buf_set_lines for NeoVim, but I decided against that because it causes the cursor to move around, and so it isn't usable.

@dsifford
Copy link
Contributor

Getting errors on neovim with this....

Error detected while processing function <SNR>171_NeoVimCallback[29]..<lambda>68[1]..<SNR>166_ExitCallback[28]..<SNR>164_HandleExit[41]..<SNR>164_RunFixer[6]..
ale#fix#ApplyFixes[26]..ale#fix#ApplyQueuedFixes:
line   20:
E117: Unknown function: setbufline

@jwkvam
Copy link
Contributor

jwkvam commented May 28, 2019

It seems neovim/neovim#10059 introduced deletebufline to neovim head, but did not include setbufline, kind of annoying for this :/

@w0rp
Copy link
Member Author

w0rp commented May 28, 2019

@dsifford Now fixed thanks to @jwkvam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants