chore: add stylua to format the codebase, and run on CI (#1055)

This commit is contained in:
Kiyan
2022-03-06 17:33:30 +01:00
committed by GitHub
parent 76d181d480
commit 0816064a8b
43 changed files with 871 additions and 732 deletions

View File

@@ -1,14 +1,14 @@
local utils = require'nvim-tree.utils'
local utils = require "nvim-tree.utils"
local M = {}
function M.fn(node)
if not node or node.name == ".." then
return require'nvim-tree.actions.change-dir'.fn('..')
return require("nvim-tree.actions.change-dir").fn ".."
else
local newdir = vim.fn.fnamemodify(utils.path_remove_trailing(TreeExplorer.cwd), ':h')
require'nvim-tree.actions.change-dir'.fn(newdir)
return require"nvim-tree.actions.find-file".fn(node.absolute_path)
local newdir = vim.fn.fnamemodify(utils.path_remove_trailing(TreeExplorer.cwd), ":h")
require("nvim-tree.actions.change-dir").fn(newdir)
return require("nvim-tree.actions.find-file").fn(node.absolute_path)
end
end