chore: add stylua to format the codebase, and run on CI (#1055)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
local utils = require("nvim-tree.utils")
|
||||
local utils = require "nvim-tree.utils"
|
||||
|
||||
local M = {}
|
||||
|
||||
@@ -6,16 +6,16 @@ local M = {}
|
||||
---Safely handles the node representing the current directory
|
||||
---(the topmost node in the nvim-tree window)
|
||||
local function get_node_path(node)
|
||||
if node.name == ".." then
|
||||
return utils.path_remove_trailing(TreeExplorer.cwd)
|
||||
else
|
||||
return node.absolute_path
|
||||
end
|
||||
if node.name == ".." then
|
||||
return utils.path_remove_trailing(TreeExplorer.cwd)
|
||||
else
|
||||
return node.absolute_path
|
||||
end
|
||||
end
|
||||
|
||||
function M.run_file_command(node)
|
||||
local node_path = get_node_path(node)
|
||||
vim.api.nvim_input(": " .. node_path .. "<Home>")
|
||||
local node_path = get_node_path(node)
|
||||
vim.api.nvim_input(": " .. node_path .. "<Home>")
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
Reference in New Issue
Block a user