Update all dotfiles
This commit is contained in:
@ -196,6 +196,30 @@ require("neo-tree").setup({
|
||||
-- window like netrw would, regardless of window.position
|
||||
-- "disabled", -- netrw left alone, neo-tree does not handle opening dirs
|
||||
use_libuv_file_watcher = false, -- This will use the OS level file watchers to detect changes
|
||||
|
||||
commands = {
|
||||
avante_add_files = function(state)
|
||||
local node = state.tree:get_node()
|
||||
local filepath = node:get_id()
|
||||
local relative_path = require('avante.utils').relative_path(filepath)
|
||||
|
||||
local sidebar = require('avante').get()
|
||||
|
||||
local open = sidebar:is_open()
|
||||
-- ensure avante sidebar is open
|
||||
if not open then
|
||||
require('avante.api').ask()
|
||||
sidebar = require('avante').get()
|
||||
end
|
||||
|
||||
sidebar.file_selector:add_selected_file(relative_path)
|
||||
|
||||
-- remove neo tree buffer
|
||||
if not open then
|
||||
sidebar.file_selector:remove_selected_file('neo-tree filesystem [1]')
|
||||
end
|
||||
end,
|
||||
},
|
||||
-- instead of relying on nvim autocmd events.
|
||||
window = {
|
||||
mappings = {
|
||||
@ -211,6 +235,7 @@ require("neo-tree").setup({
|
||||
["[g"] = "prev_git_modified",
|
||||
["]g"] = "next_git_modified",
|
||||
["o"] = { "show_help", nowait=false, config = { title = "Order by", prefix_key = "o" }},
|
||||
['oa'] = 'avante_add_files',
|
||||
["oc"] = { "order_by_created", nowait = false },
|
||||
["od"] = { "order_by_diagnostics", nowait = false },
|
||||
["og"] = { "order_by_git_status", nowait = false },
|
||||
@ -227,7 +252,6 @@ require("neo-tree").setup({
|
||||
},
|
||||
},
|
||||
|
||||
commands = {} -- Add a custom command or override a global one using the same function name
|
||||
},
|
||||
buffers = {
|
||||
follow_current_file = {
|
||||
|
Reference in New Issue
Block a user