https://github.com/nikolaiser/brichka.nvim
Run code on Databricks from Neovim
https://github.com/nikolaiser/brichka.nvim
databricks neovim plugin python scala sql
Last synced: 2 months ago
JSON representation
Run code on Databricks from Neovim
- Host: GitHub
- URL: https://github.com/nikolaiser/brichka.nvim
- Owner: nikolaiser
- License: mit
- Created: 2026-01-25T14:09:13.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-01-25T20:36:00.000Z (2 months ago)
- Last Synced: 2026-01-26T11:51:01.061Z (2 months ago)
- Topics: databricks, neovim, plugin, python, scala, sql
- Language: Lua
- Homepage:
- Size: 4.88 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# brichka.nvim
Neovim plugin for [brichka](https://github.com/nikolaiser/brichka) - run code on Databricks clusters directly from your editor.
## Prerequisites
* [brichka CLI](https://github.com/nikolaiser/brichka) installed
* [visidata](https://www.visidata.org/) installed (default table rendering)
* Authenticated [databricks-cli](https://github.com/databricks/cli)
## Installation
### Lazy.nvim
```lua
{
"nikolaiser/brichka.nvim",
dependencies = {
"folke/snacks.nvim", -- Used for the default renderers
},
opts = {},
keys = {
{
"bs",
function()
require("brichka.cluster").select()
end,
desc = "Brichka select cluster",
},
{
"br",
function()
require("brichka.run").run(vim.api.nvim_buf_get_lines(0, 0, -1, false), vim.bo.filetype)
end,
desc = "Brichka run current buffer",
},
},
}
```
## Usage
1. **Select a cluster for the current working directory**: `bs` - Opens a list of available Databricks clusters
2. **Run code**: `br` - Executes the current buffer on the selected cluster
The plugin automatically detects the file type and runs it with the appropriate language (SQL, Scala, Python, R).
## Configuration
Default configuration:
```lua
{
cmd = {
brichka = "brichka", -- Path to brichka executable
},
ui = {
icons = {
cluster = {
running = "🟢",
pending = "🔵",
restarting = "♻️",
resizing = "⚙️",
terminating = "🔻",
terminated = "🔴",
error = "⚠️",
unknown = "❔",
},
},
render = {
table = function(path)
Snacks.terminal("vd --wrap " .. path, { win = { position = "bottom" } })
end,
text = function(value)
Snacks.win({ text = value, width = 0.6, height = 0.6 })
end,
error = function(message, cause)
Snacks.win({ text = message, width = 0.6, height = 0.6 })
end,
},
},
run = {
start = false, -- Auto-start cluster if stopped
init = false, -- Auto create shared execution context (notebook mode)
spinner = true, -- Show spinner while executing
},
}
```
Override any options in your `opts` table.