Merge branch 'master' into ollama
This commit is contained in:
commit
a4dc6a3d7f
|
@ -1,54 +1,52 @@
|
|||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "45db5addf8d0a201e1cf247cae4cdce605ad3768" },
|
||||
"LuaSnip": { "branch": "master", "commit": "e808bee352d1a6fcf902ca1a71cee76e60e24071" },
|
||||
"barbar.nvim": { "branch": "master", "commit": "53b5a2f34b68875898f0531032fbf090e3952ad7" },
|
||||
"beacon.nvim": { "branch": "master", "commit": "098ff96c33874339d5e61656f3050dbd587d6bd5" },
|
||||
"cmake-tools.nvim": { "branch": "master", "commit": "4be3c229fe932043fd83ad52fdf0ba9af7297789" },
|
||||
"cmake-tools.nvim": { "branch": "master", "commit": "f1f917b584127b673c25138233cebf1d61a19f35" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||
"conform.nvim": { "branch": "master", "commit": "0ebe875d9c306f5fc829db38492ffff2a70d8e9d" },
|
||||
"conform.nvim": { "branch": "master", "commit": "40d4e98fcc3e6f485f0e8924c63734bc7e305967" },
|
||||
"dashboard-nvim": { "branch": "master", "commit": "fabf5feec96185817c732d47d363f34034212685" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "1ef74b546732f185d0f806860fa5404df7614f28" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "48b52b5cfcf8f88ed0aff8fde573a5cc20b1306d" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "863903631e676b33e8be2acb17512fdc1b80b4fb" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "e7a4442e055ec953311e77791546238d1eaae507" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "1159bdccd8910a0fd0914b24d6c3d186689023d9" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
|
||||
"luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "482350b050bd413931c2cdd4857443c3da7d57cb" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" },
|
||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" },
|
||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||
"mini.nvim": { "branch": "main", "commit": "8413efde2546be4dec9ea424bc6af346a14dffbe" },
|
||||
"neo-tree.nvim": { "branch": "main", "commit": "8c75e8a2949cd6cd35525799200a8d34471ee9eb" },
|
||||
"nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" },
|
||||
"menu": { "branch": "main", "commit": "ea606f6ab2430db0aece8075e62c14132b815ae1" },
|
||||
"mini.nvim": { "branch": "main", "commit": "e52ac74bd4e9c0ce6a182ee551eb099236b5a89d" },
|
||||
"minuet-ai.nvim": { "branch": "main", "commit": "bd5a7ae2bda3a4f57e8a94e3229f41647c77c69e" },
|
||||
"nvim-ansible": { "branch": "main", "commit": "9c3b4a771b8c8d7b4f2171466464d978cb3846f7" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "fd2badc24e675f947162a16c124d395bde80dbd6" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
||||
"nvim-dap": { "branch": "master", "commit": "20a4859ebde1c9bc8e96f8cc11a20667e7fdd516" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "1c351e4e417d4691da12948b6ecf966936a56d28" },
|
||||
"nvim-lint": { "branch": "master", "commit": "debabca63c0905b59ce596a55a8e33eafdf66342" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "bdbc65aadc708ce528efb22bca5f82a7cca6b54d" },
|
||||
"nvim-dap": { "branch": "master", "commit": "7ff6936010b7222fea2caea0f67ed77f1b7c60dd" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "04680101ff79e99b4e33a4386ec27cbd0d360c75" },
|
||||
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
|
||||
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "4770d9a1a77b0cc2b723c646c3dbe43a9133e5db" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "9793801f974bba70e4ac5d7eae6c4f5659993d8e" },
|
||||
"outline.nvim": { "branch": "main", "commit": "3725c652f276b486a20423829af389d84a0c15fe" },
|
||||
"overseer.nvim": { "branch": "master", "commit": "236e60cdac6410dd95ea5cecafdb801a304d6a41" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" },
|
||||
"rustaceanvim": { "branch": "master", "commit": "3fd3e5c187ad7155d8bf1a689fa5b651407ab22e" },
|
||||
"nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "4a9e82d10a3715d0c3845e1d2f66ddfb8b711253" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "45e0d66246f31306d890b91301993fa1623e79f1" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "56f17def81478e406e3a8ec4aa727558e79786f3" },
|
||||
"outline.nvim": { "branch": "main", "commit": "6c44527837ff7ac1cd054dc365a721e881020a2e" },
|
||||
"overseer.nvim": { "branch": "master", "commit": "965f8159408cee5970421ad36c4523333b798502" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||
"rustaceanvim": { "branch": "master", "commit": "29f42cc149f915d771c550b6dfe7c788d856cf04" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "319c01b99b7a8c9ac2066bf0efd4d6ec68fef444" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
|
||||
"toggleterm.nvim": { "branch": "main", "commit": "137d06fb103952a0fb567882bb8527e2f92d327d" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "817bb6ffff1b9ce72cdd45d9fcfa8c9cd1ad3839" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" },
|
||||
"vim-sleuth": { "branch": "master", "commit": "cd9d382e33bb817abe7f10cdc3a606bf1d491d75" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "bfec3d6bc0a9b0b2cb11644642f78c2c3915eef0" }
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "2c85fad417170d4572ead7bf9fdd706057bd73d7" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "254145ffd528b98eb20be894338e2d5c93fa02c2" },
|
||||
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
|
||||
"volt": { "branch": "main", "commit": "43f72b49037c191eb3cfe26ba7a5574b4bfce226" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" }
|
||||
"which-key.nvim": { "branch": "main", "commit": "8badb359f7ab8711e2575ef75dfe6fbbd87e4821" }
|
||||
}
|
||||
|
|
|
@ -54,3 +54,44 @@ vim.api.nvim_create_autocmd('BufEnter', {
|
|||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- Borrowed from nvim-tree wiki recipe:
|
||||
-- https://github.com/nvim-tree/nvim-tree.lua/wiki/Recipes#make-q-and-bd-work-as-if-tree-was-not-visible
|
||||
-- Make :bd and :q behave as usual when tree is visible
|
||||
vim.api.nvim_create_autocmd({ 'BufEnter', 'QuitPre' }, {
|
||||
nested = false,
|
||||
group = vim.api.nvim_create_augroup('gered-bufenter-quitpre-nvim-tree', { clear = true }),
|
||||
callback = function(e)
|
||||
local tree = require('nvim-tree.api').tree
|
||||
|
||||
-- Nothing to do if tree is not opened
|
||||
if not tree.is_visible() then
|
||||
return
|
||||
end
|
||||
|
||||
-- How many focusable windows do we have? (excluding e.g. incline status window)
|
||||
local winCount = 0
|
||||
for _, winId in ipairs(vim.api.nvim_list_wins()) do
|
||||
if vim.api.nvim_win_get_config(winId).focusable then
|
||||
winCount = winCount + 1
|
||||
end
|
||||
end
|
||||
|
||||
-- We want to quit and only one window besides tree is left
|
||||
if e.event == 'QuitPre' and winCount == 2 then
|
||||
vim.api.nvim_cmd({ cmd = 'qall' }, {})
|
||||
end
|
||||
|
||||
-- :bd was probably issued an only tree window is left
|
||||
-- Behave as if tree was closed (see `:h :bd`)
|
||||
if e.event == 'BufEnter' and winCount == 1 then
|
||||
-- Required to avoid "Vim:E444: Cannot close last window"
|
||||
vim.defer_fn(function()
|
||||
-- close nvim-tree: will go to the last buffer used before closing
|
||||
tree.toggle { find_file = true, focus = true }
|
||||
-- re-open nivm-tree
|
||||
tree.toggle { find_file = true, focus = false }
|
||||
end, 10)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -24,7 +24,7 @@ return {
|
|||
filetypes = {
|
||||
'help',
|
||||
'dashboard',
|
||||
'neo-tree',
|
||||
'NvimTree',
|
||||
'lazy',
|
||||
'mason',
|
||||
'toggleterm',
|
||||
|
|
|
@ -33,7 +33,7 @@ return {
|
|||
extensions = {
|
||||
'lazy',
|
||||
'mason',
|
||||
'neo-tree',
|
||||
'nvim-tree',
|
||||
'nvim-dap-ui',
|
||||
'toggleterm',
|
||||
},
|
||||
|
|
|
@ -66,7 +66,7 @@ function get_default_menu()
|
|||
|
||||
if helper.in_cmake_project() then
|
||||
table.insert(menu, 1, {
|
||||
name = ' CMake Actions',
|
||||
name = ' CMake Actions',
|
||||
hl = 'ExBlue',
|
||||
items = get_cmake_menu(),
|
||||
rtxt = '<leader>c',
|
||||
|
@ -85,6 +85,117 @@ function get_default_menu()
|
|||
return menu
|
||||
end
|
||||
|
||||
function get_nvim_tree_menu()
|
||||
local nvim_tree = require 'nvim-tree.api'
|
||||
local current_node = nvim_tree.tree.get_node_under_cursor
|
||||
return {
|
||||
{
|
||||
name = ' New file',
|
||||
hl = 'ExBlue',
|
||||
cmd = function()
|
||||
nvim_tree.fs.create(current_node())
|
||||
end,
|
||||
rtxt = 'a',
|
||||
},
|
||||
{
|
||||
name = ' New folder',
|
||||
hl = 'ExBlue',
|
||||
cmd = function()
|
||||
nvim_tree.fs.create(current_node())
|
||||
end,
|
||||
rtxt = 'a',
|
||||
},
|
||||
{
|
||||
name = 'separator',
|
||||
},
|
||||
{
|
||||
name = ' Open',
|
||||
hl = 'ExGreen',
|
||||
cmd = function()
|
||||
nvim_tree.node.open.edit(current_node())
|
||||
end,
|
||||
rtxt = 'o',
|
||||
},
|
||||
{
|
||||
name = ' Open in vertical split',
|
||||
cmd = function()
|
||||
nvim_tree.node.open.vertical(current_node())
|
||||
end,
|
||||
rtxt = '<C-v>',
|
||||
},
|
||||
{
|
||||
name = ' Open in horizontal split',
|
||||
cmd = function()
|
||||
nvim_tree.node.open.horizontal(current_node())
|
||||
end,
|
||||
rtxt = '<C-x>',
|
||||
},
|
||||
{
|
||||
name = 'separator',
|
||||
},
|
||||
{
|
||||
name = ' Cut',
|
||||
cmd = function()
|
||||
nvim_tree.fs.cut(current_node())
|
||||
end,
|
||||
rtxt = 'x',
|
||||
},
|
||||
{
|
||||
name = ' Copy',
|
||||
cmd = function()
|
||||
nvim_tree.fs.copy.node(current_node())
|
||||
end,
|
||||
rtxt = 'c',
|
||||
},
|
||||
{
|
||||
name = ' Paste',
|
||||
cmd = function()
|
||||
nvim_tree.fs.paste(current_node())
|
||||
end,
|
||||
rtxt = 'p',
|
||||
},
|
||||
{
|
||||
name = 'Copy absolute path',
|
||||
cmd = function()
|
||||
nvim_tree.fs.copy.absolute_path(current_node())
|
||||
end,
|
||||
rtxt = 'gy',
|
||||
},
|
||||
{
|
||||
name = 'Copy relative path',
|
||||
cmd = function()
|
||||
nvim_tree.fs.copy.relative_path(current_node())
|
||||
end,
|
||||
rtxt = 'Y',
|
||||
},
|
||||
{
|
||||
name = 'Copy filename',
|
||||
cmd = function()
|
||||
nvim_tree.fs.copy.filename(current_node())
|
||||
end,
|
||||
rtxt = 'y',
|
||||
},
|
||||
{
|
||||
name = 'separator',
|
||||
},
|
||||
{
|
||||
name = ' Rename',
|
||||
cmd = function()
|
||||
nvim_tree.fs.rename(current_node())
|
||||
end,
|
||||
rtxt = 'r',
|
||||
},
|
||||
{
|
||||
name = ' Delete',
|
||||
hl = 'ExRed',
|
||||
cmd = function()
|
||||
nvim_tree.fs.remove(current_node())
|
||||
end,
|
||||
rtxt = 'd',
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
function get_lsp_menu()
|
||||
return {
|
||||
{
|
||||
|
@ -348,6 +459,32 @@ function get_git_menu()
|
|||
}
|
||||
end
|
||||
|
||||
local quit_only_ft = {
|
||||
'help',
|
||||
'Outline',
|
||||
'trouble',
|
||||
'toggleterm',
|
||||
'man',
|
||||
}
|
||||
|
||||
function add_close_quit_menuitem(tbl)
|
||||
if table.getn(tbl) > 0 then
|
||||
table.insert(tbl, { name = 'separator' })
|
||||
end
|
||||
if not helper.contains(quit_only_ft, vim.bo.ft) then
|
||||
table.insert(tbl, {
|
||||
name = ' Close Buffer',
|
||||
cmd = 'BufferClose',
|
||||
rtxt = '<leader>bd',
|
||||
})
|
||||
end
|
||||
table.insert(tbl, {
|
||||
name = ' Quit Window',
|
||||
cmd = 'q',
|
||||
rtxt = 'q',
|
||||
})
|
||||
end
|
||||
|
||||
return {
|
||||
{
|
||||
'nvchad/volt',
|
||||
|
@ -355,14 +492,27 @@ return {
|
|||
'nvchad/menu',
|
||||
config = function()
|
||||
local ignore_ft = {
|
||||
'help',
|
||||
'Outline',
|
||||
'trouble',
|
||||
'dapui_scopes',
|
||||
'dapui_breakpoints',
|
||||
'dapui_stacks',
|
||||
'dapui_watches',
|
||||
'dap-repl',
|
||||
'dapui_console',
|
||||
}
|
||||
vim.keymap.set('n', '<RightMouse>', function()
|
||||
if not helper.contains(ignore_ft, vim.bo.ft) then
|
||||
vim.cmd.exec '"normal! \\<RightMouse>"'
|
||||
require('menu').open(get_default_menu 'n', { mouse = true })
|
||||
local menu
|
||||
if vim.bo.ft == 'NvimTree' then
|
||||
menu = get_nvim_tree_menu()
|
||||
elseif helper.contains(quit_only_ft, vim.bo.ft) then
|
||||
menu = {}
|
||||
add_close_quit_menuitem(menu)
|
||||
else
|
||||
menu = get_default_menu()
|
||||
add_close_quit_menuitem(menu)
|
||||
end
|
||||
require('menu').open(menu, { mouse = true })
|
||||
end
|
||||
end, {})
|
||||
end,
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
return {
|
||||
{ -- Neo-tree is a Neovim plugin to browse the file system
|
||||
'nvim-neo-tree/neo-tree.nvim',
|
||||
version = '*',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
'MunifTanjim/nui.nvim',
|
||||
},
|
||||
cmd = 'Neotree',
|
||||
keys = {
|
||||
{ '\\', '<Cmd>Neotree action=focus source=filesystem position=left reveal_force_cwd=false<CR>', desc = 'NeoTree left-side', silent = true },
|
||||
{ '|', '<Cmd>Neotree action=focus source=filesystem position=float reveal_force_cwd=false<CR>', desc = 'NeoTree float', silent = true },
|
||||
},
|
||||
opts = {
|
||||
enable_git_status = true,
|
||||
filesystem = {
|
||||
use_libuv_file_watcher = true,
|
||||
window = {
|
||||
mappings = {
|
||||
['\\'] = 'close_window',
|
||||
['|'] = 'close_window',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- vim: ts=2 sts=2 sw=2 et
|
41
nvim/lua/plugins/nvim-tree.lua
Normal file
41
nvim/lua/plugins/nvim-tree.lua
Normal file
|
@ -0,0 +1,41 @@
|
|||
return {
|
||||
{
|
||||
'nvim-tree/nvim-tree.lua',
|
||||
version = '*',
|
||||
lazy = false,
|
||||
dependencies = {
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
},
|
||||
config = function()
|
||||
require('nvim-tree').setup {
|
||||
renderer = {
|
||||
highlight_git = 'all',
|
||||
highlight_diagnostics = 'icon',
|
||||
highlight_opened_files = 'all',
|
||||
highlight_modified = 'all',
|
||||
special_files = {},
|
||||
icons = {
|
||||
git_placement = 'signcolumn',
|
||||
},
|
||||
},
|
||||
git = {
|
||||
enable = true,
|
||||
show_on_dirs = true,
|
||||
show_on_open_dirs = true,
|
||||
timeout = 400,
|
||||
},
|
||||
filesystem_watchers = {
|
||||
enable = true,
|
||||
debounce_delay = 50,
|
||||
},
|
||||
filters = {
|
||||
enable = true,
|
||||
git_ignored = true,
|
||||
dotfiles = true,
|
||||
},
|
||||
}
|
||||
|
||||
vim.api.nvim_set_keymap('n', '\\', '<Cmd>NvimTreeToggle<CR>', { silent = true, noremap = true })
|
||||
end,
|
||||
},
|
||||
}
|
Loading…
Reference in a new issue