Pooka can now tell your editor where a name came from. It can also point out several mistakes in an unsaved file, which is handy when you have made several.
The language server ships with Pooka 0.4.0. The editor starts it with pooka lsp. The editor support guide covers Zed and VS Code, with setup links for Neovim and Emacs.
Follow a name
Put the cursor on read in item.read() and use Go to Definition.
module main
class Book {
read() -> Int {
42
}
}
pages(item: Book) -> Int {
item.read()
}
The jump lands on Book.read. For an inherited method it lands on the class that declares it. The same command follows local bindings through shadowing and imports into available dependency source. You can move a declaration in another open buffer and jump to its new line before saving either file.
While you type
The server shows errors and warnings from unsaved edits, gives the editor a document outline, and uses the Pooka formatter. Enable format on save in your editor if you want it to tidy up as you go.
The server checks dependencies offline. If it asks for a package, run pooka deps download at the project root. There are improvements at the terminal too. The compiler gathers more recoverable diagnostics in a failed build and reuses more work between builds.