feat: migrate to Telescope diagnostics using vim.diagnostic (#1553)
This commit is contained in:
@@ -405,37 +405,6 @@ lsp.dynamic_workspace_symbols = function(opts)
|
||||
}):find()
|
||||
end
|
||||
|
||||
lsp.diagnostics = function(opts)
|
||||
local locations = utils.diagnostics_to_tbl(opts)
|
||||
|
||||
if vim.tbl_isempty(locations) then
|
||||
print "No diagnostics found"
|
||||
return
|
||||
end
|
||||
|
||||
opts.path_display = utils.get_default(opts.path_display, "hidden")
|
||||
pickers.new(opts, {
|
||||
prompt_title = "LSP Document Diagnostics",
|
||||
finder = finders.new_table {
|
||||
results = locations,
|
||||
entry_maker = opts.entry_maker or make_entry.gen_from_lsp_diagnostics(opts),
|
||||
},
|
||||
previewer = conf.qflist_previewer(opts),
|
||||
sorter = conf.prefilter_sorter {
|
||||
tag = "type",
|
||||
sorter = conf.generic_sorter(opts),
|
||||
},
|
||||
}):find()
|
||||
end
|
||||
|
||||
lsp.workspace_diagnostics = function(opts)
|
||||
opts = utils.get_default(opts, {})
|
||||
opts.path_display = utils.get_default(opts.path_display, {})
|
||||
opts.prompt_title = "LSP Workspace Diagnostics"
|
||||
opts.get_all = true
|
||||
lsp.diagnostics(opts)
|
||||
end
|
||||
|
||||
local function check_capabilities(feature)
|
||||
local clients = vim.lsp.buf_get_clients(0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user