-- Top of file:
data Indexer =
Indexer { indexDocuments :: !(CollectionName -> [Doc] -> IO (Either String Int))
, indexLocalWarcFile :: !(CollectionName -> FilePath -> IO (Either String ()))
, deleteDocument :: !(CollectionName -> String -> IO (Either String ()))
, isDocDeleted :: !(CollectionName -> String -> IO (Either String (Map Text Int)))
}
-- Further down:
indexDocumentsImpl env writer metadataApi compactor registry collectionName unsortedDocs = do
let ds = sort unsortedDocs
let nDocs = length ds
...
newLocalWarcFileIndex env warcFileReader writer metadataApi compactor registry collectionName warcFile =
batchedRead warcFileReader
warcFile
newIndexify
where
newIndexify :: Vector WarcEntry -> IO ()
newIndexify ds = do
...
etc.A Missing IDE Feature
41–50 of 54 posts
Re: A Missing IDE Feature
#42Earlier quoted context omitted.
ST has code folding, but I don't think it has special automatic code folding when using Goto Definition?
That specific part of code folding is pure preference. I would rather my editor not just fold things on GoTo Definition. GoTo Definition already takes me to what I need to see. I use code folding to minimize large chunks of something in the way. Not to unload my visual workspace on every jump. Folding on specific commands means I’d have to unfold sometimes, extra commands.
Re: A Missing IDE Feature
#43I tried to build it but the extension API is just not there for it. I’d happily pay $$$ for something like this if anyone feels nerd sniped.
Re: A Missing IDE Feature
#44In what sense is this missing? You can absolutely do this in vim so it must (by the principle of duality) also be present in emacs. Since he shows it in IntelliJ it’s obviously not missing from there so I’m assuming vscode has it also. Automatic folding is something I almost always disable because I hate it when an editor tries to hide information from me. I strongly prefer to choose when I want things folded but by…
> I’m assuming vscode has it also. Sadly I believe this assumption is incorrect. VSCode supports folding, but not specifically method bodies (to my knowledge), and not by default (with or without a settings flag)
Re: A Missing IDE Feature
#45Re: A Missing IDE Feature
#46Re: A Missing IDE Feature
#47If you are using "Go to..." a struct declaration or impl in Rust (or a class in other languages) it actually makes a lot of sense. If I'm going to a struct/impl/class I don't know yet which method do I won't to see. If you are just opening a file that you haven't open before though... I'm not so sure.
Re: A Missing IDE Feature
#48Of course, we all are trying to write clear code. It doesn't mean that your tool should make working with less than perfect codebases unbearable.
Re: A Missing IDE Feature
#49In what sense is this missing? You can absolutely do this in vim so it must (by the principle of duality) also be present in emacs. Since he shows it in IntelliJ it’s obviously not missing from there so I’m assuming vscode has it also. Automatic folding is something I almost always disable because I hate it when an editor tries to hide information from me. I strongly prefer to choose when I want things folded but by…
> I’m assuming vscode has it also. Sadly I believe this assumption is incorrect. VSCode supports folding, but not specifically method bodies (to my knowledge), and not by default (with or without a settings flag)
Whether this is on by default or not is not the issue. It's just getting "smart" folding in vscode that would be the feature win.
Re: A Missing IDE Feature
#50Code folding by default triggers thoughts of the annoying, mostly useless TypeScript d files that VSCode dumps you in to when you ctrl/cmd click into a function. The only reason I do that is to see implementation details so I can figure out why something's not working. If third-party library d files were replaced by pre-folded source, I guess that'd be OK.