chore: hurl
This commit is contained in:
parent
ec61e182d8
commit
ba8cd681f4
20
init.lua
20
init.lua
|
|
@ -91,7 +91,7 @@ vim.g.mapleader = ' '
|
||||||
vim.g.maplocalleader = ' '
|
vim.g.maplocalleader = ' '
|
||||||
|
|
||||||
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
||||||
vim.g.have_nerd_font = false
|
vim.g.have_nerd_font = true
|
||||||
|
|
||||||
-- [[ Setting options ]]
|
-- [[ Setting options ]]
|
||||||
-- See `:help vim.o`
|
-- See `:help vim.o`
|
||||||
|
|
@ -314,7 +314,7 @@ require('lazy').setup({
|
||||||
-- Then, because we use the `opts` key (recommended), the configuration runs
|
-- Then, because we use the `opts` key (recommended), the configuration runs
|
||||||
-- after the plugin has been loaded as `require(MODULE).setup(opts)`.
|
-- after the plugin has been loaded as `require(MODULE).setup(opts)`.
|
||||||
|
|
||||||
{ -- Useful plugin to show you pending keybinds.
|
{ -- Useful plugin to show you pending keybinds.
|
||||||
'folke/which-key.nvim',
|
'folke/which-key.nvim',
|
||||||
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
||||||
opts = {
|
opts = {
|
||||||
|
|
@ -395,7 +395,7 @@ require('lazy').setup({
|
||||||
{ 'nvim-telescope/telescope-ui-select.nvim' },
|
{ 'nvim-telescope/telescope-ui-select.nvim' },
|
||||||
|
|
||||||
-- Useful for getting pretty icons, but requires a Nerd Font.
|
-- Useful for getting pretty icons, but requires a Nerd Font.
|
||||||
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
|
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
-- Telescope is a fuzzy finder that comes with a lot of different things that
|
-- Telescope is a fuzzy finder that comes with a lot of different things that
|
||||||
|
|
@ -503,7 +503,7 @@ require('lazy').setup({
|
||||||
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||||
|
|
||||||
-- Useful status updates for LSP.
|
-- Useful status updates for LSP.
|
||||||
{ 'j-hui/fidget.nvim', opts = {} },
|
{ 'j-hui/fidget.nvim', opts = {} },
|
||||||
|
|
||||||
-- Allows extra capabilities provided by blink.cmp
|
-- Allows extra capabilities provided by blink.cmp
|
||||||
'saghen/blink.cmp',
|
'saghen/blink.cmp',
|
||||||
|
|
@ -689,7 +689,7 @@ require('lazy').setup({
|
||||||
local servers = {
|
local servers = {
|
||||||
-- clangd = {},
|
-- clangd = {},
|
||||||
-- gopls = {},
|
-- gopls = {},
|
||||||
-- pyright = {},
|
pyright = {},
|
||||||
-- rust_analyzer = {},
|
-- rust_analyzer = {},
|
||||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||||
--
|
--
|
||||||
|
|
@ -851,9 +851,9 @@ require('lazy').setup({
|
||||||
-- <c-k>: Toggle signature help
|
-- <c-k>: Toggle signature help
|
||||||
--
|
--
|
||||||
-- See :h blink-cmp-config-keymap for defining your own keymap
|
-- See :h blink-cmp-config-keymap for defining your own keymap
|
||||||
preset = 'default',
|
preset = 'enter',
|
||||||
|
|
||||||
-- ['<CR>'] = { 'select_and_accept' },
|
['<CR>'] = { 'accept', 'fallback' },
|
||||||
|
|
||||||
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
|
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
|
||||||
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
|
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
|
||||||
|
|
@ -994,9 +994,9 @@ require('lazy').setup({
|
||||||
-- require 'kickstart.plugins.debug',
|
-- require 'kickstart.plugins.debug',
|
||||||
-- require 'kickstart.plugins.indent_line',
|
-- require 'kickstart.plugins.indent_line',
|
||||||
-- require 'kickstart.plugins.lint',
|
-- require 'kickstart.plugins.lint',
|
||||||
-- require 'kickstart.plugins.autopairs',
|
require 'kickstart.plugins.autopairs',
|
||||||
-- require 'kickstart.plugins.neo-tree',
|
require 'kickstart.plugins.neo-tree',
|
||||||
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
||||||
|
|
||||||
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
||||||
-- This is the easiest way to modularize your config.
|
-- This is the easiest way to modularize your config.
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,64 @@
|
||||||
--
|
--
|
||||||
-- See the kickstart.nvim README for more information
|
-- See the kickstart.nvim README for more information
|
||||||
return {
|
return {
|
||||||
|
{
|
||||||
|
"jellydn/hurl.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
-- Optional, for markdown rendering with render-markdown.nvim
|
||||||
|
{
|
||||||
|
'MeanderingProgrammer/render-markdown.nvim',
|
||||||
|
opts = {
|
||||||
|
file_types = { "markdown" },
|
||||||
|
},
|
||||||
|
ft = { "markdown" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
ft = "hurl",
|
||||||
|
opts = {
|
||||||
|
-- Show debugging info
|
||||||
|
debug = false,
|
||||||
|
-- Show notification on run
|
||||||
|
show_notification = false,
|
||||||
|
-- Show response in popup or split
|
||||||
|
mode = "split",
|
||||||
|
-- Default formatter
|
||||||
|
formatters = {
|
||||||
|
json = { 'jq' }, -- Make sure you have install jq in your system, e.g: brew install jq
|
||||||
|
html = {
|
||||||
|
'prettier', -- Make sure you have install prettier in your system, e.g: npm install -g prettier
|
||||||
|
'--parser',
|
||||||
|
'html',
|
||||||
|
},
|
||||||
|
xml = {
|
||||||
|
'tidy', -- Make sure you have installed tidy in your system, e.g: brew install tidy-html5
|
||||||
|
'-xml',
|
||||||
|
'-i',
|
||||||
|
'-q',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- Default mappings for the response popup or split views
|
||||||
|
mappings = {
|
||||||
|
close = 'q', -- Close the response popup or split view
|
||||||
|
next_panel = '<C-n>', -- Move to the next response popup window
|
||||||
|
prev_panel = '<C-p>', -- Move to the previous response popup window
|
||||||
|
},
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
-- Run API request
|
||||||
|
{ "<leader>A", "<cmd>HurlRunner<CR>", desc = "Run All requests" },
|
||||||
|
{ "<leader>a", "<cmd>HurlRunnerAt<CR>", desc = "Run Api request" },
|
||||||
|
{ "<leader>te", "<cmd>HurlRunnerToEntry<CR>", desc = "Run Api request to entry" },
|
||||||
|
{ "<leader>tE", "<cmd>HurlRunnerToEnd<CR>", desc = "Run Api request from current entry to end" },
|
||||||
|
{ "<leader>tm", "<cmd>HurlToggleMode<CR>", desc = "Hurl Toggle Mode" },
|
||||||
|
{ "<leader>tv", "<cmd>HurlVerbose<CR>", desc = "Run Api in verbose mode" },
|
||||||
|
{ "<leader>tV", "<cmd>HurlVeryVerbose<CR>", desc = "Run Api in very verbose mode" },
|
||||||
|
-- Run Hurl request in visual mode
|
||||||
|
{ "<leader>h", ":HurlRunner<CR>", desc = "Hurl Runner", mode = "v" },
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'AndrewRadev/tagalong.vim',
|
'AndrewRadev/tagalong.vim',
|
||||||
},
|
},
|
||||||
|
|
@ -39,14 +97,45 @@ return {
|
||||||
conform.setup({
|
conform.setup({
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
lua = { 'stylelua' },
|
lua = { 'stylelua' },
|
||||||
typescript = { 'prettierd', 'prettier', 'biome' },
|
python = { 'black', 'flake8' },
|
||||||
typescriptreact = { 'prettierd', 'prettier', 'biome' },
|
typescript = { 'biome', 'prettier' },
|
||||||
javascript = { 'prettierd', 'prettier', 'biome' },
|
typescriptreact = { 'biome', 'prettier' },
|
||||||
javascriptreact = { 'prettierd', 'prettier', 'biome' },
|
javascript = { 'biome', 'prettier' },
|
||||||
|
javascriptreact = { 'biome', 'prettier' },
|
||||||
|
json = { 'biome', 'prettier' },
|
||||||
|
yaml = { 'prettier' },
|
||||||
|
markdown = { 'prettier' },
|
||||||
|
css = { 'biome', 'prettier' },
|
||||||
|
scss = { 'prettier' },
|
||||||
|
html = { 'prettier' },
|
||||||
|
},
|
||||||
|
formatters = {
|
||||||
|
prettier = {
|
||||||
|
-- Use the project's prettier config by looking for it in parent directories
|
||||||
|
cwd = require('conform.util').root_file({
|
||||||
|
'package.json',
|
||||||
|
'.prettierrc',
|
||||||
|
'.prettierrc.json',
|
||||||
|
'.prettierrc.js',
|
||||||
|
'.prettierrc.mjs',
|
||||||
|
'prettier.config.js',
|
||||||
|
'prettier.config.mjs',
|
||||||
|
}),
|
||||||
|
require_cwd = true,
|
||||||
|
},
|
||||||
|
biome = {
|
||||||
|
-- Use the project's biome config by looking for it in parent directories
|
||||||
|
cwd = require('conform.util').root_file({
|
||||||
|
'biome.json',
|
||||||
|
'biome.jsonc',
|
||||||
|
'package.json',
|
||||||
|
}),
|
||||||
|
require_cwd = true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
format_on_save = {
|
format_on_save = {
|
||||||
lsp_fallback = true,
|
lsp_fallback = true,
|
||||||
timeout_ms = 500,
|
timeout_ms = 1500,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -54,7 +143,7 @@ return {
|
||||||
conform.format({
|
conform.format({
|
||||||
lsp_fallback = true,
|
lsp_fallback = true,
|
||||||
async = false,
|
async = false,
|
||||||
timeout_ms = 500,
|
timeout_ms = 1000,
|
||||||
})
|
})
|
||||||
end, { desc = 'Format file or range (in visual mode)' })
|
end, { desc = 'Format file or range (in visual mode)' })
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,16 @@
|
||||||
return {
|
return {
|
||||||
{
|
-- {
|
||||||
'nvim-neo-tree/neo-tree.nvim',
|
-- 'nvim-neo-tree/neo-tree.nvim',
|
||||||
branch = 'v3.x',
|
-- branch = 'v3.x',
|
||||||
dependencies = {
|
-- dependencies = {
|
||||||
'nvim-lua/plenary.nvim',
|
-- 'nvim-lua/plenary.nvim',
|
||||||
'MunifTanjim/nui.nvim',
|
-- 'MunifTanjim/nui.nvim',
|
||||||
'nvim-tree/nvim-web-devicons', -- optional, but recommended
|
-- 'nvim-tree/nvim-web-devicons', -- optional, but recommended
|
||||||
},
|
-- },
|
||||||
lazy = false, -- neo-tree will lazily load itself
|
-- lazy = false, -- neo-tree will lazily load itself
|
||||||
keys = {
|
-- keys = {
|
||||||
{ '<leader>e', ':Neotree toggle<CR>', desc = 'Toggle NeoTree', silent = true },
|
-- { '<leader>e', ':Neotree toggle<CR>', desc = 'Toggle NeoTree', silent = true },
|
||||||
{ '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true },
|
-- { '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true },
|
||||||
},
|
-- },
|
||||||
},
|
-- },
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,15 +11,6 @@ return {
|
||||||
},
|
},
|
||||||
lazy = false,
|
lazy = false,
|
||||||
keys = {
|
keys = {
|
||||||
{ '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true },
|
{ '<leader>e', ':Neotree toggle<CR>', desc = 'Toggle Neotree', silent = true },
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
filesystem = {
|
|
||||||
window = {
|
|
||||||
mappings = {
|
|
||||||
['\\'] = 'close_window',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue