aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/server_configurations/texlab.lua
diff options
context:
space:
mode:
authorThibault de Villèle <25150288+Thibaulltt@users.noreply.github.com>2024-08-02 14:41:19 +0200
committerGitHub <noreply@github.com>2024-08-02 20:41:19 +0800
commite6528f4613c8db2e04be908eb2b5886d63f62a98 (patch)
tree2d70fa052c614726e651998e9241351fb01663ef /lua/lspconfig/server_configurations/texlab.lua
parentdocs: update server_configurations.md (diff)
downloadnvim-lspconfig-e6528f4613c8db2e04be908eb2b5886d63f62a98.tar
nvim-lspconfig-e6528f4613c8db2e04be908eb2b5886d63f62a98.tar.gz
nvim-lspconfig-e6528f4613c8db2e04be908eb2b5886d63f62a98.tar.bz2
nvim-lspconfig-e6528f4613c8db2e04be908eb2b5886d63f62a98.tar.lz
nvim-lspconfig-e6528f4613c8db2e04be908eb2b5886d63f62a98.tar.xz
nvim-lspconfig-e6528f4613c8db2e04be908eb2b5886d63f62a98.tar.zst
nvim-lspconfig-e6528f4613c8db2e04be908eb2b5886d63f62a98.zip
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 <>
Diffstat (limited to 'lua/lspconfig/server_configurations/texlab.lua')
-rw-r--r--lua/lspconfig/server_configurations/texlab.lua14
1 files changed, 10 insertions, 4 deletions
diff --git a/lua/lspconfig/server_configurations/texlab.lua b/lua/lspconfig/server_configurations/texlab.lua
index 3f559317..7b079d27 100644
--- a/lua/lspconfig/server_configurations/texlab.lua
+++ b/lua/lspconfig/server_configurations/texlab.lua
@@ -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