diff options
author | Daniil Rozanov <daniilrozzanov@gmail.com> | 2024-04-26 00:50:04 +0300 |
---|---|---|
committer | Daniil Rozanov <daniilrozzanov@gmail.com> | 2024-04-26 00:50:04 +0300 |
commit | 8d05fcaaeb1442c709f148ff934d92900743f051 (patch) | |
tree | a766cc97461968da16baba157acc636388924983 /lua/cmake/fileapi.lua | |
parent | 2470bad1151fc49941c3821f187c6c232c0cec78 (diff) |
feat: command to edit variants
If there is no cmake-variants.yaml file in current directory, command creates it with default variants
Diffstat (limited to 'lua/cmake/fileapi.lua')
-rw-r--r-- | lua/cmake/fileapi.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lua/cmake/fileapi.lua b/lua/cmake/fileapi.lua index 2f61677..47a7459 100644 --- a/lua/cmake/fileapi.lua +++ b/lua/cmake/fileapi.lua @@ -47,6 +47,8 @@ function FileApi.read_reply(path, callback) if object.kind == "codemodel" then utils.read_file(Path:new(reply_dir, object.jsonFile):absolute(), function(codemodel_data) local codemodel = vim.json.decode(codemodel_data) + --FIX: this loop does not read all files if codemodel contains many targets. This is because libuv (or some external settings) forbids to open files + -- in async mode more than some limit number. Seems like the solution is to queue these calls and limit max number for opened files per time for _, target in ipairs(codemodel.configurations[1].targets) do utils.read_file( Path:new(reply_dir, target.jsonFile):absolute(), |