From 8ff6ecb9f9f0d401a9903af59129778891d49826 Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Sat, 9 Mar 2024 16:45:49 +0000 Subject: [PATCH 1/2] feat: Updated version.txt --- version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.txt b/version.txt index 9084fa2..b2de557 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.1.0 +1.1.0 - Add treesitter support From 578921ab8d1f1475a74d031c3d2f8ac057e1490e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 9 Mar 2024 16:45:58 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .all-contributorsrc | 32 ++------- .github/ISSUE_TEMPLATE/sweep-template.yml | 2 +- .luarc.json | 11 +-- CHANGELOG.md | 84 +++++++++++------------ README.md | 2 + cspell.json | 13 +--- lua/hurl/health.lua | 9 ++- lua/hurl/http_utils.lua | 4 +- renovate.json | 4 +- sweep.yaml | 4 +- 10 files changed, 67 insertions(+), 98 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index a325aa4..5ad0e30 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -3,9 +3,7 @@ "projectOwner": "jellydn", "repoType": "github", "repoHost": "https://github.com", - "files": [ - "README.md" - ], + "files": ["README.md"], "imageSize": 100, "commit": true, "commitConvention": "angular", @@ -15,58 +13,42 @@ "name": "Dung Duc Huynh (Kaka)", "avatar_url": "https://avatars.githubusercontent.com/u/870029?v=4", "profile": "https://productsway.com/", - "contributions": [ - "code", - "doc" - ] + "contributions": ["code", "doc"] }, { "login": "cenk1cenk2", "name": "Cenk Kılıç", "avatar_url": "https://avatars.githubusercontent.com/u/26881592?v=4", "profile": "https://cenk.kilic.dev/", - "contributions": [ - "code", - "doc" - ] + "contributions": ["code", "doc"] }, { "login": "andrevdm", "name": "Andre Van Der Merwe", "avatar_url": "https://avatars.githubusercontent.com/u/74154?v=4", "profile": "http://www.andrevdm.com", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "skoch13", "name": "Sergey Kochetkov", "avatar_url": "https://avatars.githubusercontent.com/u/29177689?v=4", "profile": "https://github.com/skoch13", - "contributions": [ - "doc", - "code" - ] + "contributions": ["doc", "code"] }, { "login": "rbingham", "name": "rbingham", "avatar_url": "https://avatars.githubusercontent.com/u/7032804?v=4", "profile": "https://github.com/rbingham", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "hsanson", "name": "Horacio Sanson", "avatar_url": "https://avatars.githubusercontent.com/u/900716?v=4", "profile": "http://www.allm.net", - "contributions": [ - "code", - "doc" - ] + "contributions": ["code", "doc"] } ], "contributorsPerLine": 7, diff --git a/.github/ISSUE_TEMPLATE/sweep-template.yml b/.github/ISSUE_TEMPLATE/sweep-template.yml index 98811de..09212ab 100644 --- a/.github/ISSUE_TEMPLATE/sweep-template.yml +++ b/.github/ISSUE_TEMPLATE/sweep-template.yml @@ -1,5 +1,5 @@ name: Sweep Issue -title: 'Sweep: ' +title: "Sweep: " description: For small bugs, features, refactors, and tests to be handled by Sweep, an AI-powered junior developer. labels: sweep body: diff --git a/.luarc.json b/.luarc.json index c32c083..da8138e 100644 --- a/.luarc.json +++ b/.luarc.json @@ -1,9 +1,4 @@ { - "diagnostics.globals": [ - "describe", - "it" - ], - "diagnostics.disable": [ - "undefined-field" - ] -} \ No newline at end of file + "diagnostics.globals": ["describe", "it"], + "diagnostics.disable": ["undefined-field"] +} diff --git a/CHANGELOG.md b/CHANGELOG.md index d90f542..dae3c57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,62 +2,58 @@ ## [1.1.0](https://github.com/jellydn/hurl.nvim/compare/v1.0.1...v1.1.0) (2024-03-09) - ### Features -* Add treesitter support ([#103](https://github.com/jellydn/hurl.nvim/issues/103)) ([6a16d4f](https://github.com/jellydn/hurl.nvim/commit/6a16d4f9d8b6bc488f9a6bfdf62c204dd80fed8c)) +- Add treesitter support ([#103](https://github.com/jellydn/hurl.nvim/issues/103)) ([6a16d4f](https://github.com/jellydn/hurl.nvim/commit/6a16d4f9d8b6bc488f9a6bfdf62c204dd80fed8c)) ## [1.0.1](https://github.com/jellydn/hurl.nvim/compare/v1.0.0...v1.0.1) (2024-03-01) - ### Bug Fixes -* add null check for result before call save log ([b1c4516](https://github.com/jellydn/hurl.nvim/commit/b1c4516c7dbd45fb8cc80e1c87d088155d1b53eb)), closes [#89](https://github.com/jellydn/hurl.nvim/issues/89) +- add null check for result before call save log ([b1c4516](https://github.com/jellydn/hurl.nvim/commit/b1c4516c7dbd45fb8cc80e1c87d088155d1b53eb)), closes [#89](https://github.com/jellydn/hurl.nvim/issues/89) ## 1.0.0 (2024-02-15) - ### Features -* add custom file type for split ([61ccf1f](https://github.com/jellydn/hurl.nvim/commit/61ccf1f40d0aa42bb7b8fd0a9955854d03f620df)) -* add default option for popup mode ([d47c320](https://github.com/jellydn/hurl.nvim/commit/d47c320593e87f0dea4da4704bd29740a80ad49b)) -* add health check ([2a0d40b](https://github.com/jellydn/hurl.nvim/commit/2a0d40b019bf73f01d13fb5d3cc15c0e9bb42a2a)) -* add HurlToggleMode command ([3063bba](https://github.com/jellydn/hurl.nvim/commit/3063bba232a4055e3c74c87ab76f35cee4890181)) -* add new command for run hurl in verbose mode ([460b9f3](https://github.com/jellydn/hurl.nvim/commit/460b9f3223f6c3872ff1565020be3961aec02de4)) -* add new command for show debug info ([321305e](https://github.com/jellydn/hurl.nvim/commit/321305efbd6f6d3077918c36d6c71abe27a393e1)) -* add new command to change the env file ([a6f0f6d](https://github.com/jellydn/hurl.nvim/commit/a6f0f6dc418892a28a6981c9a0f344c5dd150d33)) -* add new option for auto close on lost focus ([2e27b93](https://github.com/jellydn/hurl.nvim/commit/2e27b93e695790761c8490b6a05f6c6441433137)) -* add run to entry command ([9d6fdff](https://github.com/jellydn/hurl.nvim/commit/9d6fdffee0a4b805a025650a8be9bd9ee34e6e74)) -* bind `q` to quit for split mode ([b449389](https://github.com/jellydn/hurl.nvim/commit/b4493893f8884feea8fad960589ea9f99d521f07)) -* clear previous response if buffer still open ([6be36b6](https://github.com/jellydn/hurl.nvim/commit/6be36b6faaafd95def4de0dc7e9baaa8764c63a4)) -* enable folding for popup mode ([2a9bf8f](https://github.com/jellydn/hurl.nvim/commit/2a9bf8fa408c72b2c228f59191559a4e73556376)) -* init hurl.nvim plugin ([f3f615a](https://github.com/jellydn/hurl.nvim/commit/f3f615a5f674bd1a7aaaad24efbf4fc6140cd2dd)) -* init project ([0207117](https://github.com/jellydn/hurl.nvim/commit/020711770e2951b7fe0cf3798e91b8d2b72b7227)) -* introduce new config for env file ([2cef196](https://github.com/jellydn/hurl.nvim/commit/2cef1967d96b0c3184333cf19e183bcf24341c6e)) -* Make env search maintain provided order ([#69](https://github.com/jellydn/hurl.nvim/issues/69)) ([275368b](https://github.com/jellydn/hurl.nvim/commit/275368ba1d47d594b58a759e2da99938b16d6527)) -* notify when hurl is running ([12a5804](https://github.com/jellydn/hurl.nvim/commit/12a5804a2db188a45b3e292bbd8e13cd841191eb)) -* only set buffer option on nightly builds ([c3a4311](https://github.com/jellydn/hurl.nvim/commit/c3a4311567c7dee1ea36e305c2a7bbddb030a9b6)) -* open quickfix if has any error ([029f784](https://github.com/jellydn/hurl.nvim/commit/029f7843123d79960db584fc5124559a079d2f40)) -* port hurl plugin from ray-x/web-tools.nvim ([888bd0f](https://github.com/jellydn/hurl.nvim/commit/888bd0fc18057ba0a4f207895c1bfe9828a65071)) -* send tmp file to quicklist on hurl request ([#11](https://github.com/jellydn/hurl.nvim/issues/11)) ([464f28e](https://github.com/jellydn/hurl.nvim/commit/464f28e60665897f3d320166e5fe025183f83b32)) -* show content on popup ([0ae2711](https://github.com/jellydn/hurl.nvim/commit/0ae2711d86c28dff390bcfdb6439be3b807bdfb3)) -* show error message on qflist ([5d977a2](https://github.com/jellydn/hurl.nvim/commit/5d977a2f33a83eab0eb95e6de8c61fe1841b2319)) -* show response header on popup ([ba04d85](https://github.com/jellydn/hurl.nvim/commit/ba04d8585aca917f2e093c213c2fdc70df8dbd62)) -* support PATCH method ([fba0251](https://github.com/jellydn/hurl.nvim/commit/fba0251e2421d23c70978678d46a9cc764593c0b)) -* support PUT and DELETE method ([2c1b7d2](https://github.com/jellydn/hurl.nvim/commit/2c1b7d2063a47c54c7f30b33af6bf9cce8e8c828)) -* support read vars.env file from test folder ([aea1ca5](https://github.com/jellydn/hurl.nvim/commit/aea1ca53ccdf29deab4c2a840f076ef828404b96)) - +- add custom file type for split ([61ccf1f](https://github.com/jellydn/hurl.nvim/commit/61ccf1f40d0aa42bb7b8fd0a9955854d03f620df)) +- add default option for popup mode ([d47c320](https://github.com/jellydn/hurl.nvim/commit/d47c320593e87f0dea4da4704bd29740a80ad49b)) +- add health check ([2a0d40b](https://github.com/jellydn/hurl.nvim/commit/2a0d40b019bf73f01d13fb5d3cc15c0e9bb42a2a)) +- add HurlToggleMode command ([3063bba](https://github.com/jellydn/hurl.nvim/commit/3063bba232a4055e3c74c87ab76f35cee4890181)) +- add new command for run hurl in verbose mode ([460b9f3](https://github.com/jellydn/hurl.nvim/commit/460b9f3223f6c3872ff1565020be3961aec02de4)) +- add new command for show debug info ([321305e](https://github.com/jellydn/hurl.nvim/commit/321305efbd6f6d3077918c36d6c71abe27a393e1)) +- add new command to change the env file ([a6f0f6d](https://github.com/jellydn/hurl.nvim/commit/a6f0f6dc418892a28a6981c9a0f344c5dd150d33)) +- add new option for auto close on lost focus ([2e27b93](https://github.com/jellydn/hurl.nvim/commit/2e27b93e695790761c8490b6a05f6c6441433137)) +- add run to entry command ([9d6fdff](https://github.com/jellydn/hurl.nvim/commit/9d6fdffee0a4b805a025650a8be9bd9ee34e6e74)) +- bind `q` to quit for split mode ([b449389](https://github.com/jellydn/hurl.nvim/commit/b4493893f8884feea8fad960589ea9f99d521f07)) +- clear previous response if buffer still open ([6be36b6](https://github.com/jellydn/hurl.nvim/commit/6be36b6faaafd95def4de0dc7e9baaa8764c63a4)) +- enable folding for popup mode ([2a9bf8f](https://github.com/jellydn/hurl.nvim/commit/2a9bf8fa408c72b2c228f59191559a4e73556376)) +- init hurl.nvim plugin ([f3f615a](https://github.com/jellydn/hurl.nvim/commit/f3f615a5f674bd1a7aaaad24efbf4fc6140cd2dd)) +- init project ([0207117](https://github.com/jellydn/hurl.nvim/commit/020711770e2951b7fe0cf3798e91b8d2b72b7227)) +- introduce new config for env file ([2cef196](https://github.com/jellydn/hurl.nvim/commit/2cef1967d96b0c3184333cf19e183bcf24341c6e)) +- Make env search maintain provided order ([#69](https://github.com/jellydn/hurl.nvim/issues/69)) ([275368b](https://github.com/jellydn/hurl.nvim/commit/275368ba1d47d594b58a759e2da99938b16d6527)) +- notify when hurl is running ([12a5804](https://github.com/jellydn/hurl.nvim/commit/12a5804a2db188a45b3e292bbd8e13cd841191eb)) +- only set buffer option on nightly builds ([c3a4311](https://github.com/jellydn/hurl.nvim/commit/c3a4311567c7dee1ea36e305c2a7bbddb030a9b6)) +- open quickfix if has any error ([029f784](https://github.com/jellydn/hurl.nvim/commit/029f7843123d79960db584fc5124559a079d2f40)) +- port hurl plugin from ray-x/web-tools.nvim ([888bd0f](https://github.com/jellydn/hurl.nvim/commit/888bd0fc18057ba0a4f207895c1bfe9828a65071)) +- send tmp file to quicklist on hurl request ([#11](https://github.com/jellydn/hurl.nvim/issues/11)) ([464f28e](https://github.com/jellydn/hurl.nvim/commit/464f28e60665897f3d320166e5fe025183f83b32)) +- show content on popup ([0ae2711](https://github.com/jellydn/hurl.nvim/commit/0ae2711d86c28dff390bcfdb6439be3b807bdfb3)) +- show error message on qflist ([5d977a2](https://github.com/jellydn/hurl.nvim/commit/5d977a2f33a83eab0eb95e6de8c61fe1841b2319)) +- show response header on popup ([ba04d85](https://github.com/jellydn/hurl.nvim/commit/ba04d8585aca917f2e093c213c2fdc70df8dbd62)) +- support PATCH method ([fba0251](https://github.com/jellydn/hurl.nvim/commit/fba0251e2421d23c70978678d46a9cc764593c0b)) +- support PUT and DELETE method ([2c1b7d2](https://github.com/jellydn/hurl.nvim/commit/2c1b7d2063a47c54c7f30b33af6bf9cce8e8c828)) +- support read vars.env file from test folder ([aea1ca5](https://github.com/jellydn/hurl.nvim/commit/aea1ca53ccdf29deab4c2a840f076ef828404b96)) ### Bug Fixes -* **ci:** rename secret token for publish doc ([ebd7486](https://github.com/jellydn/hurl.nvim/commit/ebd748605d8a6251a12385fd56b65533d64f29e4)) -* **ci:** setup release version ([c4d1447](https://github.com/jellydn/hurl.nvim/commit/c4d144716f6269e9ab7e45089b38179e6d2e085a)) -* **ci:** upgrade checkout v4 ([c4d1447](https://github.com/jellydn/hurl.nvim/commit/c4d144716f6269e9ab7e45089b38179e6d2e085a)) -* display popup position base on editor ([6951948](https://github.com/jellydn/hurl.nvim/commit/69519488a96e74da67ae3fefc17619a65c1c8c00)) -* remove toc ([b810790](https://github.com/jellydn/hurl.nvim/commit/b8107903944d062d9822cef41b4a4491b2cdea97)) -* send error to qlist and skip showing the result ([6799811](https://github.com/jellydn/hurl.nvim/commit/679981165305a5494ced10016348f703a57bd5db)) -* set highlight for neovim stable ([8317978](https://github.com/jellydn/hurl.nvim/commit/8317978aa439e2506d0f6b2a87c8b674c2bb9ac5)) -* simplify the check for json content type ([e8ad1e5](https://github.com/jellydn/hurl.nvim/commit/e8ad1e50e88e698e3a3a57cbe614a0b510587a1b)) -* support load multi env files ([9443adc](https://github.com/jellydn/hurl.nvim/commit/9443adc0fa54e04fb9e2e35872022a4efa89dea0)) -* support no response on body ([ec4262d](https://github.com/jellydn/hurl.nvim/commit/ec4262d6b6e9169ece39a8cd28405c95d0cb0380)) -* **test:** check command exist ([7b4b23d](https://github.com/jellydn/hurl.nvim/commit/7b4b23d32cabf3a5de777266fa4ea24eb0d499da)) +- **ci:** rename secret token for publish doc ([ebd7486](https://github.com/jellydn/hurl.nvim/commit/ebd748605d8a6251a12385fd56b65533d64f29e4)) +- **ci:** setup release version ([c4d1447](https://github.com/jellydn/hurl.nvim/commit/c4d144716f6269e9ab7e45089b38179e6d2e085a)) +- **ci:** upgrade checkout v4 ([c4d1447](https://github.com/jellydn/hurl.nvim/commit/c4d144716f6269e9ab7e45089b38179e6d2e085a)) +- display popup position base on editor ([6951948](https://github.com/jellydn/hurl.nvim/commit/69519488a96e74da67ae3fefc17619a65c1c8c00)) +- remove toc ([b810790](https://github.com/jellydn/hurl.nvim/commit/b8107903944d062d9822cef41b4a4491b2cdea97)) +- send error to qlist and skip showing the result ([6799811](https://github.com/jellydn/hurl.nvim/commit/679981165305a5494ced10016348f703a57bd5db)) +- set highlight for neovim stable ([8317978](https://github.com/jellydn/hurl.nvim/commit/8317978aa439e2506d0f6b2a87c8b674c2bb9ac5)) +- simplify the check for json content type ([e8ad1e5](https://github.com/jellydn/hurl.nvim/commit/e8ad1e50e88e698e3a3a57cbe614a0b510587a1b)) +- support load multi env files ([9443adc](https://github.com/jellydn/hurl.nvim/commit/9443adc0fa54e04fb9e2e35872022a4efa89dea0)) +- support no response on body ([ec4262d](https://github.com/jellydn/hurl.nvim/commit/ec4262d6b6e9169ece39a8cd28405c95d0cb0380)) +- **test:** check command exist ([7b4b23d](https://github.com/jellydn/hurl.nvim/commit/7b4b23d32cabf3a5de777266fa4ea24eb0d499da)) diff --git a/README.md b/README.md index fd6abbb..aaf6ffb 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,9 @@

+ [![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors-) + [![IT Man - Effortless APIs with Hurl.nvim: A Developer's Guide to Neovim Tooling [Vietnamese]](https://i.ytimg.com/vi/nr_RbHvnnwk/hqdefault.jpg)](https://www.youtube.com/watch?v=nr_RbHvnnwk) diff --git a/cspell.json b/cspell.json index d740418..656c834 100644 --- a/cspell.json +++ b/cspell.json @@ -10,13 +10,6 @@ "addWords": true } ], - "dictionaries": [ - "cspell-tool" - ], - "ignorePaths": [ - "node_modules", - "dist", - "build", - "/cspell-tool.txt" - ] -} \ No newline at end of file + "dictionaries": ["cspell-tool"], + "ignorePaths": ["node_modules", "dist", "build", "/cspell-tool.txt"] +} diff --git a/lua/hurl/health.lua b/lua/hurl/health.lua index dfccdfe..ba6e176 100644 --- a/lua/hurl/health.lua +++ b/lua/hurl/health.lua @@ -23,9 +23,12 @@ M.check = function() end local ts - if xpcall( - function() ts = require("nvim-treesitter-language") end, - function(e) ts = e end) + if + xpcall(function() + ts = require('nvim-treesitter-language') + end, function(e) + ts = e + end) then ok('nvim-treesitter found') if ts.language.get_lang('hurl') == 'hurl' then diff --git a/lua/hurl/http_utils.lua b/lua/hurl/http_utils.lua index 56508dd..643bb25 100644 --- a/lua/hurl/http_utils.lua +++ b/lua/hurl/http_utils.lua @@ -36,7 +36,7 @@ local function find_hurl_entry_positions_in_buffer() local ts = vim.treesitter local node = ts.get_node() - while node and node:type() ~= "entry" do + while node and node:type() ~= 'entry' do node = node:parent() end @@ -52,7 +52,7 @@ local function find_hurl_entry_positions_in_buffer() return { current = r1 + 1, start_line = r1 + 1, - end_line = r2 + 1 + end_line = r2 + 1, } end end diff --git a/renovate.json b/renovate.json index 39a2b6e..4bd832f 100644 --- a/renovate.json +++ b/renovate.json @@ -1,6 +1,4 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "config:base" - ] + "extends": ["config:base"] } diff --git a/sweep.yaml b/sweep.yaml index 785e3fb..a13053a 100644 --- a/sweep.yaml +++ b/sweep.yaml @@ -11,7 +11,7 @@ rules: - "Variable and function names should be meaningful and descriptive." # This is the branch that Sweep will develop from and make pull requests to. Most people use 'main' or 'master' but some users also use 'dev' or 'staging'. -branch: 'main' +branch: "main" # By default Sweep will read the logs and outputs from your existing Github Actions. To disable this, set this to false. gha_enabled: True @@ -21,7 +21,7 @@ gha_enabled: True # Example: # # description: sweepai/sweep is a python project. The main api endpoints are in sweepai/api.py. Write code that adheres to PEP8. -description: '' +description: "" # This sets whether to create pull requests as drafts. If this is set to True, then all pull requests will be created as drafts and GitHub Actions will not be triggered. draft: False