Comments (14)
Okay, feel free to improve it 😄
from cmake-tools.nvim.
I've supported toggleterm
as an executor or runner, just set executor or runner to toggleterm
should be fine.
from cmake-tools.nvim.
Now, toggleterm is supported using the overseer
, have you tried it?
Edit: add configuration
cmake_executor = { -- executor to use
name = "overseer", -- name of the executor
...
default_opts = { -- a list of default and possible values for executors
...
overseer = {
new_task_opts = {
strategy = {
"toggleterm",
direction = "horizontal",
autos_croll = true,
quit_on_exit = "success"
}
}, -- options to pass into the `overseer.new_task` command
...
},
...
},
from cmake-tools.nvim.
Yes, i've tried it but I don't need another plugin (which I won't use) just for getting the output there. I would prefer a direct integration :)
from cmake-tools.nvim.
I understand. You can define a new executor/runner in the plugin. See the source code of overseer, quickfix and terminal to get some idea. It should not be that hard.
from cmake-tools.nvim.
Someday I may expose the definition of executor/runner as API so users can define their owns.
from cmake-tools.nvim.
I understand. You can define a new executor/runner in the plugin. See the source code of overseer, quickfix and terminal to get some idea. It should not be that hard.
I'll try something out in the following days, thanks.
Someday I may expose the definition of executor/runner as API so users can define their owns.
Yeah, that would be cool :)
from cmake-tools.nvim.
Oh damn :D I was just about to push my version. Good job and thanks! I'm currently on it to improve it just a little bit and add some more features :)
from cmake-tools.nvim.
Okay, I've been improving it quite a bit. As e.g. running separate or unified terminals and also tracking the cmd finish accurately. I was a bit surprised about the chan_id
property you've set and how you tracked the end of the cmd in general as on_exit
will get invoked only if you start the terminal with the cmd and otherwise on shell exit. Anyway have a WIP patch here. Still need to fix some edgecases and create a PR then :)
from cmake-tools.nvim.
@Civitasv works great for me except that the command passed to toggleterm seems to contain unwanted parts:
/home/code/test/build/clang-17_mold/Debug/bin/test
exit $?
When the command finishes, exit$?
is then executed by my shell.
Running separate or unified terminals would be really helpful @deeedob
from cmake-tools.nvim.
Yes, the ‘exit $?’ is used to stop the shell process. For reference, I kinda copied them from overseer.nvim.
from cmake-tools.nvim.
Okay, I've been improving it quite a bit. As e.g. running separate or unified terminals and also tracking the cmd finish accurately. I was a bit surprised about the
chan_id
property you've set and how you tracked the end of the cmd in general ason_exit
will get invoked only if you start the terminal with the cmd and otherwise on shell exit. Anyway have a WIP patch here. Still need to fix some edgecases and create a PR then :)
Great to hear!
And currently each cmd is executed using a separate shell process. After the command finish, we use exit $? to stop the shell process, then, the on_exit function will be executed.
from cmake-tools.nvim.
Ahh yeah, I see. I wanted to go with a different approach since I (personally) like it more if the shell stays 'active' e.g. just sending the cmd and then tracking the execution of it.
from cmake-tools.nvim.
I understand, actually our plugin’s terminal implementation(though kinda buggy) follows this idea, it is unified.
from cmake-tools.nvim.
Related Issues (20)
- Unexpected input keys in Neovim due to autocommand HOT 2
- How to get current cmake args in neovim's lua? HOT 3
- Possibility to set a path for `cmake_build_directory` that is not relative to `vim.loop.cwd()` HOT 2
- if executor is terminal, then no double quotes around path to build folder HOT 3
- Command: CMakeStopRunner not working when using toggleterm. HOT 1
- CMakeGenerate does not work HOT 2
- Toggleterm executor opens new tab instead of rewriting existing one
- Error during the lazy initialization, when it is triggered by pressing hotkeys HOT 11
- Wrong cwd when running CTest -> runner doesn't pass arguments when running CTest HOT 3
- Symlink compile_commands.json doesn't appear to work on windows HOT 7
- quick start HOT 4
- on_exit in default terminal.lua HOT 1
- How to choose target when every build/run HOT 18
- targets in buildPresets of CMakePresets.json not honored
- Build Directory Creation will Fail if it Requires a Recursive Create on Windows HOT 4
- Build Directory and Build Targets Not Always Found HOT 11
- Support fish shell HOT 4
- CMakeRun No Output on Windows HOT 5
- Slowdown every time cursor is moved HOT 4
- Whitespace makes CMakeGenerate error HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cmake-tools.nvim.