add syntax highlighting

This commit is contained in:
kyazdani42
2020-02-14 16:51:33 +01:00
parent 4761e3f2a5
commit 083d2b556d
4 changed files with 90 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
local lib_file = require 'lib/file'
local format = require 'lib/format'.format_tree
local highlight = require 'lib/format'.highlight_buffer
local api = vim.api
local function syslist(v) return api.nvim_call_function('systemlist', { v }) end
@@ -143,6 +144,7 @@ local function update_view(update_cursor)
api.nvim_buf_set_option(buf, 'modifiable', true)
api.nvim_buf_set_lines(buf, 0, -1, false, format(Tree))
highlight(buf, Tree)
api.nvim_buf_set_option(buf, 'modifiable', false)
if update_cursor == true then