Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Ability to rename the compiled files using regex #44

Open
elMuso opened this issue Jul 21, 2024 · 0 comments
Open

Feature request: Ability to rename the compiled files using regex #44

elMuso opened this issue Jul 21, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@elMuso
Copy link

elMuso commented Jul 21, 2024

I was redirected here from this issue teal-language/tl#763

Request

Some custom lua implementations use filetypes other than .lua, like Defold which has it's own .script extension to differenciate a lua module from a lua game script. However both are just lua scripts.

The Teal lsp works wonderfullly on vscode, you just need to associate .script to .lua. However the cyan build command only outputs .lua files. A rename parameter should be added to tlconfig that accepts an input regex and output string. And replace the regex input with a string output to allow for custom file extensions.

(The following was done on the main tl repository)
Now, this is just an idea. In my use case i only needed to add this code to the tl lua binary below the write out function

local function write_out(tlconfig, result, output_file)
   if string.find(output_file,".script.") then
      output_file = string.gsub(output_file,".lua","")
   end

the binary is in C:\Users{USER}\AppData\Roaming\luarocks\lib\luarocks\rocks-5.4\tl\0.15.3-1\bin

So i'm making this "Feature Request" to start a discussion and at the same time offer a solution for those who can't wait

Feel free to close this

@euclidianAce euclidianAce added the enhancement New feature or request label Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants