This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function start_tsgo() | |
local root_files = { "tsconfig.json", "jsconfig.json", "package.json", ".git" } | |
local paths = vim.fs.find(root_files, { stop = vim.env.HOME }) | |
local root_dir = vim.fs.dirname(paths[1]) | |
if root_dir == nil then | |
-- root directory was not found | |
return | |
end |