diff options
| author | Albert Cervin <albert@acervin.com> | 2024-09-17 08:47:03 +0200 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2025-11-01 22:11:14 +0100 |
| commit | 4459b8b3aa9d73895391785a99dcc87134e80601 (patch) | |
| tree | a5204f447a0b2b05f63504c7fe958ef9bbf1918a /src/dged/buffer_view.h | |
| parent | 4689f3f38277bb64981fc960e8e384e2d065d659 (diff) | |
| download | dged-4459b8b3aa9d73895391785a99dcc87134e80601.tar.gz dged-4459b8b3aa9d73895391785a99dcc87134e80601.tar.xz dged-4459b8b3aa9d73895391785a99dcc87134e80601.zip | |
More lsp support
This makes the LSP support complete for now:
- Completion
- Diagnostics
- Goto implementation/declaration
- Rename
- Documentation
- Find references
Diffstat (limited to 'src/dged/buffer_view.h')
| -rw-r--r-- | src/dged/buffer_view.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/dged/buffer_view.h b/src/dged/buffer_view.h index 4e23b5d..d1b6b4a 100644 --- a/src/dged/buffer_view.h +++ b/src/dged/buffer_view.h @@ -3,7 +3,9 @@ #include <stddef.h> +#include "hook.h" #include "location.h" +#include "s8.h" struct buffer; @@ -25,8 +27,8 @@ struct buffer_view { /** Pointer to the actual buffer */ struct buffer *buffer; - /** Modeline buffer (may be NULL) */ - struct modeline *modeline; + /** Has modeline? */ + bool modeline; /** Current left fringe size */ uint32_t fringe_width; @@ -86,6 +88,15 @@ void buffer_view_undo(struct buffer_view *view); void buffer_view_sort_lines(struct buffer_view *view); +// hack to prevent s8 from being expanded as a macro +// in the function pointer typedef +typedef struct s8 _string; +typedef _string (*modeline_hook_cb)(struct buffer_view *, void *); +uint32_t buffer_view_add_modeline_hook(modeline_hook_cb callback, + void *userdata); +void buffer_view_remove_modeline_hook(uint32_t hook_id, + remove_hook_cb callback); + struct buffer_view_update_params { struct command_list *commands; void *(*frame_alloc)(size_t); @@ -97,7 +108,7 @@ struct buffer_view_update_params { uint32_t window_y; }; -void buffer_view_update(struct buffer_view *view, +bool buffer_view_update(struct buffer_view *view, struct buffer_view_update_params *params); #endif |
