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.
147
+ //
148
+ // - fleury_color_error_annotation: Text color used for the inline error
149
+ // message string with F4_RenderErrorAnnotations
144
150
145
151
146
- // ~ @f4_render_intro Rendering Features
152
+ // - @f4_render_intro Rendering Features
147
153
//
148
154
// Many of the features in this layer are just rendering tweaks/improvements to
149
155
// 4coder's defaults. Below is a list of features and some options for them.
174
180
// *compilation* window, it will display what that error is to the right of
175
181
// the line. Turn it off with "f4_disable_error_annotations" in your config
176
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.
177
190
178
- // ~ @f4_calc_intro Built-In Calculator/Plotting
191
+ // - @f4_calc_intro Built-In Calculator/Plotting
179
192
//
180
193
// This custom layer includes a tiny little calculator language, which has
181
194
// plotting capabilities. It has a few features that comprise it all:
191
204
// to. The entire buffer is interpreted as calculator code, and it will
192
205
// do all the same things that calc comments do.
193
206
194
- // ~ @f4_pos_context_intro Language Position-Context Tooltips
207
+ // - @f4_pos_context_intro Language Position-Context Tooltips
195
208
//
196
209
// This feature shows tooltips relating to the current cursor position, as it
197
210
// adheres to the programming language of the buffer in question. For example,
206
219
// Alternatively, you can turn the whole thing off with "f4_disable_poscontext"
207
220
// in your config file.
208
221
209
- // ~ @f4_commands
222
+ // - @f4_commands
210
223
//
211
224
// There are a lot of commands you can bind in your bindings.4coder file that
212
225
// have been helpful for me and others. Here is a list of the most useful ones.
238
251
// so your laptop doesn't get hot. Set its default value with "f4_battery_saver"
239
252
// in your config file.
240
253
//
254
+ // - f4_disable_cursor_trails: Turns off cursor animation.
255
+ //
241
256
// - f4_toggle_compilation_expand: Expands/shrinks the *compilation* panel at the
242
257
// bottom of the screen. Bind this to a key that you want to press when you are
243
258
// checking out the output of a build, and be sure to send your build commands
339
354
// DONE:
340
355
//
341
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
+
342
370
// ~ TODO PLOTS
343
371
// [ ] Un-Bust Histograms
344
372
// [ ] Fix plot clip rect bugs when the plot is not 100% in the visible range
347
375
// [ ] Plots and Calc are so coupled and I hate it, please rewrite or something
348
376
349
377
// ~ TODO META
350
- // [ ] 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)
351
379
// [ ] Project switcher
352
380
// [ ] Plan + do modal input scheme... Identifier-mode, text-mode, semantics mode, search mode...?
353
381
@@ -388,6 +416,7 @@ typedef int socklen_t;
388
416
#include " 4coder_fleury_cursor.h"
389
417
#include " 4coder_fleury_plot.h"
390
418
#include " 4coder_fleury_calc.h"
419
+ #include " 4coder_fleury_lego.h"
391
420
#include " 4coder_fleury_pos_context_tooltips.h"
392
421
#include " 4coder_fleury_code_peek.h"
393
422
#include " 4coder_fleury_recent_files.h"
@@ -412,6 +441,7 @@ typedef int socklen_t;
412
441
#include " 4coder_fleury_cursor.cpp"
413
442
#include " 4coder_fleury_plot.cpp"
414
443
#include " 4coder_fleury_calc.cpp"
444
+ #include " 4coder_fleury_lego.cpp"
415
445
#include " 4coder_fleury_pos_context_tooltips.cpp"
416
446
#include " 4coder_fleury_code_peek.cpp"
417
447
#include " 4coder_fleury_recent_files.cpp"
@@ -475,7 +505,6 @@ void custom_layer_init(Application_Links *app)
475
505
}
476
506
}
477
507
478
-
479
508
// ~ NOTE(rjf): @f4_startup Whenever 4coder's core is ready for the custom layer to start up,
480
509
// this is called.
481
510
@@ -513,7 +542,6 @@ CUSTOM_DOC("Fleury startup event")
513
542
514
543
// ~ NOTE(rjf): Open special buffers.
515
544
{
516
-
517
545
// NOTE(rjf): Open compilation buffer.
518
546
{
519
547
Buffer_ID comp_buffer = create_buffer (app, string_u8_litexpr (" *compilation*" ),
@@ -523,6 +551,15 @@ CUSTOM_DOC("Fleury startup event")
523
551
buffer_set_setting (app, comp_buffer, BufferSetting_ReadOnly, true );
524
552
}
525
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
+
526
563
// NOTE(rjf): Open calc buffer.
527
564
{
528
565
Buffer_ID calc_buffer = create_buffer (app, string_u8_litexpr (" *calc*" ),
@@ -564,10 +601,11 @@ CUSTOM_DOC("Fleury startup event")
564
601
Face_Metrics metrics = get_face_metrics (app, face_id);
565
602
view_set_split_pixel_size (app, compilation_view, (i32 )(metrics.line_height *4 .f ));
566
603
view_set_passive (app, compilation_view, true );
604
+ global_compilation_view = compilation_view;
605
+ view_set_buffer (app, compilation_view, comp_id, 0 );
567
606
}
568
- view_set_buffer (app, compilation_view, comp_id, 0 );
607
+
569
608
view_set_active (app, view);
570
- global_compilation_view = compilation_view;
571
609
572
610
// NOTE(rjf): Right Panel
573
611
open_panel_vsplit (app);
@@ -588,6 +626,11 @@ CUSTOM_DOC("Fleury startup event")
588
626
}
589
627
}
590
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
+
591
634
// ~ NOTE(rjf): Initialize audio.
592
635
{
593
636
def_audio_init ();
0 commit comments