update readme

This commit is contained in:
kyazdani42
2020-02-07 21:24:08 +01:00
parent bdbebefc6d
commit 04bd042869
2 changed files with 11 additions and 7 deletions

View File

@@ -2,18 +2,22 @@
## Notice
- This plugin is under development, it does not yet have all basic functionnalities required by an explorer.
- I am working on this plugin to learn lua, learn neovim api and create a **simple** file explorer with features i need.
- I really don't like any of the vim trees, they are all too complicated for their purposes and are kind of buggy. I have my shell to do most commands.
- This plugin wont work on windows.
- This plugin does not work on windows.
## Goals / Features
## TODO
- [x] moving around the file structure like any basic tree
- [x] open file in current buffer or in split with FzF like bindings (CR, C-v, C-x)
- [x] icons for files
- [ ] add / delete file in directory
- [ ] quickly find file in the directory structure
- [x] icons for files
- [ ] syntax highlighting
- [ ] quickly find file in the directory structure
- [ ] simple git integration (color of file changing when staged/changed)
- [ ] update automatically on window change
## TOFIX
- [ ] handle permissions properly
- [ ] buffer / window should always stay on the left and never disappear (open a file with only the tree open to reproduce this bug)

View File

@@ -6,7 +6,8 @@ local BUF_NAME = '_LuaTree_'
local ROOT_PATH = string.sub(sys('pwd'), 1, -2) .. '/' -- get rid of \n and add leading '/'
local function is_dir(path)
return string.match(sys('ls -l '..path), 'total [0-9].*') ~= nil
local file_list = sys('ls -l '..path)
return string.match(file_list, 'total [0-9].*') ~= nil
end
local function sort_dirs(dirs)
@@ -148,7 +149,6 @@ local function update_view()
if not buf then return end
local cursor_pos = api.nvim_win_get_cursor(0)
cursor_pos[2] = 4
api.nvim_buf_set_option(buf, 'modifiable', true)
api.nvim_buf_set_lines(buf, 0, -1, false, format_tree(Tree))
api.nvim_buf_set_option(buf, 'modifiable', false)