3 ms·
An autocompletion daemon for the Go programming language
- drivebyacct2 15y agoI'm looking into doing some sort of autocompletion related functionality for a project soon... so, why a separate daemon rather than ctags?
- alnayyir 15y agoI was actually looking into making something like this over the past couple weeks, and the answer is that the format is too constrained. It just doesn't express legitimately useful semantics that could be used for things like "go to definition", it would simply recurse all synonyms rather than understanding that you're specifying the instance of a class, and want to see the class definition. I'm actually feeling chastened now that this has come out for a relatively small language, but I haven't implemented my idea yet.
- lemming 15y agoBecause ctags has extremely limited context sensitivity - i.e. it has no concept of the kind of symbol it's indexing, so editors can't use it in different ways depending on the cursor point. If you look at the code for IntelliJ plugins, the code for doing different sorts of completion in different contexts is actually really complex. Edit: moved unrelated questions to a top-level comment.
- russell_h 15y agoNot sure if something has changed, but this has actually been around for some time. Original announcement: https://groups.google.com/d/topic/golang-nuts/j5e4bNXF8ws/discussion https://groups.google.com/d/topic/golang-nuts/j5e4bNXF8ws/di...
- xtacy 15y agoI wish such an interface were available for every language out there. They are spread out in many packages, but a client/server model is awesome; it will work irrespective of the editor. Also it's easily maintainable as the dependencies are not tied to the editor.
- vazen 15y agoA while ago, Steve Yegge said he was doing something like this: http://vimeo.com/16069687 http://vimeo.com/16069687 Basically, its a universal system called that plugs into both the compiler and editor to provide autocompletion/refactoring/cross-referencing/etc. to all languages and editors. I haven't heard anything on the status of the project recently, however.
- lemming 15y agoInteresting idea - any feedback on how well it works? How well does it work with a broken AST (which is the normal state for an editor)? Does it re-index automatically if files are touched outside the editor? Does it work with cross-file symbols?