update readme
This commit is contained in:
14
README.md
14
README.md
@@ -2,18 +2,22 @@
|
|||||||
|
|
||||||
## Notice
|
## 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 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.
|
- 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] 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] 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
|
- [ ] add / delete file in directory
|
||||||
- [ ] quickly find file in the directory structure
|
- [x] icons for files
|
||||||
- [ ] syntax highlighting
|
- [ ] syntax highlighting
|
||||||
|
- [ ] quickly find file in the directory structure
|
||||||
- [ ] simple git integration (color of file changing when staged/changed)
|
- [ ] 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)
|
||||||
|
|||||||
@@ -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 ROOT_PATH = string.sub(sys('pwd'), 1, -2) .. '/' -- get rid of \n and add leading '/'
|
||||||
|
|
||||||
local function is_dir(path)
|
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
|
end
|
||||||
|
|
||||||
local function sort_dirs(dirs)
|
local function sort_dirs(dirs)
|
||||||
@@ -148,7 +149,6 @@ local function update_view()
|
|||||||
if not buf then return end
|
if not buf then return end
|
||||||
|
|
||||||
local cursor_pos = api.nvim_win_get_cursor(0)
|
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_option(buf, 'modifiable', true)
|
||||||
api.nvim_buf_set_lines(buf, 0, -1, false, format_tree(Tree))
|
api.nvim_buf_set_lines(buf, 0, -1, false, format_tree(Tree))
|
||||||
api.nvim_buf_set_option(buf, 'modifiable', false)
|
api.nvim_buf_set_option(buf, 'modifiable', false)
|
||||||
|
|||||||
Reference in New Issue
Block a user