Comments (4)
Would you be open to having the user be able to pass in win options to change the blend or to add a border or something?
Short answer is yes.
The longer answer is that I would like to have a pluggable widget system where users can combine windows, buffers and contents as they please.
There's an early prototype up at #165 but I'm still refining the API, filling up some gaps and iron out some bugs.
But the main idea should already be visible. There are going to be a couple of primitives and users can combine them together.
Some examples:
local widgets = require('dap.ui.widgets')
widgets.hover(widgets.scopes) -- opens scopes in a floating window
widgets.hover(widgets.frames) -- opens stack frames in a floating window
widgets.sidebar(widgets.scopes) -- opens scopes in a sidebar
This would be the high-level entry points.
There will be a different filetype per scope so that users can use ftplugin, but you can also use a lower level API to customize the window creation.
local widgets = require('dap.ui.widgets')
widgets.builder(widgets.scopes)
.new_win(your_function_that_creates_a_window)
.build()
.open()
There might be some default new_win
/ new_buf
functions and maybe even some combinators that could be re-usable. Not sure yet how far that will go.
Part of the credit goes to @rcarriga, the element system in nvim-dap-ui inspired some parts of the widget design.
Would be cool if some of the building blocks could even be re-used in nvim-dap-ui. (E.g the lower level layer
that can be used to render lua objects to a buffer and have extmarks places that allows to access the lua object later on per line)
from nvim-dap.
The file type to customize the highlight is dap-variables
but the background should be the standard float background.
An option to choose the function that creates the window could be a solution just as for #161
make_floating_popup_options has a border
option
from nvim-dap.
Made another iteration on the widget api stuff. #171 should now be ready for some testing and I'd appreciate some feedback on the API and customization options.
If you've use-cases that aren't covered yet, please let me know.
from nvim-dap.
Merged #171 and also added #172
from nvim-dap.
Related Issues (20)
- Python `print()` statements in the REPL are duplicated HOT 2
- Debugging PHP works, but status stays as 'running' after script is done
- version 0.8.0 with plugins telescope/telescope-ui/nvim-dap-go unable to run processId at correct time. HOT 3
- codelldb Issue with command output visibility in debug DAP UI HOT 1
- Create dap response inside a dap.listener HOT 2
- `disconnect` command listener not working with debugpy and long-running programs HOT 1
- Update Lua adapter installation doc + Add default out of the box lua debugging capability to DAP HOT 1
- Support string input for `args` field in `launch.json` HOT 6
- Docs missing from luarocks
- Duplicate entries in configuration. Need to disable auto `load_launchjs` HOT 1
- Cannot attach to running process for C programme HOT 3
- Errors stepping over with `lldb-dap` (C++) HOT 1
- Error pops up on Neovim 0.10 in WINDOWS 11 HOT 1
- Delve Works, But Go (Using Delve Directly) Fails with "stub exited" HOT 3
- When a breakpoint is hit use the window with the breakpoint instead of changing the current one HOT 2
- Enhanced support when debugging in a multi-threaded setup HOT 1
- [Feature] Support multiple session switch HOT 1
- [feature] Purge ansi color escape codes in repl terminal HOT 1
- Replace vim.fn.sign_define since it is deprecated and will be removed HOT 1
- [Feature] Set the debug name when starting debug. HOT 1
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 nvim-dap.