mirror of
https://github.com/neovim/nvim-lspconfig
synced 2024-09-16 14:24:07 +02:00
fix(texlab): use notify instead of print (#3256)
* feat(texlab): change all print() to vim.notify() Some texlab-specific functions were using `print`, some were using `vim.notify`. Changed all uses of `print` to `vim.notify` with levels: - `vim.log.levels.INFO` for `build` and `forwardSeach` LSP methods, - `vim.log.levels.ERROR` when the `texlab` client cannot be found. * fix(lint): integrate linter changes of #3256 --------- Co-authored-by: Thibault de Villèle <>
This commit is contained in:
parent
d710f5c58d
commit
e6528f4613
1 changed files with 10 additions and 4 deletions
|
@ -27,10 +27,13 @@ local function buf_build(bufnr)
|
|||
if err then
|
||||
error(tostring(err))
|
||||
end
|
||||
print('Build ' .. texlab_build_status[result.status])
|
||||
vim.notify('Build ' .. texlab_build_status[result.status], vim.log.levels.INFO)
|
||||
end, bufnr)
|
||||
else
|
||||
print 'method textDocument/build is not supported by any servers active on the current buffer'
|
||||
vim.notify(
|
||||
'method textDocument/build is not supported by any servers active on the current buffer',
|
||||
vim.log.levels.WARN
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -47,10 +50,13 @@ local function buf_search(bufnr)
|
|||
if err then
|
||||
error(tostring(err))
|
||||
end
|
||||
print('Search ' .. texlab_forward_status[result.status])
|
||||
vim.notify('Search ' .. texlab_forward_status[result.status], vim.log.levels.INFO)
|
||||
end, bufnr)
|
||||
else
|
||||
print 'method textDocument/forwardSearch is not supported by any servers active on the current buffer'
|
||||
vim.notify(
|
||||
'method textDocument/forwardSearch is not supported by any servers active on the current buffer',
|
||||
vim.log.levels.WARN
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue