From 1c3d6072b0a75666d3de5ae01ed3710f25877b20 Mon Sep 17 00:00:00 2001 From: Dmitrii Morozov Date: Wed, 29 Oct 2025 16:47:41 +0100 Subject: Initial --- lua/intellij_to_vscode/converter.lua | 222 ++++++++++++++++++++++++++ lua/intellij_to_vscode/init.lua | 21 +++ lua/intellij_to_vscode/intellij_to_vscode.lua | 11 ++ 3 files changed, 254 insertions(+) create mode 100644 lua/intellij_to_vscode/converter.lua create mode 100644 lua/intellij_to_vscode/init.lua create mode 100644 lua/intellij_to_vscode/intellij_to_vscode.lua (limited to 'lua/intellij_to_vscode') diff --git a/lua/intellij_to_vscode/converter.lua b/lua/intellij_to_vscode/converter.lua new file mode 100644 index 0000000..5d87cd8 --- /dev/null +++ b/lua/intellij_to_vscode/converter.lua @@ -0,0 +1,222 @@ +local M = {} +local uv = vim.loop +local api = vim.api + +local function read_file(path) + local fd = io.open(path, "r") + if not fd then + return nil + end + local content = fd:read("*a") + fd:close() + return content +end + +local function write_file(path, content) + local dir = path:match("(.*/)[^/]+$") + if dir then + vim.fn.mkdir(dir, "p") + end + local fd = io.open(path, "w") + if not fd then + error("Cannot write " .. path) + end + fd:write(content) + fd:close() +end + +-- Minimal XML attribute extractor for a tag like: