Compare commits
5 commits
91a85c2a11
...
63fe5901e9
Author | SHA1 | Date | |
---|---|---|---|
63fe5901e9 | |||
99cb0e7cd2 | |||
1f502f1942 | |||
40543164f6 | |||
3da6eb36b0 |
3 changed files with 61 additions and 41 deletions
|
@ -87,14 +87,14 @@ M.set_severity = function()
|
|||
end,
|
||||
},
|
||||
sorter = require("telescope.config").values.generic_sorter(opts),
|
||||
attach_mappings = function(prompt_bufnr, _)
|
||||
local actions = require("telescope.actions")
|
||||
actions.select_default:replace(function()
|
||||
actions.close(prompt_bufnr)
|
||||
attach_mappings = function(prompt_bufnr)
|
||||
require("telescope.actions.set").select:replace(function()
|
||||
local selection = require("telescope.actions.state").get_selected_entry()
|
||||
require("telescope.actions").close(prompt_bufnr)
|
||||
|
||||
M.setup { severity = { min = selection.value.severity } }
|
||||
end)
|
||||
return true
|
||||
return true -- Attach default mappings as well.
|
||||
end,
|
||||
})
|
||||
:find()
|
||||
|
|
|
@ -17,13 +17,15 @@ local pickers = setmetatable({
|
|||
no_ignore = true,
|
||||
no_ignore_parent = true,
|
||||
}),
|
||||
all_man_pages = builtin("man_pages", {
|
||||
sections = { "ALL" },
|
||||
document_diagnostics = builtin("diagnostics", { bufnr = 0 }),
|
||||
workspace_diagnostics = builtin("diagnostics"),
|
||||
dotfiles = builtin("find_files", {
|
||||
cwd = "~/.dotfiles",
|
||||
hidden = true,
|
||||
}),
|
||||
plugins = builtin("find_files", {
|
||||
cwd = vim.fn.stdpath("data") .. "/lazy",
|
||||
}),
|
||||
colorscheme = builtin("colorscheme", { enable_preview = true }),
|
||||
diagnostics = builtin("diagnostics", { bufnr = 0 }),
|
||||
dotfiles = builtin("find_files", { cwd = "~/.dotfiles", hidden = true }),
|
||||
plugins = builtin("find_files", { cwd = vim.fn.stdpath("data") .. "/lazy" }),
|
||||
selection = function(title)
|
||||
return function()
|
||||
local text = require("util").get_selected_text()
|
||||
|
@ -33,7 +35,6 @@ local pickers = setmetatable({
|
|||
}
|
||||
end
|
||||
end,
|
||||
here = builtin("current_buffer_fuzzy_find"),
|
||||
}, {
|
||||
-- Fall back to telescope's built-in pickers if a custom one is not defined
|
||||
-- above, but make sure to keep the title we defined.
|
||||
|
@ -78,21 +79,22 @@ return {
|
|||
--"B" used in telescope-file-browser
|
||||
{ "c", pickers.colorscheme " Colorschemes" , desc = "[c]olorschemes" },
|
||||
{ "C", pickers.commands " Commands" , desc = "[C]ommands" },
|
||||
{ "d", pickers.diagnostics " Diagnostics" , desc = "[d]iagnostics" },
|
||||
{ "d", pickers.document_diagnostics " Document Diagnostics" , desc = "document [d]iagnostics" },
|
||||
{ "D", pickers.workspace_diagnostics " Workspace Diagnostics", desc = "workspace [d]iagnostics" },
|
||||
--"e"
|
||||
{ "f", pickers.find_files " Files" , desc = "[f]ind files" },
|
||||
{ "F", pickers.all_files " ALL files" , desc = "all [F]iles" },
|
||||
{ "gr", pickers.live_grep " Live grep" , desc = "Live [gr]ep" },
|
||||
{ "gf", pickers.git_files " Git files" , desc = "[g]it [f]iles" },
|
||||
{ "gc", pickers.git_commits " Commits" , desc = "[g]it [c]ommits" },
|
||||
{ "h", pickers.here " Current buffer" , desc = "[b]uffer [h]ere" },
|
||||
{ "h", pickers.current_buffer_fuzzy_find " Current buffer" , desc = "[h]ere (currenf buffer)" },
|
||||
{ "H", pickers.highlights " Highlights" , desc = "[H]ighlights" },
|
||||
--"i" used in nerdy
|
||||
{ "j", pickers.jumplist " Jumplist" , desc = "[j]umplist" },
|
||||
{ "k", pickers.keymaps " Keymaps" , desc = "[k]eymaps" },
|
||||
{ "K", pickers.help_tags " Help tags" , desc = "[K] help/documentation" },
|
||||
{ "l", pickers.loclist " Location list" , desc = "[l]ocation List" },
|
||||
{ "m", pickers.all_man_pages " Man pages" , desc = "[m]an pages" },
|
||||
{ "m", pickers.man_pages " Man pages" , desc = "[m]an pages" },
|
||||
--"n" used in vim-notify
|
||||
{ "o", pickers.vim_options " Vim options" , desc = "[o]ptions" },
|
||||
{ "p", pickers.plugins " Installed Plugins" , desc = "[p]lugins" },
|
||||
|
@ -187,8 +189,16 @@ return {
|
|||
i = { ["<c-x>"] = actions.delete_buffer },
|
||||
},
|
||||
},
|
||||
colorscheme = { theme = "dropdown" },
|
||||
spell_suggest = { theme = "cursor" },
|
||||
colorscheme = {
|
||||
enable_preview = true,
|
||||
theme = "dropdown",
|
||||
},
|
||||
man_pages = {
|
||||
sections = { "ALL" },
|
||||
},
|
||||
spell_suggest = {
|
||||
theme = "cursor",
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
|
|
|
@ -102,32 +102,42 @@ set-environment -gu SHLVL
|
|||
#
|
||||
# Style (status list, colors, ...)
|
||||
#
|
||||
set -g status-left ' ' #
|
||||
set -g status-right '\
|
||||
#[fg=brightblack] \
|
||||
#{?client_prefix,#[fg=brightyellow],#[fg=brightblack]}#{pane_id}\
|
||||
#[fg=brightblack] \
|
||||
#{?client_prefix,#[fg=brightyellow],#[fg=brightblack]}#{session_name}\
|
||||
#[fg=brightblack] \
|
||||
#{?client_prefix,#[fg=brightyellow],#[fg=brightblack]}#{pid} @ #{host_short} '
|
||||
background="#1d2021"
|
||||
highlight="#b57614"
|
||||
current_badge="#076678"
|
||||
current_bg="#003848"
|
||||
current_fg="#83a598"
|
||||
window_badge="#504945"
|
||||
window_fg="#7c6f64"
|
||||
|
||||
setw -g window-status-current-format '\
|
||||
#{?client_prefix,#[fg=brightyellow],#[fg=brightcyan]}#{window_index} \
|
||||
#[bold]#[fg=blue]#{window_name}#[nobold] \
|
||||
#{?client_prefix,#[fg=brightyellow],#[fg=brightcyan]}\
|
||||
#{?pane_synchronized, ,}#{?window_marked_flag, ,}#{?window_zoomed_flag, ,}\
|
||||
#[fg=brightblack]'
|
||||
|
||||
setw -g window-status-format '\
|
||||
#{?client_prefix,#[fg=brightyellow],#{?window_last_flag,#[fg=cyan],#[fg=brightblack]}}\
|
||||
#{window_index} \
|
||||
#[fg=brightblack]#{window_name} \
|
||||
#{?pane_synchronized, ,}#{?window_marked_flag, ,}#{?window_zoomed_flag, ,}\
|
||||
#[fg=brightblack]'
|
||||
|
||||
set -g status-justify left
|
||||
set -g status-style fg=white,bg=black
|
||||
set -g pane-border-style fg=black
|
||||
set -g pane-active-border-style fg=brightblue
|
||||
set -g message-style fg=brightwhite,bg=black
|
||||
set -g message-command-style fg=yellow,bg=black
|
||||
|
||||
set -g status-style bg=${background}
|
||||
set -g status-justify left
|
||||
set -g status-left ""
|
||||
|
||||
flags="#{?pane_synchronized, ,}#{?window_marked_flag, ,}#{?window_zoomed_flag, ,}"
|
||||
|
||||
setw -g window-status-format "\
|
||||
#[fg=${background} bg=#{?client_prefix,${highlight},${window_badge}} bold] #{window_index} \
|
||||
#[fg=#{?window_last_flag,${current_fg},${window_fg}} bg=${background} nobold] #{window_name} ${flags}\
|
||||
#[default] "
|
||||
|
||||
setw -g window-status-current-format "\
|
||||
#[fg=${background} bg=#{?client_prefix,${highlight},${current_badge}} bold] #{window_index} \
|
||||
#[fg=${current_fg} bg=${current_bg} nobold] #{window_name} ${flags}\
|
||||
#[default] "
|
||||
|
||||
box_begin="#[fg=${background} bg=#{?client_prefix,${highlight},${window_badge}} bold] "
|
||||
box_mid="#[fg=${window_fg} bg=${background} nobold]"
|
||||
box_end="#[default]"
|
||||
|
||||
set -g status-right-length 64
|
||||
set -g status-right "\
|
||||
${box_begin} ${box_mid} #{pane_id} ${box_end} \
|
||||
${box_begin} ${box_mid} #{session_name} ${box_end} \
|
||||
${box_begin} ${box_mid} #{pid} ${box_end} \
|
||||
${box_begin} ${box_mid} #{host_short} ${box_end}"
|
||||
|
|
Loading…
Add table
Reference in a new issue