diff --git a/runtime/autoload/tree/util.vim b/runtime/autoload/tree/util.vim index c3fc0b0..a56ebdd 100644 --- a/runtime/autoload/tree/util.vim +++ b/runtime/autoload/tree/util.vim @@ -16,11 +16,6 @@ function! tree#util#execute_path(command, path) abort endtry endfunction -function! tree#util#call_tree(command, args) abort - let [paths, context] = v:lua.__parse_options(a:args) - call v:lua.start(paths, context) -endfunction - function! tree#util#cd(path) abort if exists('*chdir') call chdir(a:path) diff --git a/runtime/lua/tree.lua b/runtime/lua/tree.lua index 48fb171..31907f0 100644 --- a/runtime/lua/tree.lua +++ b/runtime/lua/tree.lua @@ -191,6 +191,10 @@ function M.string(expr) return vim.fn.string(expr) end end +function M.call_tree(command, args) + local paths, context = __parse_options(args) + start(paths, context) +end function M.print_error(s) api.nvim_command(string.format("echohl Error | echomsg '[tree] %s' | echohl None", M.string(s))) end @@ -246,7 +250,7 @@ function __parse_options(cmdline) end end - return {args, options} + return args, options end function __expand(path) if path:find('^~') then diff --git a/runtime/plugin/tree.vim b/runtime/plugin/tree.vim index 02c523a..2f3dcb4 100644 --- a/runtime/plugin/tree.vim +++ b/runtime/plugin/tree.vim @@ -11,4 +11,4 @@ let g:loaded_tree = 1 command! -nargs=* -range -bar -complete=customlist,v:lua.complete \ Tree - \ call tree#util#call_tree('Tree', ) + \ call luaeval('require("tree").call_tree("Tree", _A)', ) diff --git a/src/app/dev.vim b/src/app/dev.vim index 3e6a504..c715ebc 100644 --- a/src/app/dev.vim +++ b/src/app/dev.vim @@ -16,7 +16,7 @@ local tree = require 'tree' tree.custom_option('_', {root_marker='[in]:', }) tree.custom_column('filename', { root_marker_highlight='Ignore', - max_width=40, + max_width=60, }) tree.custom_column('time', { format="%d-%M-%Y", diff --git a/src/app/transform.py b/src/app/transform.py index ce22c0e..445b574 100644 --- a/src/app/transform.py +++ b/src/app/transform.py @@ -18,12 +18,12 @@ f.write(line) f.write('};\n') - f.write('array icons[] = {\n') + f.write('pair icons[] = {\n') for k, v in val.items(): code = v['code'] color = v['color'] print(k, code, color) - line = f' {{ {{"{code}", "{color}"}} }},\n' + line = f' {{"{code}", "{color}"}},\n' f.write(line) f.write('};\n') else: diff --git a/src/main.cpp b/src/main.cpp index 8af9d7d..215e9e1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -82,7 +82,6 @@ void eventloop(nvim::Nvim &nvim) { break; case 2: { - Object methodName; // [type(2), method, params] msgpack::type::tuple msg; obj.convert(msg);