border setup for diagnostic

neovim_0_5
ray-x 3 years ago
parent f16a04482d
commit ef995eeb7e

@ -6,6 +6,8 @@ _NgConfigValues = {
height = 0.35,
default_mapping = true,
keymaps = {}, -- e.g keymaps={{key = "GR", func = "references()"}, } this replace gr default mapping
border = "single", -- border style, can be one of 'none', 'single', 'double', "shadow"
combined_attach = "both", -- both: use both customized attach and navigator default attach, mine: only use my attach defined in vimrc
on_attach = nil,
-- function(client, bufnr)

@ -98,8 +98,10 @@ local function def_preview(timeout_ms)
ft = filetype,
width = width,
data = definition,
enter = true
enter = true,
border = _NgConfigValues.border or "shadow"
}
TextView:new(opts)
delta = delta + 1 -- header
local cmd = "normal! " .. tostring(delta) .. "G"

@ -20,7 +20,7 @@ local key_maps = {
{key = "g0", func = "document_symbol()"},
{key = "gW", func = "workspace_symbol()"},
{key = "<c-]>", func = "definition()"},
{key = "gD", func = "declaration({ popup_opts = { border = 'single' }})"},
{key = "gD", func = "declaration( { border = 'single' })"},
{key = "gp", func = "require('navigator.definition').definition_preview()"},
{key = "gT", func = "require('navigator.treesitter').buf_ts()"},
{key = "GT", func = "require('navigator.treesitter').bufs_ts()"},
@ -33,10 +33,10 @@ local key_maps = {
{key = "<Leader>go", func = "outgoing_calls()"},
{key = "gi", func = "implementation()"},
{key = "<Space>D", func = "type_definition()"},
{key = "gL", func = "diagnostic.show_line_diagnostics({ popup_opts = { border = single }})"},
{key = "gL", func = "diagnostic.show_line_diagnostics( { border = 'single' })"},
{key = "gG", func = "require('navigator.diagnostics').show_diagnostic()"},
{key = "]d", func = "diagnostic.goto_next({ popup_opts = { border = single }})"},
{key = "[d", func = "diagnostic.goto_next({ popup_opts = { border = single }})"},
{key = "]d", func = "diagnostic.goto_next({ border = 'single' })"},
{key = "[d", func = "diagnostic.goto_next({ border = 'single' })"},
{key = "]r", func = "require('navigator.treesitter').goto_next_usage()"},
{key = "[r", func = "require('navigator.treesitter').goto_previous_usage()"},
{key = "<C-LeftMouse>", func = "definition()"},

Loading…
Cancel
Save