-
Notifications
You must be signed in to change notification settings - Fork 1
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
Refactor #5
Conversation
- implemented basic functionality for builtin output and dap - legacy loader as class
- added toggle_output - added temporary status function
- fixed issues with dap output
- added legacy loader for init.lua configs
- fixed issues with loaders
- expand_variables is loader's job - cleaned some stuff
- cleaned up loaders
- added next and previous output methods to handler
- changed toggle_output to toggle the current output
- removed unneeded callbacks from Task - removed unneeded util functions
- hide buffers in builtin output
- added checks if handler has been initialized to functions
- database tasks have specific config fields - simplified capability checking function
- task keeps track of latest capability
- loaders take any option, not just path - added TODOs and known issues
- prettier format for task selector - more selector options
- dependencies hide when finished instead of being killed
- builtin output: run in shell - allows pipes - applied format
- formatted markdown with mdformat
- formatted markdown files - updated documentation
- added a non inclusive area for docgen in readmes
- made loader options more flexible - access loader and output optins with self.user_opts - updated readmes with up to date loader and output information
Reply to #2 (comment) Hi @derekthecool. I am really glad that you like the refactored version!! As for the issues:
I'd ask you not to rush too much with making the changes, because, as I said, there are some stuff that I'd like to change a bit (namely loader and output options - I think there should be more parameters to add to the loaders, and outputs should be customizable too). I'd be happy to hear someone else's opionion on this! |
-> do not update any live tasks on load_sources() - builtin loader don't die if json file not found
I'm getting good feelings about this plugin still, I really think this tool helps so much!
Testing today I did find a non cross platform item.
Perhaps we could change to this instead? it'll use your default shell, but should work well for all platforms. I've proved this works on windows, but have yet to check for regressions on Linux. vim.fn.termopen(command, term_options) |
@derekthecool, I agree regarding legacy converter. As for the |
Regarded shell command runner, I've done some more testing. Continuing to use the option I suggested seems to work very well on windows and Linux. I think this plugin would be best off keeping the user terminal settings such as vim.fn.termopen(command, term_options) Let me show you some of my examples using piped commands to see if I understand you correctly. Let me know if I have not understood you correctly with the use of pipes. Linux example using zsh shelljson [
{
"name": "testing shell pipes",
"group": "shell",
"command": "echo $SHELL; ls -la | tail -n3"
}
] output /bin/zsh
drwxr-xr-x 4 derek derek 4096 Apr 29 2021 release
drwxr-xr-x 3 derek derek 4096 Jul 20 15:33 test
-rwxr-xr-x 1 derek derek 3233 Jun 23 15:01 updateFromFtp.sh
[Process exited 0] windows example using PowerShell[
{
"name": "testing shell pipes",
"group": "shell",
"command": "ls | select-object -last 2"
}
] Directory: C:\Users\Derek Lomax\source\repos\DatabaseTesting
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 10/16/2022 5:32 PM 2192 DatabaseTesting.sln
-a--- 10/18/2022 8:37 AM 1226 projector.json
[Process exited 0] I found that use the similar method to vim.fn.termopen("pwsh -c '" .. command .. "'", term_options) Fails to respect my vim option |
I never addressed the More tweaking could be done there later. For now I'm just trying to prove that the core command and not specifying any shell options will work. |
Brief update. I've been using my own edited version of outputs/builtin.lua with this code vim.fn.termopen(command, term_options) I've had a wonderful day using this plugin all day at work. Using the task runner and the dependency task runner has been amazing! Being able to build my project and launch right into debugger, wow wow wow! That is powerful stuff. Some additional questions
|
Well, I have no Idea what I was doing before... I tested it now and pipes really DO work 😄. I was probably missing some stuff with "args" and it didn't work because of that. Anyways, I removed the unnecessary wrapper. As for merging... I'd let it sit for a couple more days. let's say that we merge it on Friday afternoon (speaking from yurop perspective) |
Haha, no worries. I am glad it works for you too. Okay that sounds like a good plan. Very exciting. |
Whole plugin written from scratch.
For general overview see the new README.md