When you ask a question about code, for example where a name is defined or where it is used, DataMind Oda can answer it from the code itself instead of matching text: it puts the question to the language server that handles that kind of file. This page covers the four questions Oda can ask, what the answers look like in the chat, and the limits that apply. For searching files by name and text, see Finding files and text.
Oda asks one of four kinds of question, each about one spot in one file:
goToDefinition). The place where a function, a class or another name is written down.findReferences). Every place the server reports as a use. A search for uses always includes the declaration, so the place the name is defined is among the answers.goToImplementation). For an interface or another abstract name, the places that provide the behaviour behind it.hover). A short description the server keeps for that spot, such as a type or a signature.The names in brackets are the ones the step shows in its title. All four questions only read: they answer, and they cannot change code.
Oda picks the kind that fits your question and asks at a spot it chooses:
LSP findReferences a. ts:3:7. The card opens and folds the way Oda's other search steps do (Step cards in chat).path:line:character, grouped under the file it sits in. A hover answer is text: the description the server keeps for that spot.No results.; for a hover with nothing to show, it reads No hover information. A spot that is not on a name can return nothing even when the name is right beside it.… N more locations omitted (limit 100). The complete set stays in the step's recorded result; the marker only says the shown text stopped early.… locations truncated (limit 16000 characters).Four: where a name is defined, where a name is used, what implements it, and what sits at a spot. All four only read: they answer, and they cannot change code.
Yes. A search for uses always includes the declaration, so the place the name is written down is among the answers.
Both count from 1: the first line of the file is line 1, and the first character of a line is character 1. A place is shown as its file with those two numbers, in the form path:line:character; they are the same numbers Oda asked the question with.
Two possibilities. The spot may not sit on a name, and a position right beside a name can also find nothing; that is not an error. Or the step may fail saying code navigation is unavailable for the file, which means no server covers that kind of file (Language servers).
No hover information. mean?The server has nothing to show at that spot. Not every spot carries a description, and an empty answer is not an error.
… more locations omitted line mean?The list held more than 100 places, so the shown text stops there and the line gives how many were left out. The complete set stays in the step's recorded result.
The shown text is cut at 16,000 characters and a notice says what was cut and the limit. The step's recorded result is not affected by that cut.
Yes: 60 seconds for the whole question, including any wait for the server. If it runs out, the step fails and you can ask again. The limit is fixed and cannot be changed from a chat.
No. Code navigation is read-only: it does not rename, reformat, check for errors or list symbols, and nothing is changed by a code question.
No. It needs the chat's folder, both to read the file from and to give the server a working folder. Pick a folder for the chat first (Workspaces, files and permissions).
They come from the step's title: LSP findReferences a. names the kind of question and the spot it was asked at (the file with its line and character). You do not need these words yourself; ask in your own words.