refactor(git): split engine into core subpackage
This commit is contained in:
@@ -5,7 +5,7 @@ end)
|
||||
---@class nvim_tree.api.decorator.UserDecorator
|
||||
local Decorator = require("nvim-tree.api").Decorator
|
||||
|
||||
local repo = require("git.repo")
|
||||
local repo = require("git.core.repo")
|
||||
|
||||
repo.on("refresh", function()
|
||||
require("nvim-tree.api").tree.reload()
|
||||
@@ -49,7 +49,7 @@ function GitDecorator:new()
|
||||
self.highlight_range = "name"
|
||||
end
|
||||
|
||||
local status = require("git.status")
|
||||
local status = require("git.core.status")
|
||||
|
||||
---@param node Node
|
||||
---@return ow.Git.Status.Mark[]?
|
||||
@@ -150,7 +150,7 @@ require("nvim-tree").setup({
|
||||
full_name = true,
|
||||
root_folder_label = function(path)
|
||||
local label = vim.fn.fnamemodify(path, ":~")
|
||||
local r = require("git.repo").resolve(path)
|
||||
local r = require("git.core.repo").resolve(path)
|
||||
local git_head = r and r:head()
|
||||
if git_head then
|
||||
label = label .. (" %s"):format(git_head)
|
||||
|
||||
Reference in New Issue
Block a user