-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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(texlab): add cancelBuild #2977
Conversation
if err then | ||
error(tostring(err)) | ||
end | ||
print 'Build cancelled' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use vim.notify()
instead of print.
local function buf_cancel_build() | ||
local texlab_client = util.get_active_client_by_name(0, 'texlab') | ||
if texlab_client then | ||
texlab_client.request('workspace/executeCommand', { command = 'texlab.cancelBuild' }, function(err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't workspace/executeCommand
part of the LSP spec? should this use :help vim.lsp.commands
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the reply and the suggestion. Reading the docs on the vim.lsp.commands
I too think it should be used here. However, the docs were not very helpful on how to implement it, even looking at the source code in neovim i could not get it to work. Moreover, i found another implementation with the request
in the following part from the es-lint config. I could really use some help regarding how to proceed, thanks in advance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a command for the new workspace command of texlab for canceling the build, including the onSave ones. I think it is pretty useful. Thanks for your effort and help