helptags: wrap nvim_win_call in a pcall, regen vimdoc

main
bhagwan 2 years ago
parent 5e4151d495
commit 989674058e

@ -216,7 +216,7 @@ GIT *fzf-lua-git*
LSP *fzf-lua-lsp* LSP/DIAGNOSTICS *fzf-lua-lsp/diagnostics*
| Command | List | | Command | List |
| ---------------- | ------------------------------------------ | | ---------------- | ------------------------------------------ |
@ -229,10 +229,12 @@ LSP *fzf-lua-lsp*
| `lsp_workspace_symbols` | Workspace Symbols | | `lsp_workspace_symbols` | Workspace Symbols |
| `lsp_live_workspace_symbols` | Workspace Symbols (live query) | | `lsp_live_workspace_symbols` | Workspace Symbols (live query) |
| `lsp_code_actions` | Code Actions | | `lsp_code_actions` | Code Actions |
| `lsp_document_diagnostics` | Document Diagnostics |
| `lsp_workspace_diagnostics` | Workspace Diagnostics |
| `lsp_incoming_calls` | Incoming Calls | | `lsp_incoming_calls` | Incoming Calls |
| `lsp_outgoing_calls` | Outgoing Calls | | `lsp_outgoing_calls` | Outgoing Calls |
| `diagnostics_document` | Document Diagnostics |
| `diagnostics_workspace` | Workspace Diagnostics |
| `lsp_document_diagnostics` | alias to `diagnostics_document` |
| `lsp_workspace_diagnostics` | alias to `diagnostics_workspace` |
@ -798,26 +800,43 @@ Consult the list below for available settings:
async_or_timeout = 5000, -- timeout(ms) or 'true' for async calls async_or_timeout = 5000, -- timeout(ms) or 'true' for async calls
file_icons = true, file_icons = true,
git_icons = false, git_icons = false,
lsp_icons = true,
ui_select = true, -- use 'vim.ui.select' for code actions ui_select = true, -- use 'vim.ui.select' for code actions
symbol_style = 1, -- style for document/workspace symbols -- settings for 'lsp_{document|workspace|lsp_live_workspace}_symbols'
-- false: disable, 1: icon+kind symbols = {
-- 2: icon only, 3: kind only async_or_timeout = true, -- symbols are async by default
-- NOTE: icons are extracted from symbol_style = 1, -- style for document/workspace symbols
-- vim.lsp.protocol.CompletionItemKind -- false: disable, 1: icon+kind
-- colorize using nvim-cmp's CmpItemKindXXX highlights -- 2: icon only, 3: kind only
-- can also be set to 'TS' for treesitter highlights ('TSProperty', etc) -- NOTE: icons are extracted from
-- or 'false' to disable highlighting -- vim.lsp.protocol.CompletionItemKind
symbol_hl_prefix = "CmpItemKind", -- colorize using nvim-cmp's CmpItemKindXXX highlights
-- additional symbol formatting, works with or without style -- can also be set to 'TS' for treesitter highlights ('TSProperty', etc)
symbol_fmt = function(s) return "["..s.."]" end, -- or 'false' to disable highlighting
severity = "hint", symbol_hl_prefix = "CmpItemKind",
icons = { -- additional symbol formatting, works with or without style
["Error"] = { icon = "", color = "red" }, -- error symbol_fmt = function(s) return "["..s.."]" end,
["Warning"] = { icon = "", color = "yellow" }, -- warning },
["Information"] = { icon = "", color = "blue" }, -- info },
["Hint"] = { icon = "", color = "magenta" }, -- hint diagnostics ={
prompt = 'Diagnostics ',
cwd_only = false, -- limit to cwd only?
file_icons = true,
git_icons = false,
diag_icons = true,
severity_icons = {
["Error"] = { icon = "", color = "red" },
["Warning"] = { icon = "", color = "yellow" },
["Information"] = { icon = "", color = "blue" },
["Hint"] = { icon = "", color = "magenta" },
}, },
-- limit to specific severity, use either a string or num:
-- 1 or "hint"
-- 2 or "information"
-- 3 or "warning"
-- 4 or "error"
-- severity_only: keep any matching exact severity
-- severity_limit: keep any equal or more severe (lower)
-- severity_bound: keep any equal or less severe (higher)
}, },
-- uncomment to use the old help previewer which used a -- uncomment to use the old help previewer which used a
-- minimized help window to generate the help tag preview -- minimized help window to generate the help tag preview

@ -739,7 +739,7 @@ end
function Previewer.help_tags:populate_preview_buf(entry_str) function Previewer.help_tags:populate_preview_buf(entry_str)
local entry = self:parse_entry(entry_str) local entry = self:parse_entry(entry_str)
vim.api.nvim_win_call(self.help_winid, function() pcall(vim.api.nvim_win_call, self.help_winid, function()
self.prev_help_bufnr = api.nvim_get_current_buf() self.prev_help_bufnr = api.nvim_get_current_buf()
self:exec_cmd(entry) self:exec_cmd(entry)
vim.api.nvim_buf_set_option(0, 'filetype', self.filetype) vim.api.nvim_buf_set_option(0, 'filetype', self.filetype)

Loading…
Cancel
Save