aboutsummaryrefslogtreecommitdiffstats
path: root/lua/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'lua/plugins')
-rw-r--r--lua/plugins/hurl.lua39
-rw-r--r--lua/plugins/rayso.lua10
-rw-r--r--lua/plugins/spectre.lua7
3 files changed, 4 insertions, 52 deletions
diff --git a/lua/plugins/hurl.lua b/lua/plugins/hurl.lua
deleted file mode 100644
index cd949ee..0000000
--- a/lua/plugins/hurl.lua
+++ /dev/null
@@ -1,39 +0,0 @@
-local IS_DEV = false
-
-return {
- {
- "jellydn/hurl.nvim",
- dir = IS_DEV and "~/Projects/research/hurl.nvim" or nil,
- ft = "hurl",
- dependencies = { "MunifTanjim/nui.nvim", "nvim-treesitter/nvim-treesitter" },
- opts = {
- mode = "split",
- auto_close = false,
- debug = false,
- show_notification = false,
- formatters = {
- json = { "jq" },
- html = {
- "prettier",
- "--parser",
- "html",
- },
- },
- },
- keys = {
- -- Run API request
- { "<leader>rA", "<cmd>HurlRunner<CR>", desc = "Hurl - Run All requests" },
- { "<leader>ra", "<cmd>HurlRunnerAt<CR>", desc = "Hurl - Run Api request" },
- { "<leader>re", "<cmd>HurlRunnerToEntry<CR>", desc = "Hurl -Run Api request to entry" },
- { "<leader>th", "<cmd>HurlToggleMode<CR>", desc = "Hurl - Toggle Mode" },
- { "<leader>rv", "<cmd>HurlVerbose<CR>", desc = "Hurl - Run Api in verbose mode" },
- -- Run Hurl request in visual mode
- { "<leader>rh", ":HurlRunner<CR>", desc = "Hurl Runner", mode = "v" },
- -- Show last response
- { "<leader>rh", "<cmd>HurlShowLastResponse<CR>", desc = "Hurl History", mode = "n" },
- -- Manage variable
- { "<leader>hg", ":HurlSetVariable", desc = "Hurl - Set global variable" },
- { "<leader>hG", "<cmd>HurlManageVariable<CR>", desc = "Hurl - Manage global variable" },
- },
- },
-}
diff --git a/lua/plugins/rayso.lua b/lua/plugins/rayso.lua
deleted file mode 100644
index 8821e47..0000000
--- a/lua/plugins/rayso.lua
+++ /dev/null
@@ -1,10 +0,0 @@
-return {
- {
- "TobinPalmer/rayso.nvim",
- cmd = { "Rayso" },
- keys = {
- { "<leader>cs", "<cmd>Rayso<cr>", desc = "Screenshot code" },
- },
- config = true,
- },
-}
diff --git a/lua/plugins/spectre.lua b/lua/plugins/spectre.lua
index e3840af..4dcc782 100644
--- a/lua/plugins/spectre.lua
+++ b/lua/plugins/spectre.lua
@@ -2,11 +2,12 @@
---@param default_opts table | nil
---@return table
function _G.get_spectre_options(default_opts)
- local Path = require("utils.path")
local opts = default_opts or {}
- if Path.is_git_repo() then
- opts.cwd = Path.get_git_root()
+ -- Check if we're in a git repository and get the root
+ local git_root = vim.fn.system("git rev-parse --show-toplevel 2>/dev/null")
+ if vim.v.shell_error == 0 then
+ opts.cwd = vim.trim(git_root)
end
return opts