Add scrollbar with diagnostics
This commit is contained in:
parent
1700a7c450
commit
909ff7aa1c
3
init.lua
3
init.lua
|
@ -229,7 +229,6 @@ vim.opt.rtp:prepend(lazypath)
|
|||
require('lazy').setup({
|
||||
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
|
||||
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
|
||||
'rebelot/kanagawa.nvim', -- Detect tabstop and shiftwidth automatically
|
||||
|
||||
-- NOTE: Plugins can also be added by using a table,
|
||||
-- with the first argument being the link and the following
|
||||
|
@ -864,7 +863,7 @@ require('lazy').setup({
|
|||
-- Load the colorscheme here.
|
||||
-- Like many other themes, this one has different styles, and you could load
|
||||
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
|
||||
vim.cmd.colorscheme 'kanagawa'
|
||||
vim.cmd.colorscheme 'tokyonight-day'
|
||||
|
||||
-- You can configure highlights by doing something like:
|
||||
vim.cmd.hi 'Comment gui=none'
|
||||
|
|
|
@ -1,31 +1,29 @@
|
|||
{
|
||||
"CopilotChat.nvim": { "branch": "main", "commit": "4012712aac2c892294fa12505cb4cc829f161f6c" },
|
||||
"CopilotChat.nvim": { "branch": "main", "commit": "03d1aba3270169e2c06edb0043b1d232e4f43dce" },
|
||||
"LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" },
|
||||
"auto-session": { "branch": "main", "commit": "79ef41274354a486cf4f100a7adf4a7575802ccf" },
|
||||
"auto-session": { "branch": "main", "commit": "317412742990371f8e4709074da5c378456a27ff" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"conform.nvim": { "branch": "master", "commit": "db8a4a9edb217067b1d7a2e0362c74bfe9cc944d" },
|
||||
"copilot-cmp": { "branch": "master", "commit": "15fc12af3d0109fa76b60b5cffa1373697e261d1" },
|
||||
"copilot.lua": { "branch": "master", "commit": "30321e33b03cb924fdcd6a806a0dc6fa0b0eafb9" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "011dc6718bcebdf92a5336bb0da79189c3afe621" },
|
||||
"kanagawa.nvim": { "branch": "master", "commit": "cfd67b0e1eeaa04302b8c7eb072253d24bf22d84" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "5639d58a3d11ff7c05c8e31e159bfedae55d7961" },
|
||||
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
|
||||
"mini.nvim": { "branch": "main", "commit": "d7ba1dec0082b7a542aa79c327e9554d4a27cc2c" },
|
||||
"minimap.vim": { "branch": "master", "commit": "57287e2dd28fa3e63276a32d11c729df14741d54" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "c27370703e798666486e3064b64d59eaf4bdc6d5" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "8a1529e46eef5efc86c34c8d9bdd313abc2ecba0" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "1a314a58d6d7695d226b56f6b61b1596993d5ac7" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "198720b4016af04c9590f375d714d5bf8afecc1a" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "ab4cfee554e501f497bce0856788d43cf2eb93d7" },
|
||||
"mini.nvim": { "branch": "main", "commit": "88f18a7d018d8bb4d32f6be4c712134a10e826d3" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "1e1900b0769324a9675ef85b38f99cca29e203b3" },
|
||||
"nvim-hlslens": { "branch": "main", "commit": "e22f8448b571b56d6140427e27e02406bcf4e059" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "185b2af444b27d6541c02d662b5b68190e5cf0c4" },
|
||||
"nvim-scrollbar": { "branch": "main", "commit": "6994eb9f73d5fdc36ee2c8717940e8c853e51a49" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "f8aaf5ce4e27cd20de917946b2ae5c968a2c2858" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||
"refactoring.nvim": { "branch": "master", "commit": "5268cc6add06ba8862492063341a568d18d65fb6" },
|
||||
"refactoring.nvim": { "branch": "master", "commit": "36bd14ddd7ebf0546c15e6088e8bc93f8a98787d" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||
|
|
|
@ -26,6 +26,7 @@ return {
|
|||
-- build = "make tiktoken", -- Only on MacOS or Linux
|
||||
opts = {
|
||||
-- See Configuration section for options
|
||||
model = 'claude-3.5-sonnet',
|
||||
},
|
||||
-- See Commands section for default commands if you want to lazy load on them
|
||||
},
|
||||
|
|
|
@ -1,235 +0,0 @@
|
|||
return {
|
||||
'sindrets/diffview.nvim',
|
||||
config = function()
|
||||
-- Optional: Any additional configuration you want for Diffview
|
||||
local actions = require 'diffview.actions'
|
||||
|
||||
require('diffview').setup {
|
||||
diff_binaries = false, -- Show diffs for binaries
|
||||
enhanced_diff_hl = false, -- See |diffview-config-enhanced_diff_hl|
|
||||
git_cmd = { 'git' }, -- The git executable followed by default args.
|
||||
hg_cmd = { 'hg' }, -- The hg executable followed by default args.
|
||||
use_icons = true, -- Requires nvim-web-devicons
|
||||
show_help_hints = true, -- Show hints for how to open the help panel
|
||||
watch_index = true, -- Update views and index buffers when the git index changes.
|
||||
icons = { -- Only applies when use_icons is true.
|
||||
folder_closed = '',
|
||||
folder_open = '',
|
||||
},
|
||||
signs = {
|
||||
fold_closed = '',
|
||||
fold_open = '',
|
||||
done = '✓',
|
||||
},
|
||||
view = {
|
||||
-- Configure the layout and behavior of different types of views.
|
||||
-- Available layouts:
|
||||
-- 'diff1_plain'
|
||||
-- |'diff2_horizontal'
|
||||
-- |'diff2_vertical'
|
||||
-- |'diff3_horizontal'
|
||||
-- |'diff3_vertical'
|
||||
-- |'diff3_mixed'
|
||||
-- |'diff4_mixed'
|
||||
-- For more info, see |diffview-config-view.x.layout|.
|
||||
default = {
|
||||
-- Config for changed files, and staged files in diff views.
|
||||
layout = 'diff2_horizontal',
|
||||
disable_diagnostics = false, -- Temporarily disable diagnostics for diff buffers while in the view.
|
||||
winbar_info = false, -- See |diffview-config-view.x.winbar_info|
|
||||
},
|
||||
merge_tool = {
|
||||
-- Config for conflicted files in diff views during a merge or rebase.
|
||||
layout = 'diff3_horizontal',
|
||||
disable_diagnostics = true, -- Temporarily disable diagnostics for diff buffers while in the view.
|
||||
winbar_info = true, -- See |diffview-config-view.x.winbar_info|
|
||||
},
|
||||
file_history = {
|
||||
-- Config for changed files in file history views.
|
||||
layout = 'diff2_horizontal',
|
||||
disable_diagnostics = false, -- Temporarily disable diagnostics for diff buffers while in the view.
|
||||
winbar_info = false, -- See |diffview-config-view.x.winbar_info|
|
||||
},
|
||||
},
|
||||
file_panel = {
|
||||
listing_style = 'tree', -- One of 'list' or 'tree'
|
||||
tree_options = { -- Only applies when listing_style is 'tree'
|
||||
flatten_dirs = true, -- Flatten dirs that only contain one single dir
|
||||
folder_statuses = 'only_folded', -- One of 'never', 'only_folded' or 'always'.
|
||||
},
|
||||
win_config = { -- See |diffview-config-win_config|
|
||||
position = 'left',
|
||||
width = 35,
|
||||
win_opts = {},
|
||||
},
|
||||
},
|
||||
file_history_panel = {
|
||||
log_options = { -- See |diffview-config-log_options|
|
||||
git = {
|
||||
single_file = {
|
||||
diff_merges = 'combined',
|
||||
},
|
||||
multi_file = {
|
||||
diff_merges = 'first-parent',
|
||||
},
|
||||
},
|
||||
hg = {
|
||||
single_file = {},
|
||||
multi_file = {},
|
||||
},
|
||||
},
|
||||
win_config = { -- See |diffview-config-win_config|
|
||||
position = 'bottom',
|
||||
height = 16,
|
||||
win_opts = {},
|
||||
},
|
||||
},
|
||||
commit_log_panel = {
|
||||
win_config = {}, -- See |diffview-config-win_config|
|
||||
},
|
||||
default_args = { -- Default args prepended to the arg-list for the listed commands
|
||||
DiffviewOpen = {},
|
||||
DiffviewFileHistory = {},
|
||||
},
|
||||
hooks = {}, -- See |diffview-config-hooks|
|
||||
keymaps = {
|
||||
disable_defaults = false, -- Disable the default keymaps
|
||||
view = {
|
||||
-- The `view` bindings are active in the diff buffers, only when the current
|
||||
-- tabpage is a Diffview.
|
||||
{ 'n', '<tab>', actions.select_next_entry, { desc = 'Open the diff for the next file' } },
|
||||
{ 'n', '<s-tab>', actions.select_prev_entry, { desc = 'Open the diff for the previous file' } },
|
||||
{ 'n', '[F', actions.select_first_entry, { desc = 'Open the diff for the first file' } },
|
||||
{ 'n', ']F', actions.select_last_entry, { desc = 'Open the diff for the last file' } },
|
||||
{ 'n', 'gf', actions.goto_file_edit, { desc = 'Open the file in the previous tabpage' } },
|
||||
{ 'n', '<C-w><C-f>', actions.goto_file_split, { desc = 'Open the file in a new split' } },
|
||||
{ 'n', '<C-w>gf', actions.goto_file_tab, { desc = 'Open the file in a new tabpage' } },
|
||||
{ 'n', '<leader>e', actions.focus_files, { desc = 'Bring focus to the file panel' } },
|
||||
{ 'n', '<leader>b', actions.toggle_files, { desc = 'Toggle the file panel.' } },
|
||||
{ 'n', 'g<C-x>', actions.cycle_layout, { desc = 'Cycle through available layouts.' } },
|
||||
{ 'n', '[x', actions.prev_conflict, { desc = 'In the merge-tool: jump to the previous conflict' } },
|
||||
{ 'n', ']x', actions.next_conflict, { desc = 'In the merge-tool: jump to the next conflict' } },
|
||||
{ 'n', '<leader>co', actions.conflict_choose 'ours', { desc = 'Choose the OURS version of a conflict' } },
|
||||
{ 'n', '<leader>ct', actions.conflict_choose 'theirs', { desc = 'Choose the THEIRS version of a conflict' } },
|
||||
{ 'n', '<leader>cb', actions.conflict_choose 'base', { desc = 'Choose the BASE version of a conflict' } },
|
||||
{ 'n', '<leader>ca', actions.conflict_choose 'all', { desc = 'Choose all the versions of a conflict' } },
|
||||
{ 'n', 'dx', actions.conflict_choose 'none', { desc = 'Delete the conflict region' } },
|
||||
{ 'n', '<leader>cO', actions.conflict_choose_all 'ours', { desc = 'Choose the OURS version of a conflict for the whole file' } },
|
||||
{ 'n', '<leader>cT', actions.conflict_choose_all 'theirs', { desc = 'Choose the THEIRS version of a conflict for the whole file' } },
|
||||
{ 'n', '<leader>cB', actions.conflict_choose_all 'base', { desc = 'Choose the BASE version of a conflict for the whole file' } },
|
||||
{ 'n', '<leader>cA', actions.conflict_choose_all 'all', { desc = 'Choose all the versions of a conflict for the whole file' } },
|
||||
{ 'n', 'dX', actions.conflict_choose_all 'none', { desc = 'Delete the conflict region for the whole file' } },
|
||||
},
|
||||
diff1 = {
|
||||
-- Mappings in single window diff layouts
|
||||
{ 'n', 'g?', actions.help { 'view', 'diff1' }, { desc = 'Open the help panel' } },
|
||||
},
|
||||
diff2 = {
|
||||
-- Mappings in 2-way diff layouts
|
||||
{ 'n', 'g?', actions.help { 'view', 'diff2' }, { desc = 'Open the help panel' } },
|
||||
},
|
||||
diff3 = {
|
||||
-- Mappings in 3-way diff layouts
|
||||
{ { 'n', 'x' }, '2do', actions.diffget 'ours', { desc = 'Obtain the diff hunk from the OURS version of the file' } },
|
||||
{ { 'n', 'x' }, '3do', actions.diffget 'theirs', { desc = 'Obtain the diff hunk from the THEIRS version of the file' } },
|
||||
{ 'n', 'g?', actions.help { 'view', 'diff3' }, { desc = 'Open the help panel' } },
|
||||
},
|
||||
diff4 = {
|
||||
-- Mappings in 4-way diff layouts
|
||||
{ { 'n', 'x' }, '1do', actions.diffget 'base', { desc = 'Obtain the diff hunk from the BASE version of the file' } },
|
||||
{ { 'n', 'x' }, '2do', actions.diffget 'ours', { desc = 'Obtain the diff hunk from the OURS version of the file' } },
|
||||
{ { 'n', 'x' }, '3do', actions.diffget 'theirs', { desc = 'Obtain the diff hunk from the THEIRS version of the file' } },
|
||||
{ 'n', 'g?', actions.help { 'view', 'diff4' }, { desc = 'Open the help panel' } },
|
||||
},
|
||||
file_panel = {
|
||||
{ 'n', 'j', actions.next_entry, { desc = 'Bring the cursor to the next file entry' } },
|
||||
{ 'n', '<down>', actions.next_entry, { desc = 'Bring the cursor to the next file entry' } },
|
||||
{ 'n', 'k', actions.prev_entry, { desc = 'Bring the cursor to the previous file entry' } },
|
||||
{ 'n', '<up>', actions.prev_entry, { desc = 'Bring the cursor to the previous file entry' } },
|
||||
{ 'n', '<cr>', actions.select_entry, { desc = 'Open the diff for the selected entry' } },
|
||||
{ 'n', 'o', actions.select_entry, { desc = 'Open the diff for the selected entry' } },
|
||||
{ 'n', 'l', actions.select_entry, { desc = 'Open the diff for the selected entry' } },
|
||||
{ 'n', '<2-LeftMouse>', actions.select_entry, { desc = 'Open the diff for the selected entry' } },
|
||||
{ 'n', '-', actions.toggle_stage_entry, { desc = 'Stage / unstage the selected entry' } },
|
||||
{ 'n', 's', actions.toggle_stage_entry, { desc = 'Stage / unstage the selected entry' } },
|
||||
{ 'n', 'S', actions.stage_all, { desc = 'Stage all entries' } },
|
||||
{ 'n', 'U', actions.unstage_all, { desc = 'Unstage all entries' } },
|
||||
{ 'n', 'X', actions.restore_entry, { desc = 'Restore entry to the state on the left side' } },
|
||||
{ 'n', 'L', actions.open_commit_log, { desc = 'Open the commit log panel' } },
|
||||
{ 'n', 'zo', actions.open_fold, { desc = 'Expand fold' } },
|
||||
{ 'n', 'h', actions.close_fold, { desc = 'Collapse fold' } },
|
||||
{ 'n', 'zc', actions.close_fold, { desc = 'Collapse fold' } },
|
||||
{ 'n', 'za', actions.toggle_fold, { desc = 'Toggle fold' } },
|
||||
{ 'n', 'zR', actions.open_all_folds, { desc = 'Expand all folds' } },
|
||||
{ 'n', 'zM', actions.close_all_folds, { desc = 'Collapse all folds' } },
|
||||
{ 'n', '<c-b>', actions.scroll_view(-0.25), { desc = 'Scroll the view up' } },
|
||||
{ 'n', '<c-f>', actions.scroll_view(0.25), { desc = 'Scroll the view down' } },
|
||||
{ 'n', '<tab>', actions.select_next_entry, { desc = 'Open the diff for the next file' } },
|
||||
{ 'n', '<s-tab>', actions.select_prev_entry, { desc = 'Open the diff for the previous file' } },
|
||||
{ 'n', '[F', actions.select_first_entry, { desc = 'Open the diff for the first file' } },
|
||||
{ 'n', ']F', actions.select_last_entry, { desc = 'Open the diff for the last file' } },
|
||||
{ 'n', 'gf', actions.goto_file_edit, { desc = 'Open the file in the previous tabpage' } },
|
||||
{ 'n', '<C-w><C-f>', actions.goto_file_split, { desc = 'Open the file in a new split' } },
|
||||
{ 'n', '<C-w>gf', actions.goto_file_tab, { desc = 'Open the file in a new tabpage' } },
|
||||
{ 'n', 'i', actions.listing_style, { desc = "Toggle between 'list' and 'tree' views" } },
|
||||
{ 'n', 'f', actions.toggle_flatten_dirs, { desc = 'Flatten empty subdirectories in tree listing style' } },
|
||||
{ 'n', 'R', actions.refresh_files, { desc = 'Update stats and entries in the file list' } },
|
||||
{ 'n', '<leader>e', actions.focus_files, { desc = 'Bring focus to the file panel' } },
|
||||
{ 'n', '<leader>b', actions.toggle_files, { desc = 'Toggle the file panel' } },
|
||||
{ 'n', 'g<C-x>', actions.cycle_layout, { desc = 'Cycle available layouts' } },
|
||||
{ 'n', '[x', actions.prev_conflict, { desc = 'Go to the previous conflict' } },
|
||||
{ 'n', ']x', actions.next_conflict, { desc = 'Go to the next conflict' } },
|
||||
{ 'n', 'g?', actions.help 'file_panel', { desc = 'Open the help panel' } },
|
||||
{ 'n', '<leader>cO', actions.conflict_choose_all 'ours', { desc = 'Choose the OURS version of a conflict for the whole file' } },
|
||||
{ 'n', '<leader>cT', actions.conflict_choose_all 'theirs', { desc = 'Choose the THEIRS version of a conflict for the whole file' } },
|
||||
{ 'n', '<leader>cB', actions.conflict_choose_all 'base', { desc = 'Choose the BASE version of a conflict for the whole file' } },
|
||||
{ 'n', '<leader>cA', actions.conflict_choose_all 'all', { desc = 'Choose all the versions of a conflict for the whole file' } },
|
||||
{ 'n', 'dX', actions.conflict_choose_all 'none', { desc = 'Delete the conflict region for the whole file' } },
|
||||
},
|
||||
file_history_panel = {
|
||||
{ 'n', 'g!', actions.options, { desc = 'Open the option panel' } },
|
||||
{ 'n', '<C-A-d>', actions.open_in_diffview, { desc = 'Open the entry under the cursor in a diffview' } },
|
||||
{ 'n', 'y', actions.copy_hash, { desc = 'Copy the commit hash of the entry under the cursor' } },
|
||||
{ 'n', 'L', actions.open_commit_log, { desc = 'Show commit details' } },
|
||||
{ 'n', 'X', actions.restore_entry, { desc = 'Restore file to the state from the selected entry' } },
|
||||
{ 'n', 'zo', actions.open_fold, { desc = 'Expand fold' } },
|
||||
{ 'n', 'zc', actions.close_fold, { desc = 'Collapse fold' } },
|
||||
{ 'n', 'h', actions.close_fold, { desc = 'Collapse fold' } },
|
||||
{ 'n', 'za', actions.toggle_fold, { desc = 'Toggle fold' } },
|
||||
{ 'n', 'zR', actions.open_all_folds, { desc = 'Expand all folds' } },
|
||||
{ 'n', 'zM', actions.close_all_folds, { desc = 'Collapse all folds' } },
|
||||
{ 'n', 'j', actions.next_entry, { desc = 'Bring the cursor to the next file entry' } },
|
||||
{ 'n', '<down>', actions.next_entry, { desc = 'Bring the cursor to the next file entry' } },
|
||||
{ 'n', 'k', actions.prev_entry, { desc = 'Bring the cursor to the previous file entry' } },
|
||||
{ 'n', '<up>', actions.prev_entry, { desc = 'Bring the cursor to the previous file entry' } },
|
||||
{ 'n', '<cr>', actions.select_entry, { desc = 'Open the diff for the selected entry' } },
|
||||
{ 'n', 'o', actions.select_entry, { desc = 'Open the diff for the selected entry' } },
|
||||
{ 'n', 'l', actions.select_entry, { desc = 'Open the diff for the selected entry' } },
|
||||
{ 'n', '<2-LeftMouse>', actions.select_entry, { desc = 'Open the diff for the selected entry' } },
|
||||
{ 'n', '<c-b>', actions.scroll_view(-0.25), { desc = 'Scroll the view up' } },
|
||||
{ 'n', '<c-f>', actions.scroll_view(0.25), { desc = 'Scroll the view down' } },
|
||||
{ 'n', '<tab>', actions.select_next_entry, { desc = 'Open the diff for the next file' } },
|
||||
{ 'n', '<s-tab>', actions.select_prev_entry, { desc = 'Open the diff for the previous file' } },
|
||||
{ 'n', '[F', actions.select_first_entry, { desc = 'Open the diff for the first file' } },
|
||||
{ 'n', ']F', actions.select_last_entry, { desc = 'Open the diff for the last file' } },
|
||||
{ 'n', 'gf', actions.goto_file_edit, { desc = 'Open the file in the previous tabpage' } },
|
||||
{ 'n', '<C-w><C-f>', actions.goto_file_split, { desc = 'Open the file in a new split' } },
|
||||
{ 'n', '<C-w>gf', actions.goto_file_tab, { desc = 'Open the file in a new tabpage' } },
|
||||
{ 'n', '<leader>e', actions.focus_files, { desc = 'Bring focus to the file panel' } },
|
||||
{ 'n', '<leader>b', actions.toggle_files, { desc = 'Toggle the file panel' } },
|
||||
{ 'n', 'g<C-x>', actions.cycle_layout, { desc = 'Cycle available layouts' } },
|
||||
{ 'n', 'g?', actions.help 'file_history_panel', { desc = 'Open the help panel' } },
|
||||
},
|
||||
option_panel = {
|
||||
{ 'n', '<tab>', actions.select_entry, { desc = 'Change the current option' } },
|
||||
{ 'n', 'q', actions.close, { desc = 'Close the panel' } },
|
||||
{ 'n', 'g?', actions.help 'option_panel', { desc = 'Open the help panel' } },
|
||||
},
|
||||
help_panel = {
|
||||
{ 'n', 'q', actions.close, { desc = 'Close help menu' } },
|
||||
{ 'n', '<esc>', actions.close, { desc = 'Close help menu' } },
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
return {
|
||||
'wfxr/minimap.vim',
|
||||
build = 'cargo install --locked code-minimap',
|
||||
-- lazy = false,
|
||||
enable = false,
|
||||
cmd = { 'Minimap', 'MinimapClose', 'MinimapToggle', 'MinimapRefresh', 'MinimapUpdateHighlight' },
|
||||
init = function()
|
||||
vim.cmd 'let g:minimap_width = 10'
|
||||
vim.cmd 'let g:minimap_auto_start = 1'
|
||||
vim.cmd 'let g:minimap_auto_start_win_enter = 1'
|
||||
end,
|
||||
}
|
|
@ -0,0 +1,159 @@
|
|||
return {
|
||||
'petertriho/nvim-scrollbar',
|
||||
dependencies = {
|
||||
'kevinhwang91/nvim-hlslens',
|
||||
'lewis6991/gitsigns.nvim',
|
||||
},
|
||||
|
||||
config = function()
|
||||
local colors = require('tokyonight.colors').setup()
|
||||
require('scrollbar').setup {
|
||||
show = true,
|
||||
show_in_active_only = false,
|
||||
set_highlights = true,
|
||||
folds = 1000, -- handle folds, set to number to disable folds if no. of lines in buffer exceeds this
|
||||
max_lines = false, -- disables if no. of lines in buffer exceeds this
|
||||
hide_if_all_visible = false, -- Hides everything if all lines are visible
|
||||
throttle_ms = 100,
|
||||
handle = {
|
||||
text = ' ',
|
||||
blend = 30, -- Integer between 0 and 100. 0 for fully opaque and 100 to full transparent. Defaults to 30.
|
||||
color = colors.fg_sidebar,
|
||||
color_nr = nil, -- cterm
|
||||
highlight = 'CursorColumn',
|
||||
hide_if_all_visible = true, -- Hides handle if all lines are visible
|
||||
},
|
||||
marks = {
|
||||
Cursor = {
|
||||
text = '•',
|
||||
priority = 0,
|
||||
gui = nil,
|
||||
color = nil,
|
||||
cterm = nil,
|
||||
color_nr = nil, -- cterm
|
||||
highlight = 'Normal',
|
||||
},
|
||||
Search = {
|
||||
text = { '-', '=' },
|
||||
priority = 1,
|
||||
gui = nil,
|
||||
color = colors.orange,
|
||||
cterm = nil,
|
||||
color_nr = nil, -- cterm
|
||||
highlight = 'Search',
|
||||
},
|
||||
Error = {
|
||||
text = { '-', '=' },
|
||||
priority = 2,
|
||||
gui = nil,
|
||||
color = colors.error,
|
||||
cterm = nil,
|
||||
color_nr = nil, -- cterm
|
||||
highlight = 'DiagnosticVirtualTextError',
|
||||
},
|
||||
Warn = {
|
||||
text = { '-', '=' },
|
||||
priority = 3,
|
||||
gui = nil,
|
||||
color = colors.warning,
|
||||
cterm = nil,
|
||||
color_nr = nil, -- cterm
|
||||
highlight = 'DiagnosticVirtualTextWarn',
|
||||
},
|
||||
Info = {
|
||||
text = { '-', '=' },
|
||||
priority = 4,
|
||||
gui = nil,
|
||||
color = colors.info,
|
||||
cterm = nil,
|
||||
color_nr = nil, -- cterm
|
||||
highlight = 'DiagnosticVirtualTextInfo',
|
||||
},
|
||||
Hint = {
|
||||
text = { '-', '=' },
|
||||
priority = 5,
|
||||
gui = nil,
|
||||
color = colors.hint,
|
||||
cterm = nil,
|
||||
color_nr = nil, -- cterm
|
||||
highlight = 'DiagnosticVirtualTextHint',
|
||||
},
|
||||
Misc = {
|
||||
text = { '-', '=' },
|
||||
priority = 6,
|
||||
gui = nil,
|
||||
color = colors.purple,
|
||||
cterm = nil,
|
||||
color_nr = nil, -- cterm
|
||||
highlight = 'Normal',
|
||||
},
|
||||
GitAdd = {
|
||||
text = '┆',
|
||||
priority = 7,
|
||||
gui = nil,
|
||||
color = nil,
|
||||
cterm = nil,
|
||||
color_nr = nil, -- cterm
|
||||
highlight = 'GitSignsAdd',
|
||||
},
|
||||
GitChange = {
|
||||
text = '┆',
|
||||
priority = 7,
|
||||
gui = nil,
|
||||
color = nil,
|
||||
cterm = nil,
|
||||
color_nr = nil, -- cterm
|
||||
highlight = 'GitSignsChange',
|
||||
},
|
||||
GitDelete = {
|
||||
text = '▁',
|
||||
priority = 7,
|
||||
gui = nil,
|
||||
color = nil,
|
||||
cterm = nil,
|
||||
color_nr = nil, -- cterm
|
||||
highlight = 'GitSignsDelete',
|
||||
},
|
||||
},
|
||||
excluded_buftypes = {
|
||||
'terminal',
|
||||
},
|
||||
excluded_filetypes = {
|
||||
'dropbar_menu',
|
||||
'dropbar_menu_fzf',
|
||||
'DressingInput',
|
||||
'cmp_docs',
|
||||
'cmp_menu',
|
||||
'noice',
|
||||
'prompt',
|
||||
'TelescopePrompt',
|
||||
},
|
||||
autocmd = {
|
||||
render = {
|
||||
'BufWinEnter',
|
||||
'TabEnter',
|
||||
'TermEnter',
|
||||
'WinEnter',
|
||||
'CmdwinLeave',
|
||||
'TextChanged',
|
||||
'VimResized',
|
||||
'WinScrolled',
|
||||
},
|
||||
clear = {
|
||||
'BufWinLeave',
|
||||
'TabLeave',
|
||||
'TermLeave',
|
||||
'WinLeave',
|
||||
},
|
||||
},
|
||||
handlers = {
|
||||
cursor = true,
|
||||
diagnostic = true,
|
||||
gitsigns = true, -- Requires gitsigns
|
||||
handle = true,
|
||||
search = true, -- Requires hlslens
|
||||
ale = false, -- Requires ALE
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
return {
|
||||
'nvim-treesitter/nvim-treesitter-context',
|
||||
config = function()
|
||||
require('treesitter-context').setup {
|
||||
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
|
||||
multiwindow = false, -- Enable multiwindow support.
|
||||
max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
|
||||
min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit.
|
||||
line_numbers = true,
|
||||
multiline_threshold = 20, -- Maximum number of lines to show for a single context
|
||||
trim_scope = 'inner', -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
|
||||
mode = 'cursor', -- Line used to calculate context. Choices: 'cursor', 'topline'
|
||||
-- Separator between context and content. Should be a single character string, like '-'.
|
||||
-- When separator is set, the context will only show up when there are at least 2 lines above cursorline.
|
||||
separator = nil,
|
||||
zindex = 20, -- The Z-index of the context window
|
||||
on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching
|
||||
}
|
||||
end,
|
||||
vim.keymap.set('n', '[c', function()
|
||||
require('treesitter-context').go_to_context(vim.v.count1)
|
||||
end, { silent = true, desc = '[C]ontext (upwards)' }),
|
||||
}
|
Loading…
Reference in New Issue