diff options
| author | Fasamii <fasami0512@gmail.com> | 2026-02-05 23:36:45 +0100 |
|---|---|---|
| committer | Fasamii <fasami0512@gmail.com> | 2026-02-05 23:36:45 +0100 |
| commit | b57179a051fe0d78d411880bc059b67c9b9f4b6f (patch) | |
| tree | 26f7543d4520024b8037e4a7d0d22412810af474 /lua/netrw-icons/parse.lua | |
| parent | 0097990b8b8f205ba79163838a93ed811b7229f4 (diff) | |
| download | netrw-icons.nvim-b57179a051fe0d78d411880bc059b67c9b9f4b6f.tar.gz netrw-icons.nvim-b57179a051fe0d78d411880bc059b67c9b9f4b6f.tar.bz2 netrw-icons.nvim-b57179a051fe0d78d411880bc059b67c9b9f4b6f.tar.xz netrw-icons.nvim-b57179a051fe0d78d411880bc059b67c9b9f4b6f.tar.zst | |
whitespace misalignment fix
Diffstat (limited to 'lua/netrw-icons/parse.lua')
| -rw-r--r-- | lua/netrw-icons/parse.lua | 66 |
1 files changed, 1 insertions, 65 deletions
diff --git a/lua/netrw-icons/parse.lua b/lua/netrw-icons/parse.lua index c2f245c..9851f78 100644 --- a/lua/netrw-icons/parse.lua +++ b/lua/netrw-icons/parse.lua @@ -136,75 +136,11 @@ local parse_liststyle_3 = function(line) return { name = link_target or content, icon = tree_end, + lsp = tree_end + #(link_target or content), type = type, } end - - - --- local _, to = string.find(line, "^[|%s]*") --- if to ~= 0 then --- error("to: " .. to); --- end --- local pipelessLine = string.sub(line, to + 1, #line) --- --- if pipelessLine == "" then --- return nil --- end --- --- local _, _, node, link = string.find(pipelessLine, "^(.+)@\t%s*%-%->%s*(.+)") --- if node then --- return { --- dir = curdir, --- icon_col = to, --- name_col = to, --- lsp_col = to + #node, --- node = node, --- extension = vim.fn.fnamemodify(node, ":e"), --- link = link, --- type = M.TYPE_SYMLINK, --- } --- end --- --- local _, _, dir = string.find(pipelessLine, "^(.*)/") --- if dir then --- return { --- dir = curdir, --- icon_col = to, --- name_col = to, --- lsp_col = to + #dir + 1, --- node = dir, --- type = M.TYPE_DIR, --- } --- end --- --- local ext = vim.fn.fnamemodify(pipelessLine, ":e") --- local clean_line = pipelessLine --- if string.sub(ext, -1) == "*" then --- ext = string.sub(ext, 1, -2) --- clean_line = string.sub(pipelessLine, 1, -2) --- end --- --- return { --- current_dir = vim.b.netrw_curdir, --- icon_col = to, --- name_col = to, --- lsp_col = to + #clean_line, --- node = clean_line, --- extension = ext, --- type = M.TYPE_FILE, --- } - --- return { --- name = "name of the file", --- type = "type of the netrw element (dir, file, symlink)" --- path = "full path of the file", --- icon = "character after the | netrw symbol", --- lsp = "two characters after the filename end", --- } --- end - ---@param line string ---@return PWord|nil M.get_node = function(line) |
