I have allready started with:
nimsuggest --stdin myfile.nim
Then I get:
usage: sug|con|def|use|dus|chk|mod|highlight|outline|known|project file.nim[;dirtyfile.nim]:line:col
Do you really allways have to enter the line- and col-number for every function? That would defeat the usability of the tool for standalone/commandline usage, but maybe it is mostly meant for programmatic usage?
I have allready viewed the weblink:
https://nim-lang.org/docs/nimsuggest.html
Could somebody give runnable examples of the most usefull commandline usages? For example:
Maybe it is not meant for humans but for other programs / editors. Then maybe a human-usable interface could be made?
Previously I allready wanted to create a (little) app to create usage-trees and used-by-trees.
Based on relations like:
proc a uses proc x
proc a uses proc y
proc a uses proc z
and then querying some levels to create the tree. I dont know if nimsuggest would be helpful in creating such (textual) app. Besides nimsuggest one could create a text-file in which all procs for the project are entered. When I call elements like "proc" or "template" definitions, i would get something like:
def_module_line_col_def-type
which would constitute a table of all (proc)-definitions in the project-files(.nim) and is easy to generate. I call it the def-list.
Then, for each proc / defintion, one can scan for the used procs /defs and append them after earch def-line.
in pseudo-code:
for def1 in def-list:
for def2 in def-list:
if the source-code-range of def1 contains def2:
append def2-data to the line of def1
Thus an extended def-list arises.
This extended def-list could be used to create the forementioned trees.
I dont know if somehow nimsuggest could be used in this process?
Now i am gone enjoy the weather...:-)