Kami0.2

Changes
42
Areas
6
Since 0.1
3 days

A native formatter with IntelliJ code styles, a Database view for SQLite and PostgreSQL, and Git submodules.

Highlights

Native code formatting
Kami formats JSON and CSS with its own IntelliJ-style engine, from Reformat Code (⌥⌘L) or on save, with no language server needed.
IntelliJ code style settings
A new Code Style tab holds per-language options, layered from defaults through user and workspace settings up to .editorconfig, and can import a project’s existing .idea scheme.
Database view
Add SQLite and PostgreSQL data sources, browse their schemas, and run SQL in a console with a scrolling result grid. Open it with ⌥⌘T.
Git submodules
Submodules show up in the Git view as their own rows, with a real diff, init and update actions, and a way to open one as its own repository.

Code formatting

11 changes
  • Reformat Code (⌥⌘L), Reformat Code with options (⇧⌥⌘L) and Auto-Indent Lines (⌃⌥I) use IntelliJ’s shortcuts in every keymap preset.
  • The Reformat Code dialog formats the whole file, the selection, or only the changed lines, and has a “Do not keep line breaks” option. Changed lines are reformatted in one step, so a single undo reverts it.
  • JSON and CSS format on save with the built-in formatter. A per-language formatter setting sends a language back to its language server, or turns formatting off.
  • Long lines wrap at the right margin, and wrapped lists line up with their first member.
  • @formatter:off / @formatter:on markers and “do not format” file patterns leave code untouched. Reformatting an excluded file says so instead of doing nothing silently.
  • A reformat that changes nothing does not dirty the buffer or add an undo step.
  • A file keeps its own line endings unless the code style, .idea scheme or .editorconfig sets one, so formatting a CRLF file no longer rewrites every line.
  • Typing, Tab, Enter and block indent use the indent the code style sets for that file, including .editorconfig, in every editor and split.
  • Fixed formatting losing parts of CSS values such as the number in 1px or the digits of #fff, and “Do not keep line breaks” merging CSS selectors.
  • Fixed wrapping stopping early on comma-separated lists or after one unbreakable line, and formatting of the wrong range when a selection followed non-ASCII text.
  • Formatting files with many long lines no longer stalls ⌘S.

Settings

5 changes
  • New Code Style tab, with options grouped as IntelliJ groups them and searchable like every other setting.
  • Code style is resolved per language, layered from defaults, user settings, workspace settings and .editorconfig, including IntelliJ’s ij_ properties.
  • Import from .idea reads a project’s IntelliJ code style into Kami’s; anything it cannot map is listed as comments in the file it writes.
  • The per-row reset arrow is gone; ⇧⌘⌫ still resets the selected row.
  • New database settings for the result page size and how much of a schema to load.

Database view

15 changes
  • A new Database surface beside the Editor and Git views, opened with ⌥⌘T, the command palette, or View ▸ Database View.
  • Add a data source for SQLite or PostgreSQL with a name, host, port, database or file path, user, default schema and schemas to load. MySQL and SQL Server are listed but not yet supported.
  • Passwords can come from the macOS keychain, an environment variable, a command, or a prompt each session. The password field is masked, and keychain access runs in the background so the window never freezes on it.
  • Test Connection checks a source before you save it and shows the server version.
  • Save a source to your user settings or to the workspace.
  • Mark a source read-only to stop accidental writes; PostgreSQL and SQLite enforce it on the server side too.
  • The explorer tree shows schemas, tables, views and columns with PK, FK, NN and IX badges, and a dot for connected sources. It draws from a cached catalog before anything connects.
  • Large databases load only object names automatically; full detail loads for smaller ones.
  • Right-click a source to refresh, edit or delete it. ⇧⌘R refreshes every connected source.
  • Each source gets a SQL console backed by a real editor with highlighting and multi-caret editing; it is saved as a .sql file you can also open as a regular tab.
  • Run the statement at the caret with ⌘↵, the whole script with ⇧⌘↵, and cancel with ⌘. or the Cancel/Disconnect button.
  • Switching between sources keeps what you typed in each console.
  • Results appear in a virtualised grid that scrolls in both directions, with NULL shown distinctly from an empty string, plus an Output tab that logs each run.
  • Fetch All loads the rest of a paged result, and is only offered when it is safe to re-run the query.
  • A trailing comment after the last statement is no longer run as a statement of its own.

Git view

5 changes
  • Submodules appear in their own Submodules section, with badges for moved, dirty and not initialized.
  • A changed submodule shows which commit its pointer moved from and to, instead of an empty diff.
  • Init, update and update --remote a submodule from its menu, or open it as the repository the view shows, with a breadcrumb back.
  • The editor’s change gutter now works for files under symlinked paths, in submodules and in nested repositories, where tracked files used to show as fully added.
  • Gutter change marks sit beside the code, and deletions show as a small wedge rather than looking like additions.

Search and navigation

1 change
  • Search Everywhere colors changed files by their git status, so the one you were just editing stands out.

App

1 change
  • Releases ship as a GitHub release with a drag-to-install DMG.