mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
refactor(lsp): consistent usage of vim.notify #34802
(cherry picked from commit 580b8cfac7
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
2d13ae0dd4
commit
0ab089add4
@@ -71,7 +71,7 @@ function M.hover(config)
|
|||||||
|
|
||||||
if vim.tbl_isempty(results1) then
|
if vim.tbl_isempty(results1) then
|
||||||
if config.silent ~= true then
|
if config.silent ~= true then
|
||||||
vim.notify('No information available')
|
vim.notify('No information available', vim.log.levels.INFO)
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@@ -363,7 +363,7 @@ function M.signature_help(config)
|
|||||||
|
|
||||||
if not next(signatures) then
|
if not next(signatures) then
|
||||||
if config.silent ~= true then
|
if config.silent ~= true then
|
||||||
print('No signature help available')
|
vim.notify('No signature help available', vim.log.levels.INFO)
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@@ -970,7 +970,7 @@ function M.add_workspace_folder(workspace_folder)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
if vim.fn.isdirectory(workspace_folder) == 0 then
|
if vim.fn.isdirectory(workspace_folder) == 0 then
|
||||||
print(workspace_folder, ' is not a valid directory')
|
vim.notify(workspace_folder .. ' is not a valid directory')
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local bufnr = api.nvim_get_current_buf()
|
local bufnr = api.nvim_get_current_buf()
|
||||||
@@ -994,7 +994,7 @@ function M.remove_workspace_folder(workspace_folder)
|
|||||||
for _, client in pairs(lsp.get_clients({ bufnr = bufnr })) do
|
for _, client in pairs(lsp.get_clients({ bufnr = bufnr })) do
|
||||||
client:_remove_workspace_folder(workspace_folder)
|
client:_remove_workspace_folder(workspace_folder)
|
||||||
end
|
end
|
||||||
print(workspace_folder, 'is not currently part of the workspace')
|
vim.notify(workspace_folder .. 'is not currently part of the workspace')
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Lists all symbols in the current workspace in the quickfix window.
|
--- Lists all symbols in the current workspace in the quickfix window.
|
||||||
|
Reference in New Issue
Block a user