Closed fommil closed 5 years ago
I'm not using CTAGS, but for lightweight imports I'm using: https://github.com/VlachJosef/scala-quick-import
It works like this:
ag
and search for all existing imports in the project which contains that symbol.Drawback: When import for given symbol doesn't exist yet in the project, it won't import anything.
Under the hood it is using ensime's ensime-insert-import
command
@VlachJosef I think it will be nice if we can move ensime-insert-import
and other related functions out of ensime into scala-quick-import
and add the whole thing to scala-mode. ensime
can reuse the functions from scala-mode as needed.
It sounds like this might be part of the whole "sub ensime" package where it has access to .ensime
but not the server. But if it doesn't even need .ensime
then yeah in scala-mode
makes a lot of sense.
If access to .ensime
is needed may be we can update the functionality in ensime, to fallback to ctags when no server is available. With that we can simply use the same keybinding/function, with or without the server running.
although this feature is provided by ensime, I often find myself doing some lightweight coding with just
scala-mode
and my point is on an objectFoo
and I can use ctags to jump toFoo
to recall the package name so I can add it to theimport
section at point or at the top of my file. It seems like this is the sort of thing we could automate.