Oni: [Feature request] Go to Definition

Created on 14 Jun 2018  路  7Comments  路  Source: onivim/oni

Oni Version: 0.3.4
Neovim Version (Linux only): 0.3.0
Operating System: Arch

In VSCode you can go directly to the definition of a symbol in some languages such as TypeScript. You can find a short description and screenshot of this feature here.

As far as I can tell this isn't yet supported in Oni. I'd really love for it to be implemented! Cheers :smiley:

All 7 comments

Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.

Hey!

Oni does that have this (when the LSP supports it, so TS/JS works out the box).
By default its bound to F12, and its the command pallete as well, which is Ctrl-Shift-P.

Also works with pyls for Python.
gd also triggers the feature (and is easy to remember).

Closing, but if you are not satisfied with the answers, please reopen.

Cheers :)

Thanks guys!

My only query is whether there's any way to make it open the definition in a new tab?

The vim only way to trigger this is by <C-]>, if you have the tags ran for the current file.

I wonder if there's a way to remap this keybinding for a specific file if a LSP with Go to definition feature is enabled.

This way I would keep using ctags if there's no LSP and use an improved version is there's a LSP, and would not have to learn a new keybinding.

My only query is whether there's any way to make it open the definition in a new tab?

Currently I don't think so, though it should be simple enough to change / add an option for it if needed?

My only query is whether there's any way to make it open the definition in a new tab?

Currently I don't think so, though it should be simple enough to change / add an option for it if needed?

@SamHH Alternatively, after inspecting the definition you can type <C-^> to get back to the previous file.

Was this page helpful?
0 / 5 - 0 ratings