-
Notifications
You must be signed in to change notification settings - Fork 16
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
Possiblity to change cmake_build_executor
split to vertical split
#196
Comments
@i-ilak PR was merged. Feel free to reopen the issue in case if you have any problems. |
@ilyachur Thanks a lot for the quick action! The PR seems not to work for me. I updated this morning to master (and checked the log to make sure your changes are there), but after setting the two new variables vim.g.cmake_build_executor_window_size = 25
vim.g.cmake_build_executor_split_mode = 'vsp' and restarting Also, running
produces the right values, so they are set. |
Hmm, I tested on |
@ilyachur Sure. Im using lazy.nvim. Here is the relevant part of the config. --- init.lua for lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable",
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
return require("lazy").setup(
{
"tpope/vim-dispatch",
--- some more plugins....
{
lazy = true,
event = "BufEnter *.{h, hpp, c, cpp}",
"ilyachur/cmake4vim",
config = function()
require "plugins.cmake4vim"
end
},
{
"SantinoKeupp/lualine-cmake4vim.nvim",
dependencies = "ilyachur/cmake4vim"
},
{
lazy = true,
"SantinoKeupp/telescope-cmake4vim.nvim",
dependencies = "nvim-telescope/telescope.nvim"
}
}) --- plugins.cmake4vim.lua
local number_of_parallel_threads = 14
local cmake_usr_args_dict = {
CONAN = "ON",
CONAN_DISABLE_CHECK_COMPILER = "ON",
}
vim.g.cmake_build_path_pattern = { '/some_path/build_folders/%s/%s/%s',
"fnamemodify( getcwd(), ':t' ), g:cmake_selected_kit, g:cmake_build_type" }
vim.g.cmake_build_executor_window_size = 80
vim.g.cmake_build_executor_split_mode = 'vsp'
vim.g.cmake_variants = {
debug = {
cmake_build_type = 'Debug',
cmake_build_args = string.format('--parallel %s', number_of_parallel_threads),
cmake_usr_args = cmake_usr_args_dict
},
release = {
cmake_build_type = 'Release',
cmake_build_args = string.format('--parallel %s', number_of_parallel_threads),
cmake_usr_args = cmake_usr_args_dict
}
} Also, I noticed something: When I use |
@ilyachur My issue seems to be related to vim.g.cmake_build_executor = "job" the feature works as expected... Sorry for the troubles! |
@i-ilak Oh, good, thank you for sharing. Unfortunately yes, my changes didn't affect dispatch, it works only for others executors. |
@ilyachur No problem of course. Thanks a lot for the help. Will close the issue 🙌 |
Is your feature request related to a problem? Please describe.
I work on a wide, but not very high screen and would like to see the build log not in a horizontal, but vertical split.
Describe the solution you'd like
Currently, there is a setting to change the
mode
, i.e.job, dispatch, etc.
andg:cmake_build_executor_height
to set the height of the executor split.Would be nice to have three variables:
g:cmake_build_executor_split_type
is 'horizontal' or 'vertical' (default can stay 'horizontal'),g:cmake_build_executor_size
to set size (default can stay10
)Describe alternatives you've considered
Not sure if there are alternatives, or if this can already be achieved (I at least didnt find anything in the
README
).The text was updated successfully, but these errors were encountered: