-
-
Notifications
You must be signed in to change notification settings - Fork 94
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] Custom window layout properties #248
Comments
You can use autocmds to do this: vim.api.nvim_create_autocmd("BufWinEnter", {
pattern = {"\\[dap-repl\\]", "DAP *"},
callback = function(args)
local win = vim.fn.bufwinid(args.buf)
...
end,
}) |
Indeed, but it seems like since the plugin itself does provide / create the ui it is more in line to allow for custom options to be passed in during configuration, also the auto cmd above relies on the string names of the buffers which might change, it does not seem like a too robust solution imo. |
The buffer names are considered public API, so they'd be as stable as any configuration options offered 😄 I'd also like to limit the exposure of the window management API right now, I'm planning to change it quite a bit and don't want to add functionality that will likely change in future, especially any that can already be performed by neovim built-ins |
this doesn't seem to work |
This works for me to set line numbers on DAP windows vim.api.nvim_create_autocmd("BufWinEnter", {
desc = "Set options on DAP windows",
group = vim.api.nvim_create_augroup("set_dap_win_options", { clear = true }),
pattern = { "\\[dap-repl\\]", "DAP *" },
callback = function(args)
local win = vim.fn.bufwinid(args.buf)
vim.schedule(function()
if not vim.api.nvim_win_is_valid(win) then return end
vim.api.nvim_set_option_value("number", true, { win = win })
end)
end,
}) edit: I'm on neovim nightly btw |
Hi, i was wondering if we would be able to override the custom properties passed in in the window layout class, would be great i we could provide custom settings to override these - i am mainly interested in being able to customize things like relnumber and wrap for example. Thanks !
The text was updated successfully, but these errors were encountered: