|
| 1 | +{ lib, ... }: |
| 2 | +let |
| 3 | + inherit (lib.nixvim) defaultNullOpts; |
| 4 | + mkExtension = import ./_mk-extension.nix; |
| 5 | +in |
| 6 | +mkExtension { |
| 7 | + name = "zf-native"; |
| 8 | + extensionName = "zf-native"; |
| 9 | + package = "telescope-zf-native-nvim"; |
| 10 | + |
| 11 | + settingsOptions = { |
| 12 | + file = { |
| 13 | + enable = defaultNullOpts.mkBool true '' |
| 14 | + Override default telescope file sorter. |
| 15 | + ''; |
| 16 | + highlight_results = defaultNullOpts.mkBool true '' |
| 17 | + Highlight matching text in results. |
| 18 | + ''; |
| 19 | + match_filename = defaultNullOpts.mkBool true '' |
| 20 | + Enable zf filename match priority. |
| 21 | + ''; |
| 22 | + initial_sort = defaultNullOpts.mkBool null '' |
| 23 | + Optional function to define a sort order when the query is empty. |
| 24 | + ''; |
| 25 | + smart_case = defaultNullOpts.mkBool true '' |
| 26 | + Set to false to enable case sensitive matching. |
| 27 | + ''; |
| 28 | + }; |
| 29 | + |
| 30 | + generic = { |
| 31 | + enable = defaultNullOpts.mkBool true '' |
| 32 | + Override default telescope generic item sorter. |
| 33 | + ''; |
| 34 | + highlight_results = defaultNullOpts.mkBool true '' |
| 35 | + Highlight matching text in results. |
| 36 | + ''; |
| 37 | + match_filename = defaultNullOpts.mkBool false '' |
| 38 | + Disable zf filename match priority. |
| 39 | + ''; |
| 40 | + initial_sort = defaultNullOpts.mkBool null '' |
| 41 | + Optional function to define a sort order when the query is empty. |
| 42 | + ''; |
| 43 | + smart_case = defaultNullOpts.mkBool true '' |
| 44 | + Set to false to enable case sensitive matching. |
| 45 | + ''; |
| 46 | + }; |
| 47 | + }; |
| 48 | + |
| 49 | + settingsExample = { |
| 50 | + file = { |
| 51 | + enable = true; |
| 52 | + highlight_results = true; |
| 53 | + match_filename = true; |
| 54 | + initial_sort = null; |
| 55 | + smart_case = true; |
| 56 | + }; |
| 57 | + generic = { |
| 58 | + enable = true; |
| 59 | + highlight_results = true; |
| 60 | + match_filename = false; |
| 61 | + initial_sort = null; |
| 62 | + smart_case = true; |
| 63 | + }; |
| 64 | + }; |
| 65 | + |
| 66 | + dependencies = [ "zf" ]; |
| 67 | + |
| 68 | + extraConfig = cfg: { |
| 69 | + # zf-native shared binaries |
| 70 | + performance.combinePlugins.pathsToLink = [ "/lib" ]; |
| 71 | + }; |
| 72 | +} |
0 commit comments