Closed franksl closed 2 weeks ago
Did you run
:TSInstall http
And after that in the file you're at :set ft=http
?
There is an automatic way of doing it like this: https://kulala.mwco.app/#/requirements?id=optional-requirements
You're right, thanks! I skipped the requirements section in the docs, hoping to find the full procedure in the Install section, my bad. The http call now starts but it ignores my .env file. I put the .env in the same directory as the .http file, is this correct? Thanks, Frank
It is indeed correct. Can you share your config with me and obfuscate sensitive information?
By config, I mean the http file and the .env filw
Sure, the .env file is as simple as this:
BASEURL=https://mydomain.api.com/v2
USERNAME=myusername
PASSWORD=mypwd
I first tried this kind of http file:
POST {{BASEURL}}/api/my/login
Content-Type:application/json
{
"username": "{{USERNAME}}",
"password": "{{PASSWORD}}"
}
It seems to make the call but I don't understand which values are being used, is there a way to get the full call detail?
is there a way to get the full call detail?
Yes, set debug = true in the options table in the kulala.setup function.
The request will be stored in your data dir in nvim/tmp/kulala/request.txt
On my machine it points to $HOME/.local/share/nvim/tmp/kulala/request.txt
By looking at the request.txt it seems that only the {{USERNAME}} variable was replaced, the other ones are still displayed as placeholders, Frank
Will take a look when I'm back home. Will take about 3hrs I guess.
I published v1.6.1
and this is working for me now:
POST https://httpbin.org/post HTTP/1.1
content-type: application/json
accept: application/json
{
"username": "{{USERNAME}}",
"password": "{{PASSWORD}}"
}
dotenv
USERNAME=gorillamoe
PASSWORD=xxxxxxxxxxxxxxx=yyyyy1
Hi,
Thanks a lot for your support!
I tried last version but when I run I get this:
Thanks
did you call kulala.setup()
in your plugin manager of choice?
Yes, my actual Lazy config is:
return {
{
'mistweaverco/kulala.nvim',
lazy = false,
config = function()
local kulala = require('kulala')
kulala.setup({
debug = true,
additional_curl_options = {"-v"}
})
vim.keymap.set('n', "<leader>rr", kulala.run)
end
}
}
Perfect, thanks, can you try v1.6.2
It gives me the same error... :(
Aaaah, I think the additional_curl_options = {"-v"}
setup option is causing this.
Can you try removing it?
If I add the verbose flag in my setup, I get like 3mio errors :see_no_evil:
I left setup() with no parameters but the error still perists..
Your :lua vim.print(require("kulala.globals").VERSION)
says 1.6.1
and you're at least on nvim 0.10.0
right?
The command says 1.6.2 and my version is 0.10.0, Thanks
I'm running out of ideas, can you try v2.0.1 and see if it works?
Hi, sorry for the late response, still have the same error with 2.3.0... I'll try rewriting my tests..
Can you try the companion tool https://github.com/mistweaverco/kulala-fmt
Maybe this helps 🤷🏾
Any updates here?
Hi, I just installed this plugin as a replacement for the discontinued rest.nvim. Whenever I try to run a call on a simple http file I get this error:![image](https://github.com/mistweaverco/kulala.nvim/assets/484004/fcfcb843-65cc-40e1-ab9d-591ab4d753e7)
I tried reinstalling almost everything but with no success, Thanks, Franck