feature: blur effect

feature: transparancy setup
neovim_0_5
ray-x 3 years ago
parent 4f262e9909
commit 04cf51f6c8

@ -203,6 +203,7 @@ require'navigator'.setup({
-- this kepmap gK will override "gD" mapping function declaration() in default kepmap
-- please check mapping.lua for all keymaps
treesitter_analysis = true, -- treesitter variable context
transparency = 50, -- 0 ~ 100 blur the main window, 100: fully transparent, 0: opaque, set to nil or 100 to disable it
code_action_prompt = {enable = true, sign = true, sign_priority = 40, virtual_text = true},
icons = {
-- Code action

@ -13,9 +13,10 @@ _NgConfigValues = {
-- function(client, bufnr)
-- -- your on_attach will be called at end of navigator on_attach
-- end,
ts_fold = false,
code_action_prompt = {enable = true, sign = true, sign_priority = 40, virtual_text = true},
treesitter_analysis = true, -- treesitter variable context
transparency = 50, -- 0 ~ 100 blur the main window, 100: fully transparent, 0: opaque, set to nil to disable it
lsp = {
format_on_save = true, -- set to false to disasble lsp code format on save (if you are using prettier/efm/formater etc)
disply_diagnostic_qf = true, -- always show quickfix if there are diagnostic errors
@ -105,6 +106,9 @@ M.setup = function(cfg)
require("navigator.definition")
require("navigator.hierarchy")
require("navigator.implementation")
if _NgConfigValues.ts_fold == true then
require('navigator.foldts').on_attach()
end
-- log("navigator loader")
if _NgConfigValues.code_action_prompt.enable then
vim.cmd [[autocmd CursorHold,CursorHoldI * lua require'navigator.codeAction'.code_action_prompt()]]

@ -159,7 +159,10 @@ function M.new_list_view(opts)
offset_y = offset_y + 1 -- need to check this out
end
local idx = require"guihua.util".fzy_idx
local transparency = _NgConfigValues.transparency
if transparency == 100 then
transparency = nil
end
return ListView:new({
loc = loc,
prompt = prompt,
@ -178,6 +181,7 @@ function M.new_list_view(opts)
util.open_file_at(item.filename, item.lnum, item.col)
end
end,
transparency = transparency,
on_move = opts.on_move or function(item)
trace("on move", pos, item)
trace("on move", pos, item.text or item, item.uri, item.filename)

Loading…
Cancel
Save