many updates, lighter status line
parent
3a80c0080d
commit
56a679c0a3
@ -0,0 +1,125 @@
|
||||
local M = {}
|
||||
|
||||
M.override = {
|
||||
IndentBlanklineContextChar = {
|
||||
fg = "yellow",
|
||||
nocombine = true,
|
||||
},
|
||||
Comment = {
|
||||
fg = "light_grey"
|
||||
},
|
||||
CursorLine = {
|
||||
bg = "#3b2a41"
|
||||
},
|
||||
ColorColumn = {
|
||||
bg = "#3b2a41"
|
||||
},
|
||||
DiagnosticWarn = {
|
||||
fg = "yellow",
|
||||
italic = true,
|
||||
},
|
||||
St_LspWarning = {
|
||||
fg = "yellow"
|
||||
},
|
||||
DiagnosticHint = {
|
||||
fg = "purple",
|
||||
italic = true,
|
||||
},
|
||||
St_LspHints = {
|
||||
fg = "pruple",
|
||||
},
|
||||
DiagnosticError = {
|
||||
italic = true,
|
||||
},
|
||||
St_LspInfo = {
|
||||
fg = "white"
|
||||
},
|
||||
}
|
||||
|
||||
M.add = {
|
||||
Visual = {
|
||||
bg = "blue",
|
||||
fg = "black",
|
||||
},
|
||||
BookmarkSign = {
|
||||
fg = "blue",
|
||||
},
|
||||
BookmarkAnnotationSign = {
|
||||
fg = "yellow",
|
||||
},
|
||||
BookmarkAnnotationLine = {
|
||||
fg = "black",
|
||||
bg = "yellow"
|
||||
},
|
||||
DiagnosticInfo = { -- nvchad uses DiagnosticInformation wrong hi group for lsp
|
||||
fg = "white",
|
||||
italic = true,
|
||||
},
|
||||
DiagnosticFloatingInfo = {
|
||||
fg = "white",
|
||||
italic = true,
|
||||
},
|
||||
DiagnosticUnderlineError = {
|
||||
fg = "black",
|
||||
bg = "pink",
|
||||
},
|
||||
-- Code Lens related colors
|
||||
LspCodeLens = {
|
||||
fg = "vibrant_green",
|
||||
underline = true,
|
||||
},
|
||||
LspDiagnosticsSignHint = { -- LspDiagnostics Code Action
|
||||
fg = "vibrant_green",
|
||||
italic = true,
|
||||
},
|
||||
-- end of code lens colors
|
||||
DiffText = {
|
||||
bg = "vigrant_green"
|
||||
},
|
||||
St_DapMode = {
|
||||
fg = "black2",
|
||||
bg = "baby_pink",
|
||||
},
|
||||
St_DapModeSep = {
|
||||
fg = "baby_pink",
|
||||
bg = "one_bg3",
|
||||
},
|
||||
St_DapModeSep2 = {
|
||||
fg = "grey",
|
||||
bg = "baby_pink",
|
||||
},
|
||||
DapBreakpoint = {
|
||||
fg = "green"
|
||||
},
|
||||
DapStopped = {
|
||||
fg = "#ff4848"
|
||||
},
|
||||
DapLogPoint = {
|
||||
fg = "vibrant_green"
|
||||
},
|
||||
DapBreakpointCondition = {
|
||||
fg = "cyan"
|
||||
},
|
||||
DapBreakpointRejected = {
|
||||
fg = "purple"
|
||||
},
|
||||
LuaSnipChoice = {
|
||||
fg = "yellow",
|
||||
bg = "one_bg3",
|
||||
},
|
||||
LuaSnipInsert = {
|
||||
fg = "teal",
|
||||
-- bg = "one_bg3",
|
||||
},
|
||||
NvimDapVirtualText = {
|
||||
fg = '#f99540'
|
||||
},
|
||||
TabLineSel = {
|
||||
fg = "white",
|
||||
bold = true
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
|
||||
return M
|
@ -1,71 +0,0 @@
|
||||
local fzf = require("fzf-lua")
|
||||
|
||||
local M = {}
|
||||
|
||||
local function fzf_display_bookmarks(bookmarks)
|
||||
P(bookmarks)
|
||||
|
||||
local fzf_exec_opts = {
|
||||
previewer = "builtin",
|
||||
fzf_opts = {
|
||||
['--preview'] = fzf.shell.action(function(items)
|
||||
local contents = {}
|
||||
vim.tbl_map(function (x)
|
||||
table.insert(contents, x)
|
||||
end, items)
|
||||
return contents
|
||||
end)
|
||||
}
|
||||
}
|
||||
|
||||
fzf.fzf_exec(function(fzf_cb)
|
||||
for _, bookmark in ipairs(bookmarks) do
|
||||
-- P(bookmark.text)
|
||||
local entry_text = string.gsub(bookmark.text, "\t", "")
|
||||
entry_text = string.format("%-40s", entry_text)
|
||||
fzf_cb(entry_text)
|
||||
fzf_cb()
|
||||
end
|
||||
end, fzf_exec_opts)
|
||||
end
|
||||
|
||||
local function get_bookmarks(files, opts)
|
||||
opts = opts or {}
|
||||
local bookmarks = {}
|
||||
|
||||
for _,file in ipairs(files) do
|
||||
for _,line in ipairs(vim.fn['bm#all_lines'](file)) do
|
||||
local bookmark = vim.fn['bm#get_bookmark_by_line'](file, line)
|
||||
|
||||
local text = bookmark.annotation ~= "" and "Annotation: " .. bookmark.annotation or bookmark.content
|
||||
if text == "" then
|
||||
text = "(empty line)"
|
||||
end
|
||||
|
||||
local only_annotated = opts.only_annotated or false
|
||||
|
||||
P(only_annotated)
|
||||
if not (only_annotated and bookmark.annotation == "") then
|
||||
table.insert(bookmarks, {
|
||||
filename = file,
|
||||
lnum = tonumber(line),
|
||||
col=1,
|
||||
text = text,
|
||||
sign_idx = bookmark.sign_idx,
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return bookmarks
|
||||
end
|
||||
|
||||
M.all = function(opts)
|
||||
opts = opts or {}
|
||||
local files = vim.fn['bm#all_files']()
|
||||
bookmarks = get_bookmarks(files)
|
||||
fzf_display_bookmarks(bookmarks)
|
||||
end
|
||||
|
||||
-- M.all()
|
||||
-- return M
|
@ -0,0 +1,75 @@
|
||||
local ok, fzf = pcall(require, 'fzf-lua')
|
||||
if not ok then
|
||||
vim.notify("missing module fzf-lua", vim.log.levels.WARN)
|
||||
return
|
||||
end
|
||||
|
||||
local M = {}
|
||||
|
||||
local function fzf_display_bookmarks(bookmarks)
|
||||
P(bookmarks)
|
||||
|
||||
local fzf_exec_opts = {
|
||||
previewer = "builtin",
|
||||
fzf_opts = {
|
||||
['--preview'] = fzf.shell.action(function(items)
|
||||
local contents = {}
|
||||
vim.tbl_map(function (x)
|
||||
table.insert(contents, x)
|
||||
end, items)
|
||||
return contents
|
||||
end)
|
||||
}
|
||||
}
|
||||
|
||||
fzf.fzf_exec(function(fzf_cb)
|
||||
for _, bookmark in ipairs(bookmarks) do
|
||||
-- P(bookmark.text)
|
||||
local entry_text = string.gsub(bookmark.text, "\t", "")
|
||||
entry_text = string.format("%-40s", entry_text)
|
||||
fzf_cb(entry_text)
|
||||
fzf_cb()
|
||||
end
|
||||
end, fzf_exec_opts)
|
||||
end
|
||||
|
||||
local function get_bookmarks(files, opts)
|
||||
opts = opts or {}
|
||||
local bookmarks = {}
|
||||
|
||||
for _,file in ipairs(files) do
|
||||
for _,line in ipairs(vim.fn['bm#all_lines'](file)) do
|
||||
local bookmark = vim.fn['bm#get_bookmark_by_line'](file, line)
|
||||
|
||||
local text = bookmark.annotation ~= "" and "Annotation: " .. bookmark.annotation or bookmark.content
|
||||
if text == "" then
|
||||
text = "(empty line)"
|
||||
end
|
||||
|
||||
local only_annotated = opts.only_annotated or false
|
||||
|
||||
P(only_annotated)
|
||||
if not (only_annotated and bookmark.annotation == "") then
|
||||
table.insert(bookmarks, {
|
||||
filename = file,
|
||||
lnum = tonumber(line),
|
||||
col=1,
|
||||
text = text,
|
||||
sign_idx = bookmark.sign_idx,
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return bookmarks
|
||||
end
|
||||
|
||||
M.all = function(opts)
|
||||
opts = opts or {}
|
||||
local files = vim.fn['bm#all_files']()
|
||||
bookmarks = get_bookmarks(files)
|
||||
fzf_display_bookmarks(bookmarks)
|
||||
end
|
||||
|
||||
-- M.all()
|
||||
-- return M
|
Loading…
Reference in New Issue