chore: stylua column width 120 -> 140 (#2448)
* chore: stylua column width 120 -> 140
* chore: stylua column width 120 -> 140, tidy
* Revert "chore: stylua column width 120 -> 140, tidy"
This reverts commit 8a0524d6bd.
* chore: stylua column width 120 -> 140, tidy watcher.lua
* chore: stylua column width 120 -> 140, tidy diagnostics.lua
* chore: stylua column width 120 -> 140, tidy git.lua
* chore: stylua column width 120 -> 140, tidy open-file.lua
* chore: stylua column width 120 -> 140, tidy system-open.lua
* chore: stylua column width 120 -> 140, tidy runner.lua
This commit is contained in:
committed by
GitHub
parent
94e572e141
commit
53b0bcaada
@@ -168,9 +168,7 @@ function Builder:_build_folder(node)
|
||||
local link_to = utils.path_relative(node.link_to, core.get_cwd())
|
||||
foldername = foldername .. arrow .. link_to
|
||||
foldername_hl = "NvimTreeSymlinkFolderName"
|
||||
elseif
|
||||
vim.tbl_contains(self.special_files, node.absolute_path) or vim.tbl_contains(self.special_files, node.name)
|
||||
then
|
||||
elseif vim.tbl_contains(self.special_files, node.absolute_path) or vim.tbl_contains(self.special_files, node.name) then
|
||||
foldername_hl = "NvimTreeSpecialFolderName"
|
||||
elseif node.open then
|
||||
foldername_hl = "NvimTreeOpenedFolderName"
|
||||
@@ -278,11 +276,7 @@ function Builder:_get_highlight_override(node, unloaded_bufnr)
|
||||
end
|
||||
|
||||
-- opened file
|
||||
if
|
||||
self.highlight_opened_files
|
||||
and vim.fn.bufloaded(node.absolute_path) > 0
|
||||
and vim.fn.bufnr(node.absolute_path) ~= unloaded_bufnr
|
||||
then
|
||||
if self.highlight_opened_files and vim.fn.bufloaded(node.absolute_path) > 0 and vim.fn.bufnr(node.absolute_path) ~= unloaded_bufnr then
|
||||
if self.highlight_opened_files == "all" or self.highlight_opened_files == "name" then
|
||||
name_hl = "NvimTreeOpenedFile"
|
||||
end
|
||||
@@ -331,16 +325,7 @@ end
|
||||
---@param modified_icon HighlightedString|nil
|
||||
---@param bookmark_icon HighlightedString|nil
|
||||
---@return HighlightedString[]
|
||||
function Builder:_format_line(
|
||||
indent_markers,
|
||||
arrows,
|
||||
icon,
|
||||
name,
|
||||
git_icons,
|
||||
diagnostics_icon,
|
||||
modified_icon,
|
||||
bookmark_icon
|
||||
)
|
||||
function Builder:_format_line(indent_markers, arrows, icon, name, git_icons, diagnostics_icon, modified_icon, bookmark_icon)
|
||||
local added_len = 0
|
||||
local function add_to_end(t1, t2)
|
||||
for _, v in ipairs(t2) do
|
||||
@@ -430,8 +415,7 @@ function Builder:_build_line(node, idx, num_children, unloaded_bufnr)
|
||||
self:_append_highlight(node, diagnostics.get_highlight, icon.hl, name.hl)
|
||||
self:_append_highlight(node, copy_paste.get_highlight, icon.hl, name.hl)
|
||||
|
||||
local line =
|
||||
self:_format_line(indent_markers, arrows, icon, name, git_icons, diagnostics_icon, modified_icon, bookmark_icon)
|
||||
local line = self:_format_line(indent_markers, arrows, icon, name, git_icons, diagnostics_icon, modified_icon, bookmark_icon)
|
||||
self:_insert_line(self:_unwrap_highlighted_strings(line))
|
||||
|
||||
self.index = self.index + 1
|
||||
|
||||
@@ -94,11 +94,7 @@ end
|
||||
local function nil_() end
|
||||
|
||||
local function warn_status(git_status)
|
||||
notify.warn(
|
||||
'Unrecognized git state "'
|
||||
.. git_status
|
||||
.. '". Please open up an issue on https://github.com/nvim-tree/nvim-tree.lua/issues with this message.'
|
||||
)
|
||||
notify.warn(string.format("Unrecognized git state '%s'", git_status))
|
||||
end
|
||||
|
||||
---@param node table
|
||||
|
||||
@@ -30,9 +30,7 @@ local function get_padding_indent_markers(depth, idx, nodes_number, markers, wit
|
||||
for i = 1, depth do
|
||||
local glyph
|
||||
if idx == nodes_number and i == depth then
|
||||
local bottom_width = M.config.indent_width
|
||||
- 2
|
||||
+ (with_arrows and not inline_arrows and has_folder_sibling and 2 or 0)
|
||||
local bottom_width = M.config.indent_width - 2 + (with_arrows and not inline_arrows and has_folder_sibling and 2 or 0)
|
||||
glyph = M.config.indent_markers.icons.corner
|
||||
.. string.rep(M.config.indent_markers.icons.bottom, bottom_width)
|
||||
.. (M.config.indent_width > 1 and " " or "")
|
||||
|
||||
Reference in New Issue
Block a user