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)
- extmark-based sign instead of the legacy sign? HOT 1
- Follow the exact instructions on :h dap-configuration to configure debugpy and it didn't work HOT 3
- Auto reload launch.json? HOT 1
- [Debug Config] Allow the debugger to read environment variables from "envFile" in launch.json HOT 1
- Add picker for executables/files
- [BUG] autoscroll breaks goto line vim motion on repl HOT 2
- Add support for DapBreakpointStopped and DapBreakpointConditionStopped signs
- Breakpoint symbol is not using sign column background color by default HOT 2
- Add environment variables HOT 1
- Linux (centos 8 with GDB 14.1) native GDB debugging session hangs HOT 3
- Ability to Disable logging for repl HOT 7
- Unable to attach to process using netcoredbg HOT 2
- Unable to launch a debugger correctly on macos m2
- very slow when not debuging just plain go to definition HOT 2
- Can't set a breakpoint or pause the thread when run without breakpoints HOT 1
- Breakpoints inside lambda function HOT 1
- gdb does not shut down gracefully HOT 2
- "Wait for breakpoint" Triggered break points HOT 1
- With preview, a supplied expression is not passed to the refresh HOT 1
- Auto scroll when repl is not the active window
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.