Skip to content

Commit b457a86

Browse files
nvim: add hurl
1 parent dd4b2e3 commit b457a86

File tree

4 files changed

+23
-38
lines changed

4 files changed

+23
-38
lines changed

modules/nvim/default.nix

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,20 @@
88
let
99
cfg = config.conf.nvim;
1010

11-
rest-nvim = pkgs.vimUtils.buildVimPlugin {
12-
name = "rest-nvim";
11+
hurl-nvim = pkgs.vimUtils.buildVimPlugin {
12+
name = "hurl-nvim";
1313
src = pkgs.fetchFromGitHub {
14-
owner = "rest-nvim";
15-
repo = "rest.nvim";
16-
rev = "v1.2.1";
17-
sha256 = "sha256-fX4KIazW7iKO157cQdfBoz7g+eyOSQIFje8ZB7SeAx8=";
14+
owner = "smoothprogrammer";
15+
repo = "hurl.nvim";
16+
rev = "refactor-output";
17+
sha256 = "sha256-tSELEjyzbRQoQCn8euVBe9W8UW9ZmLy4JVbcgrNyEtU=";
1818
};
1919
nvimSkipModule = [
20-
"rest-nvim.curl.init"
21-
"rest-nvim.request.init"
22-
"rest-nvim"
20+
"hurl.split"
21+
"hurl.popup"
2322
];
2423
};
2524

26-
# TODO: update config and keymap
27-
# hurl-nvim = pkgs.vimUtils.buildVimPlugin {
28-
# name = "hurl-nvim";
29-
# src = pkgs.fetchFromGitHub {
30-
# owner = "jellydn";
31-
# repo = "hurl.nvim";
32-
# rev = "v2.0.0";
33-
# sha256 = "sha256-rnNkWe4zRTIozBJ8iweQWYX4DH84fsjAch+/kGgAj/g=";
34-
# };
35-
# };
36-
3725
colorscheme = with pkgs.vimPlugins; [
3826
solarized-nvim
3927
];
@@ -61,14 +49,15 @@ let
6149
tree-sitter-css
6250
tree-sitter-javascript
6351
tree-sitter-scheme
52+
tree-sitter-swift
6453
tree-sitter-http
6554
tree-sitter-json
6655
tree-sitter-toml
6756
tree-sitter-yaml
6857
tree-sitter-xml
6958
tree-sitter-markdown
7059
tree-sitter-regex
71-
# hurl
60+
hurl
7261
]
7362
))
7463
nvim-treesitter-context
@@ -96,8 +85,7 @@ let
9685
neotest
9786
neotest-go
9887
nvim-coverage
99-
rest-nvim
100-
# hurl-nvim
88+
hurl-nvim
10189
];
10290

10391
telescope = with pkgs.vimPlugins; [
@@ -158,7 +146,7 @@ in
158146
rustfmt
159147
rust-analyzer
160148
flutter
161-
# hurl
149+
hurl
162150
http-server
163151
];
164152

modules/nvim/lua/minizilla/lsp.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,7 @@ lspconfig.guile_ls.setup {
157157
filetypes = { 'scheme' },
158158
capabilities = capabilities,
159159
}
160+
161+
lspconfig.sourcekit.setup {
162+
capabilities = capabilities,
163+
}

modules/nvim/lua/minizilla/telescope.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ telescope.setup {
4141
'--smart-case', '--follow', '--hidden', '--no-ignore',
4242
'-g', '!**/.git/*',
4343
'-g', '!**/.direnv/*',
44+
'-g', '!**/.devbox/*',
4445
'-g', '!**/.worktree/*',
4546
'-g', '!**/node_modules/*',
4647
'-g', '!**/target/*',
@@ -86,7 +87,6 @@ telescope.load_extension('fzf')
8687
telescope.load_extension('manix')
8788
telescope.load_extension('dap')
8889
telescope.load_extension('git_worktree')
89-
telescope.load_extension('rest')
9090

9191
local nmap = Lib.keymapper('n', { silent = true })
9292
nmap('<C-p>', builtin.find_files)
@@ -97,4 +97,3 @@ nmap('<Leader>fo', builtin.vim_options)
9797
nmap('<Leader>fk', builtin.keymaps)
9898
nmap('<Leader>fg', extensions.live_grep_args.live_grep_args)
9999
nmap('<Leader>fn', extensions.manix.manix)
100-
nmap('<Leader>en', extensions.rest.select_env)

modules/nvim/lua/minizilla/test.lua

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
local neotest = require('neotest')
22
local coverage = require('coverage')
3-
local rest_nvim = require('rest-nvim')
4-
-- local hurl = require('hurl')
3+
local hurl = require('hurl')
54

65
coverage.setup {
76
commands = false,
@@ -27,7 +26,7 @@ vim.api.nvim_create_autocmd('ColorScheme', {
2726
neotest.setup {
2827
adapters = {
2928
require('neotest-go') {
30-
args = { "-coverprofile=" .. vim.fn.getcwd() .. "/coverage.out" },
29+
args = { '-coverprofile=' .. vim.fn.getcwd() .. '/coverage.out' },
3130
},
3231
},
3332
consumers = {
@@ -40,20 +39,15 @@ neotest.setup {
4039
},
4140
}
4241

43-
rest_nvim.setup {
44-
result = {
45-
show_curl_command = true,
46-
}
42+
hurl.setup {
43+
env_file = { '.env' },
4744
}
4845

49-
-- hurl.setup {
50-
-- env_file = { '.env' },
51-
-- }
52-
5346
local nmap = Lib.keymapper('n', { silent = true })
5447
nmap('<Leader>tt', function() neotest.run.run(vim.fn.expand('%:h')) end, '[t]es[t]')
5548
nmap('<Leader>tS', neotest.run.stop, '[t]est [S]top')
5649
nmap('<Leader>to', neotest.output.open, '[t]est [o]pen')
5750
nmap('<Leader>ts', neotest.summary.toggle, '[t]est [s]ummary')
5851
nmap('<Leader>tc', coverage.summary, '[t]est [c]overage')
59-
nmap('<Leader>re', '<Plug>RestNvim', 'run http [re]quest')
52+
nmap('<Leader>re', '<Cmd>HurlRunnerAt<CR>', 'run http [re]quest')
53+
nmap('<Leader>rl', '<Cmd>HurlShowLastResponse<CR>', 'show http [r]equest [l]ast response')

0 commit comments

Comments
 (0)