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)
- Cannot connect to gdbserver HOT 2
- Evaluate response throws Error for hover() etc. HOT 2
- nvim-dap not call disconnect leads lldb-vscode crash after debug session stop HOT 4
- `pick_process` does not work when a filter is passed to it HOT 4
- [BUG]: widgets.sidebar.toggle() causes incremental lag (js-debug-adapter) HOT 1
- Breakpoint unverified error (CodeLLDB) HOT 1
- Can't properly run debug session, it hangs after start HOT 1
- [lldb-vscode] Breakpoint unverified in nvim-dap but resolved accurately in lldb cli? HOT 3
- No reaction to configurations change in Godot 4 HOT 4
- Source Mapping not working in WSL for Node with Jest HOT 1
- launch.json doesn't reload when using custom path with load_launchjs() HOT 2
- Make `require 'dap.ui.widgets'.hover()` jump to float only when calling twice HOT 3
- attempt to perform arithmetic on local 'column' (a nil value) HOT 2
- Breakpoints get rejected when the project is created in a symbolic link directory HOT 2
- Getting "Source not available, cannot jump to frame" when using C with lldb-dap on Mac M1 HOT 4
- help needed: manual nvim-dap configuration for javascript works on windows but not on linux HOT 2
- Extend get api of breakpoints to retrieve a bp at specific line
- Breakpoint rejected sign "R" appears even though debugger paused HOT 1
- Native GDB DAP unable to run HOT 6
- vscode-go installing doesn't work 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.