14
14
15
15
// ~ @f4_features 4coder Fleury Feature/Option List
16
16
17
- // ~ @f4_lang_intro Multi-Language Support
17
+ // - @f4_lang_intro Multi-Language Support
18
18
//
19
19
// This custom layer has been tweaked to allow for better multi-language support
20
20
// in 4coder. It isn't perfect and will not support all languages, but it works
79
79
// 3. Add the info for your language to the 4coder_fleury_lang_list.h file.
80
80
// More information is in that file.
81
81
82
- // ~ @f4_colors_intro Syntax Highlighting and Color Additions
82
+ // - @f4_colors_intro Syntax Highlighting and Color Additions
83
83
//
84
84
// 4coder provides very basic syntax highlighting, but this layer implements
85
85
// some more features, particularly ones that rely on the code index. There
143
143
// username in comments.
144
144
145
145
146
- // ~ @f4_render_intro Rendering Features
146
+ // - @f4_render_intro Rendering Features
147
147
//
148
148
// Many of the features in this layer are just rendering tweaks/improvements to
149
149
// 4coder's defaults. Below is a list of features and some options for them.
175
175
// the line. Turn it off with "f4_disable_error_annotations" in your config
176
176
// file.
177
177
178
- // ~ @f4_calc_intro Built-In Calculator/Plotting
178
+ // - @f4_calc_intro Built-In Calculator/Plotting
179
179
//
180
180
// This custom layer includes a tiny little calculator language, which has
181
181
// plotting capabilities. It has a few features that comprise it all:
191
191
// to. The entire buffer is interpreted as calculator code, and it will
192
192
// do all the same things that calc comments do.
193
193
194
- // ~ @f4_pos_context_intro Language Position-Context Tooltips
194
+ // - @f4_pos_context_intro Language Position-Context Tooltips
195
195
//
196
196
// This feature shows tooltips relating to the current cursor position, as it
197
197
// adheres to the programming language of the buffer in question. For example,
206
206
// Alternatively, you can turn the whole thing off with "f4_disable_poscontext"
207
207
// in your config file.
208
208
209
- // ~ @f4_commands
209
+ // - @f4_commands
210
210
//
211
211
// There are a lot of commands you can bind in your bindings.4coder file that
212
212
// have been helpful for me and others. Here is a list of the most useful ones.
238
238
// so your laptop doesn't get hot. Set its default value with "f4_battery_saver"
239
239
// in your config file.
240
240
//
241
+ // - f4_disable_cursor_trails: Turns off cursor animation.
242
+ //
241
243
// - f4_toggle_compilation_expand: Expands/shrinks the *compilation* panel at the
242
244
// bottom of the screen. Bind this to a key that you want to press when you are
243
245
// checking out the output of a build, and be sure to send your build commands
339
341
// DONE:
340
342
//
341
343
344
+ // ~ TODO FOR CASEY
345
+ //
346
+ // [X] Active pane frame color/thickness control in Fleury config options, to allow turning it
347
+ // off entirely or changing the color
348
+ // done: f4_margin_size and f4_margin_use_mode_color
349
+ // [X] Inactive pane color cursor differences
350
+ // [X] Filenames to disambiguate indexed stuff with the same name
351
+ // [X] Way to get to forward decl for an indexed thing too
352
+ // done: use go-to-definition again, at the definition site, and it should cycle between
353
+ // all the definitions
354
+ // [ ] Fix clipboard stuff
355
+ // [ ] CPM counter shenanigans
356
+
342
357
// ~ TODO PLOTS
343
358
// [ ] Un-Bust Histograms
344
359
// [ ] Fix plot clip rect bugs when the plot is not 100% in the visible range
@@ -388,6 +403,7 @@ typedef int socklen_t;
388
403
#include " 4coder_fleury_cursor.h"
389
404
#include " 4coder_fleury_plot.h"
390
405
#include " 4coder_fleury_calc.h"
406
+ #include " 4coder_fleury_lego.h"
391
407
#include " 4coder_fleury_pos_context_tooltips.h"
392
408
#include " 4coder_fleury_code_peek.h"
393
409
#include " 4coder_fleury_recent_files.h"
@@ -412,6 +428,7 @@ typedef int socklen_t;
412
428
#include " 4coder_fleury_cursor.cpp"
413
429
#include " 4coder_fleury_plot.cpp"
414
430
#include " 4coder_fleury_calc.cpp"
431
+ #include " 4coder_fleury_lego.cpp"
415
432
#include " 4coder_fleury_pos_context_tooltips.cpp"
416
433
#include " 4coder_fleury_code_peek.cpp"
417
434
#include " 4coder_fleury_recent_files.cpp"
@@ -475,7 +492,6 @@ void custom_layer_init(Application_Links *app)
475
492
}
476
493
}
477
494
478
-
479
495
// ~ NOTE(rjf): @f4_startup Whenever 4coder's core is ready for the custom layer to start up,
480
496
// this is called.
481
497
@@ -513,7 +529,6 @@ CUSTOM_DOC("Fleury startup event")
513
529
514
530
// ~ NOTE(rjf): Open special buffers.
515
531
{
516
-
517
532
// NOTE(rjf): Open compilation buffer.
518
533
{
519
534
Buffer_ID comp_buffer = create_buffer (app, string_u8_litexpr (" *compilation*" ),
@@ -523,6 +538,15 @@ CUSTOM_DOC("Fleury startup event")
523
538
buffer_set_setting (app, comp_buffer, BufferSetting_ReadOnly, true );
524
539
}
525
540
541
+ // NOTE(rjf): Open lego buffer.
542
+ {
543
+ Buffer_ID comp_buffer = create_buffer (app, string_u8_litexpr (" *lego*" ),
544
+ BufferCreate_NeverAttachToFile |
545
+ BufferCreate_AlwaysNew);
546
+ buffer_set_setting (app, comp_buffer, BufferSetting_Unimportant, true );
547
+ buffer_set_setting (app, comp_buffer, BufferSetting_ReadOnly, true );
548
+ }
549
+
526
550
// NOTE(rjf): Open calc buffer.
527
551
{
528
552
Buffer_ID calc_buffer = create_buffer (app, string_u8_litexpr (" *calc*" ),
@@ -564,10 +588,11 @@ CUSTOM_DOC("Fleury startup event")
564
588
Face_Metrics metrics = get_face_metrics (app, face_id);
565
589
view_set_split_pixel_size (app, compilation_view, (i32 )(metrics.line_height *4 .f ));
566
590
view_set_passive (app, compilation_view, true );
591
+ global_compilation_view = compilation_view;
592
+ view_set_buffer (app, compilation_view, comp_id, 0 );
567
593
}
568
- view_set_buffer (app, compilation_view, comp_id, 0 );
594
+
569
595
view_set_active (app, view);
570
- global_compilation_view = compilation_view;
571
596
572
597
// NOTE(rjf): Right Panel
573
598
open_panel_vsplit (app);
@@ -588,6 +613,11 @@ CUSTOM_DOC("Fleury startup event")
588
613
}
589
614
}
590
615
616
+ // ~ NOTE(rjf): Set misc options.
617
+ {
618
+ global_battery_saver = def_get_config_b32 (vars_save_string_lit (" f4_battery_saver" ));
619
+ }
620
+
591
621
// ~ NOTE(rjf): Initialize audio.
592
622
{
593
623
def_audio_init ();
0 commit comments