Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
fd44862
feat(docs): change schema url in examples to getkulala.net domain
gorillamoe Dec 8, 2025
cca2553
fix(parser): parse headers after script processing
YaroSpace Dec 16, 2025
8ecb308
sync main
YaroSpace Dec 16, 2025
252430d
fix: typo on "find request" window (#791)
pvskp Dec 21, 2025
4613db1
fix(import): allow run/import of vars only files and requests
YaroSpace Dec 24, 2025
e4980d8
fix(lsp): remove autopairs workaround (#792)
igorlfs Dec 24, 2025
4be7acb
fix(treesitter): make compatible with nvim-treesitter#main
YaroSpace Dec 24, 2025
a0c48a8
feat(xmas): Ho, ho, ho!
YaroSpace Dec 24, 2025
7b17872
update ci images/scripts (#795)
YaroSpace Dec 25, 2025
667ad4b
sync main
YaroSpace Dec 25, 2025
1e3f2c1
feat: remove nvim-treesitter dependency for tree-sitter features (#797)
mrcjkb Jan 4, 2026
ce30e35
fix(parser): show default headers in Inspect
YaroSpace Jan 4, 2026
1cd4959
fix(lsp): do not query requests with no url
YaroSpace Jan 6, 2026
c232fe3
fix(parser): trim whitepspace from {{ vars }}
YaroSpace Jan 6, 2026
f1a55eb
chore: add PR template
YaroSpace Jan 6, 2026
97c534a
fix(treesitter): update parser setup logic to account for external
YaroSpace Jan 6, 2026
4190b9c
fix(xmas): add grinch mode
YaroSpace Jan 6, 2026
f598d46
feat(scripts): allow deep object access via dot notation (#805)
gorillamoe Jan 8, 2026
b7325a6
fix(ui): locally set window options (#806)
igorlfs Jan 9, 2026
d6c036c
feat(parser): infer content-type from inlined files
YaroSpace Jan 10, 2026
a4cd0f1
docs: update
YaroSpace Jan 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## Description

Briefly describe what this PR does

> [!NOTE]
> Please open your PR against `develop` branch. It will merged into develop and in ~5-7 days merged into main
as part of `Weekly updates PR`.

## Type of Change

- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Refactoring
- [ ] Tree-sitter grammar change

## Checklist

- [ ] I have read the [CONTRIBUTING.md](../CONTRIBUTING.md) guidelines
- [ ] Code follows the project style (run `./scripts/lint.sh check-code`)
- [ ] Tests pass locally (`make test`)
- [ ] Documentation is updated (if applicable)
- [ ] Docs follow the style guide (run `./scripts/lint.sh check-docs`)

### If this PR includes tree-sitter grammar changes:

- [ ] Updated version in `lua/tree-sitter/tree-sitter.json`
- [ ] Built tree-sitter (`tree-sitter generate && tree-sitter build`)
- [ ] Verified no parse errors in HTTP files
- [ ] Did NOT auto-update tree snapshots (only update when explicitly requested)

## Related Issues

Link any related issues: Fixes #123, Closes #456
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
### Enhancement: add `Custom Headers` to Oauth2 auth requests in `Auth Config` [Authentication](usage/authentication.md)
### Enhancement: `http-client.env.json` and `http-client.private.env.json` files will be searched in parent directories and merged [Dotenv and http-client.env.json support](usage/dotenv-and-http-client.env.json-support.md)
### Enhancement: share headers and post request scripts in Shared blocks [Shared blocks](usage/shared-blocks.md)
### Enhancement: support using `kulala_http` parser without `nvim-treesitter`, i.e. installed by Nix.
### Enhancement: support `dot` notation in accessing deep objects from `JS` scripts [JS](scripts/request-reference.md)

## Version 5.3.3

Expand Down
4 changes: 3 additions & 1 deletion docs/docs/scripts/client-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Variables are persisted across script runs and Neovim restarts.

```javascript
client.global.set("SOME_TOKEN", "123");
client.global.set("SOME.DEEP.VAR", "123");
```

## client.global.get
Expand All @@ -19,7 +20,8 @@ Get a variable.
Variables are persisted across script runs and Neovim restarts.

```javascript
client.log(client.global.get("SOME_TOKEN"));
client.global.get("SOME_TOKEN");
client.global.get("SOME.DEEP.VAR");
```

## client.log
Expand Down
5 changes: 3 additions & 2 deletions docs/docs/scripts/request-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ Get a request variable.
Request variables are only available for the duration of the request.

```javascript
client.log(request.variables.get("SOME_TOKEN"));
request.variables.get("SOME_TOKEN");
request.variables.get("SOME.DEEP.VAR");
```

## request.variables.set
Expand All @@ -20,7 +21,7 @@ Request variables are only available for the duration of the request.

```javascript
request.variables.set("SOME_TOKEN, "123");
client.log(request.variables.get("SOME_TOKEN"));
request.variables.set("SOME.DEEP.VAR, "123");
```

## request.body.getRaw
Expand Down
8 changes: 7 additions & 1 deletion lua/kulala/cmd/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ local function request_names()
get_document()

vim.iter(cache.requests):each(function(request)
if not request.name then return end

local file = vim.fs.basename(request.file)
local short_name = request.name:sub(1, url_len)
table.insert(items, make_item(short_name, file, kind, request.name, request.body, request.name))
Expand All @@ -128,6 +130,8 @@ local function request_urls()
get_document()

vim.iter(cache.requests):each(function(request)
if not request.url then return end

local url = request.url:gsub("^https?://", "")

if not vim.tbl_contains(unique, url) then
Expand Down Expand Up @@ -321,7 +325,7 @@ local function graphql()
return state.current_line >= r.start_line - 1 and state.current_line <= r.end_line - 1
end)

if not request then return {} end
if not request or not request.url then return {} end

local schema_name = request.url
if schema_name:find("{{") then
Expand Down Expand Up @@ -571,6 +575,8 @@ local function get_symbols()
get_document()

vim.iter(cache.requests):each(function(request)
if not request.url then return end

local cnum = 0
local line = request.show_icon_line_number - 2

Expand Down
2 changes: 2 additions & 0 deletions lua/kulala/config/defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ local M = {
end,
},
},

grinch_mode = false, -- disable Xmas greetings
},

lsp = {
Expand Down
102 changes: 2 additions & 100 deletions lua/kulala/config/init.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
local Fs = require("kulala.utils.fs")
local Logger = require("kulala.logger")
local Parser = require("kulala.config.parser")
local defaults = require("kulala.config.defaults")
local keymaps = require("kulala.config.keymaps")

Expand Down Expand Up @@ -38,103 +37,6 @@ local set_autocomands = function()
})
end

local function get_parser_ver(parser_path)
local ts = Fs.read_json(parser_path .. "/tree-sitter.json") or {}
return ts.metadata and ts.metadata.version
end

local function setup_treesitter_main()
local Db = require("kulala.db")

local ts_config = require("nvim-treesitter.config")
local parser_path = Fs.get_plugin_path { "..", "tree-sitter" }

local install_dir = vim.fs.joinpath(vim.fn.stdpath("data"), "site")
vim.opt.rtp:prepend(install_dir)

local function register_parser_config()
require("nvim-treesitter.parsers").kulala_http = {
install_info = {
path = parser_path,
generate = false,
generate_from_json = false,
queries = "queries/kulala_http",
},
}
end

vim.api.nvim_create_autocmd("User", {
pattern = "TSUpdate",
callback = register_parser_config,
})

register_parser_config()
vim.opt.rtp:append(parser_path) -- make kulala_http queries available

if
vim.tbl_contains(ts_config.get_installed("parsers"), "kulala_http")
and Db.settings.parser_ver == get_parser_ver(parser_path)
then
return vim.treesitter.language.register("kulala_http", { "http", "rest" })
end

require("nvim-treesitter").install({ "kulala_http" }):wait(10000)

if vim.tbl_contains(ts_config.get_installed("parsers"), "kulala_http") then
Db.settings:write { parser_ver = get_parser_ver(parser_path) }
vim.treesitter.language.register("kulala_http", { "http", "rest" })
else
Logger.error("Failed to install kulala_http parser. Please check your nvim-treesitter setup.")
end
end

local function setup_treesitter_master()
local Db = require("kulala.db")

local parsers = require("nvim-treesitter.parsers")
local parser_config = parsers.get_parser_configs()
local parser_path = Fs.get_plugin_path { "..", "tree-sitter" }

vim.opt.rtp:append(parser_path) -- make kulala_http queries available

parser_config.kulala_http = {
install_info = {
url = parser_path,
files = { "src/parser.c" },
generate_requires_npm = false,
requires_generate_from_grammar = false,
},
filetype = "http",
}

if parsers.has_parser("kulala_http") and Db.settings.parser_ver == get_parser_ver(parser_path) then
return vim.treesitter.language.register("kulala_http", { "http", "rest" })
end

require("nvim-treesitter.install").commands.TSInstallSync["run!"]("kulala_http")

if parsers.has_parser("kulala_http") then
Db.settings:write { parser_ver = get_parser_ver(parser_path) }
vim.treesitter.language.register("kulala_http", { "http", "rest" })
else
Logger.error("Failed to install kulala_http parser. Please check your nvim-treesitter setup.")
end
end

local function set_kulala_parser()
local parsers = vim.F.npcall(require, "nvim-treesitter.parsers")

if not parsers then
return Logger.warn("Nvim-treesitter not found. Required for syntax highlighting and formatting.")
end

if parsers.get_parser_configs then
setup_treesitter_master()
else
setup_treesitter_main()
end
end

local function set_syntax_hl()
vim.iter(M.options.ui.syntax_hl or {}):each(function(hl, group)
group = type(group) == "string" and { link = group } or group
Expand All @@ -147,7 +49,7 @@ M.setup = function(config)
M.options = vim.tbl_deep_extend("force", M.defaults, M.user_config)

set_legacy_options()
set_kulala_parser()
Parser.set_kulala_parser()
set_syntax_hl()
set_autocomands()

Expand Down
Loading