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
139
139
// - fleury_color_token_highlight: The color used to underline/highlight
140
140
// tokens that the cursor is over.
141
141
//
142
+ // - fleury_color_token_minor_highlight: The Color That is used for minor
143
+ // highlights. i.e. cursor token occurance underlines.
144
+ //
142
145
// - fleury_color_comment_user_name: The color used to highlight the
143
146
// username in comments.
144
147
//
145
148
// - fleury_color_error_annotation: Text color used for the inline error
146
149
// message string with F4_RenderErrorAnnotations
147
150
148
151
149
- // ~ @f4_render_intro Rendering Features
152
+ // - @f4_render_intro Rendering Features
150
153
//
151
154
// Many of the features in this layer are just rendering tweaks/improvements to
152
155
// 4coder's defaults. Below is a list of features and some options for them.
177
180
// *compilation* window, it will display what that error is to the right of
178
181
// the line. Turn it off with "f4_disable_error_annotations" in your config
179
182
// file.
183
+ //
184
+ // - Cursor Identifier Highlight: The Identifier under the cursor is highlighted
185
+ // with an underline (using the fleury_color_token_highlight color). It also
186
+ // highlights all other occurances of the identifier (by string) that is
187
+ // visible and syntax highlighted (occurances are highlighted using
188
+ // "fleury_color_token_minor_highlight". Turn the highlight of other occurances
189
+ // off with "f4_disable_cursor_token_occurance" in your config file.
180
190
181
- // ~ @f4_calc_intro Built-In Calculator/Plotting
191
+ // - @f4_calc_intro Built-In Calculator/Plotting
182
192
//
183
193
// This custom layer includes a tiny little calculator language, which has
184
194
// plotting capabilities. It has a few features that comprise it all:
194
204
// to. The entire buffer is interpreted as calculator code, and it will
195
205
// do all the same things that calc comments do.
196
206
197
- // ~ @f4_pos_context_intro Language Position-Context Tooltips
207
+ // - @f4_pos_context_intro Language Position-Context Tooltips
198
208
//
199
209
// This feature shows tooltips relating to the current cursor position, as it
200
210
// adheres to the programming language of the buffer in question. For example,
209
219
// Alternatively, you can turn the whole thing off with "f4_disable_poscontext"
210
220
// in your config file.
211
221
212
- // ~ @f4_commands
222
+ // - @f4_commands
213
223
//
214
224
// There are a lot of commands you can bind in your bindings.4coder file that
215
225
// have been helpful for me and others. Here is a list of the most useful ones.
241
251
// so your laptop doesn't get hot. Set its default value with "f4_battery_saver"
242
252
// in your config file.
243
253
//
254
+ // - f4_disable_cursor_trails: Turns off cursor animation.
255
+ //
244
256
// - f4_toggle_compilation_expand: Expands/shrinks the *compilation* panel at the
245
257
// bottom of the screen. Bind this to a key that you want to press when you are
246
258
// checking out the output of a build, and be sure to send your build commands
342
354
// DONE:
343
355
//
344
356
357
+ // ~ TODO FOR CASEY
358
+ //
359
+ // [X] Active pane frame color/thickness control in Fleury config options, to allow turning it
360
+ // off entirely or changing the color
361
+ // done: f4_margin_size and f4_margin_use_mode_color
362
+ // [X] Inactive pane color cursor differences
363
+ // [X] Filenames to disambiguate indexed stuff with the same name
364
+ // [X] Way to get to forward decl for an indexed thing too
365
+ // done: use go-to-definition again, at the definition site, and it should cycle between
366
+ // all the definitions
367
+ // [ ] Fix clipboard stuff
368
+ // [ ] CPM counter shenanigans
369
+
345
370
// ~ TODO PLOTS
346
371
// [ ] Un-Bust Histograms
347
372
// [ ] Fix plot clip rect bugs when the plot is not 100% in the visible range
350
375
// [ ] Plots and Calc are so coupled and I hate it, please rewrite or something
351
376
352
377
// ~ TODO META
353
- // [ ] Project-wide todo list (by searching for TODO and DONE comments, lister for toggling)
378
+ // [X ] Project-wide todo list (by searching for TODO and DONE comments, lister for toggling)
354
379
// [ ] Project switcher
355
380
// [ ] Plan + do modal input scheme... Identifier-mode, text-mode, semantics mode, search mode...?
356
381
@@ -391,6 +416,7 @@ typedef int socklen_t;
391
416
#include " 4coder_fleury_cursor.h"
392
417
#include " 4coder_fleury_plot.h"
393
418
#include " 4coder_fleury_calc.h"
419
+ #include " 4coder_fleury_lego.h"
394
420
#include " 4coder_fleury_pos_context_tooltips.h"
395
421
#include " 4coder_fleury_code_peek.h"
396
422
#include " 4coder_fleury_recent_files.h"
@@ -415,6 +441,7 @@ typedef int socklen_t;
415
441
#include " 4coder_fleury_cursor.cpp"
416
442
#include " 4coder_fleury_plot.cpp"
417
443
#include " 4coder_fleury_calc.cpp"
444
+ #include " 4coder_fleury_lego.cpp"
418
445
#include " 4coder_fleury_pos_context_tooltips.cpp"
419
446
#include " 4coder_fleury_code_peek.cpp"
420
447
#include " 4coder_fleury_recent_files.cpp"
@@ -478,7 +505,6 @@ void custom_layer_init(Application_Links *app)
478
505
}
479
506
}
480
507
481
-
482
508
// ~ NOTE(rjf): @f4_startup Whenever 4coder's core is ready for the custom layer to start up,
483
509
// this is called.
484
510
@@ -516,7 +542,6 @@ CUSTOM_DOC("Fleury startup event")
516
542
517
543
// ~ NOTE(rjf): Open special buffers.
518
544
{
519
-
520
545
// NOTE(rjf): Open compilation buffer.
521
546
{
522
547
Buffer_ID comp_buffer = create_buffer (app, string_u8_litexpr (" *compilation*" ),
@@ -526,6 +551,15 @@ CUSTOM_DOC("Fleury startup event")
526
551
buffer_set_setting (app, comp_buffer, BufferSetting_ReadOnly, true );
527
552
}
528
553
554
+ // NOTE(rjf): Open lego buffer.
555
+ {
556
+ Buffer_ID comp_buffer = create_buffer (app, string_u8_litexpr (" *lego*" ),
557
+ BufferCreate_NeverAttachToFile |
558
+ BufferCreate_AlwaysNew);
559
+ buffer_set_setting (app, comp_buffer, BufferSetting_Unimportant, true );
560
+ buffer_set_setting (app, comp_buffer, BufferSetting_ReadOnly, true );
561
+ }
562
+
529
563
// NOTE(rjf): Open calc buffer.
530
564
{
531
565
Buffer_ID calc_buffer = create_buffer (app, string_u8_litexpr (" *calc*" ),
@@ -567,10 +601,11 @@ CUSTOM_DOC("Fleury startup event")
567
601
Face_Metrics metrics = get_face_metrics (app, face_id);
568
602
view_set_split_pixel_size (app, compilation_view, (i32 )(metrics.line_height *4 .f ));
569
603
view_set_passive (app, compilation_view, true );
604
+ global_compilation_view = compilation_view;
605
+ view_set_buffer (app, compilation_view, comp_id, 0 );
570
606
}
571
- view_set_buffer (app, compilation_view, comp_id, 0 );
607
+
572
608
view_set_active (app, view);
573
- global_compilation_view = compilation_view;
574
609
575
610
// NOTE(rjf): Right Panel
576
611
open_panel_vsplit (app);
@@ -591,6 +626,11 @@ CUSTOM_DOC("Fleury startup event")
591
626
}
592
627
}
593
628
629
+ // ~ NOTE(rjf): Set misc options.
630
+ {
631
+ global_battery_saver = def_get_config_b32 (vars_save_string_lit (" f4_battery_saver" ));
632
+ }
633
+
594
634
// ~ NOTE(rjf): Initialize audio.
595
635
{
596
636
def_audio_init ();
0 commit comments