You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So we need to make nimsuggest work for that basic use case of searching for symbol declaration.
I need a command line way to search for symbol declarations, not just an IDE integration (IDE integration alone makes it hard to pipe to other commands / tools)
it could be:
# simplest first
nimsuggest --search --nameregex:'foo\w+bar' --filepattern=<glob pattern, eg using ripgrep's syntax>
# more featureful:
nimsuggest --search --type:decl --kind:macro,proc --nameregex:'foo\w+bar' --filepattern=<glob pattern, eg using ripgrep's syntax>
with:
--type:[usage|declaration|definition]
--kind:[iterator|proc|template|macro|method|type|func]
if use case above is doable today from cmd line, please kindly show the command I need to run on cmd line to search, say, for a proc named 'foo\w+bar' in a set of files (eg as specified by multiple search paths)
public symbols are not enough; we should also allow searching for private symbols; eg use cases: searching in large files (with complex conditional compilation for eg) or when using include instead of import (in which case symbol may be declared in another file)
Unfortunately not for all options it is clear what they mean, I had to ask Araq some years ago for it, but can not really remember details. But NimSuggest generally works fine and reliable, I am using it in my NEd editor for years. Well, when syntax is too wrong it may crash, for example when I load a Ruby file to convert it to Nim it may crash. I had a private local version of NEd which even did syntax highlighting based on nimsuggest, was working fine and nice, but CPU load was high, so I am not using that, as plain regexp highlighting offered by GtkSourceView is not bad.
The text was updated successfully, but these errors were encountered:
krux02
changed the title
[nimsuggest] command line option to search for symbol declaration
nimsuggest command line option to search for symbol declaration
Oct 28, 2018
as show here: how to reliably search where a symbol is declared using cmd line? - Nim forum there's currently no way to seach reliably for public symbol declarations (eg enum members, field names, but possibly other declarations too) or even non-public procs/types/etc using textual search
grep/nimgrep/rg
So we need to make nimsuggest work for that basic use case of searching for symbol declaration.
I need a command line way to search for symbol declarations, not just an IDE integration (IDE integration alone makes it hard to pipe to other commands / tools)
it could be:
related
Note
scratch below
The text was updated successfully, but these errors were encountered: