aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorAriel D'Alessandro <dalessandro.ariel@gmail.com>2023-01-31 22:49:54 +0100
committerAriel D'Alessandro <dalessandro.ariel@gmail.com>2023-01-31 22:49:54 +0100
commit06e2581cf8ee20470a27aa2e8cb203cd133a01ea (patch)
treee40480c7394f1088c49287ca9757ef73cda0563d /lua
parent669561e21073e6efafddda25ba3ace69fb43819e (diff)
downloadnvim-conf-06e2581cf8ee20470a27aa2e8cb203cd133a01ea.tar.gz
nvim-conf-06e2581cf8ee20470a27aa2e8cb203cd133a01ea.zip
fix: actions, plugins tests
Diffstat (limited to 'lua')
-rw-r--r--lua/alpha/scratchs/laravel.lua16
-rw-r--r--lua/alpha/telescope/actions.lua16
-rw-r--r--lua/plugins/fugitive.lua1
-rw-r--r--lua/plugins/laravel.lua2
-rw-r--r--lua/plugins/lazygit.lua4
-rw-r--r--lua/plugins/overseer.lua5
-rw-r--r--lua/plugins/todo-comments.lua2
7 files changed, 28 insertions, 18 deletions
diff --git a/lua/alpha/scratchs/laravel.lua b/lua/alpha/scratchs/laravel.lua
index a0f0de7..753cc7b 100644
--- a/lua/alpha/scratchs/laravel.lua
+++ b/lua/alpha/scratchs/laravel.lua
@@ -14,6 +14,18 @@
--
-- Problem when I switch project sail is runnin in another one
--
-local artisan = R "laravel.artisan"
+-- local artisan = R "laravel.artisan"
+--
+-- P(artisan.commands(true))
+
+-- local keys = vim.api.nvim_replace_termcodes("<c-c>", true, false, true)
+-- vim.api.nvim_chan_send(63, keys)
+-- vim.cmd([[call chansend(23, "\<c-c>")]])
+
+-- P(require("laravel.app").jobs)
-P(artisan.commands(true))
+local keys = vim.api.nvim_replace_termcodes("<c-c>", true, false, true)
+-- foreach open task do this
+for _, job in ipairs(require("laravel.app").jobs) do
+ vim.api.nvim_chan_send(job, keys)
+end
diff --git a/lua/alpha/telescope/actions.lua b/lua/alpha/telescope/actions.lua
index e4bbd8e..abd3381 100644
--- a/lua/alpha/telescope/actions.lua
+++ b/lua/alpha/telescope/actions.lua
@@ -98,12 +98,7 @@ M.disable_plugin = function(prompt_bufnr)
local parsers = require "nvim-treesitter.parsers"
local parser = parsers.get_parser(bufnr)
- if type(parser:parse()) ~= "table" then
- vim.notify("Expected table but got something else ???", vim.log.levels.ERROR, {})
- P(parser:parse())
- return
- end
- local tree = unpack(parser:parse())
+ local tree = parser:parse()[1]
local disabled_stm_node = get_disable_stm_node(bufnr, tree)
if disabled_stm_node ~= nil then
@@ -131,7 +126,7 @@ M.disable_plugin = function(prompt_bufnr)
end_line = start_line + 1
end
- vim.api.nvim_buf_set_lines(bufnr, start_line, end_line, false, { " enabled = false," })
+ vim.api.nvim_buf_set_lines(bufnr, start_line, end_line, false, { " enabled = false," })
vim.notify("Plugin " .. entry[1] .. " Disabled", vim.log.levels.INFO, {})
actions.close(prompt_bufnr)
vim.api.nvim_buf_call(bufnr, function()
@@ -148,12 +143,7 @@ M.enable_plugin = function(prompt_bufnr)
local parsers = require "nvim-treesitter.parsers"
local parser = parsers.get_parser(bufnr)
- if type(parser:parse()) == "table" then
- vim.notify("Expected number but got table ???", vim.log.levels.ERROR, {})
- P(parser:parse())
- return
- end
- local tree = unpack(parser:parse())
+ local tree = parser:parse()[1]
local disabled_stm_node = get_disable_stm_node(bufnr, tree)
if disabled_stm_node == nil then
diff --git a/lua/plugins/fugitive.lua b/lua/plugins/fugitive.lua
index 952ee9e..10df419 100644
--- a/lua/plugins/fugitive.lua
+++ b/lua/plugins/fugitive.lua
@@ -1,6 +1,5 @@
return {
"tpope/vim-fugitive",
- enabled = false,
keys = {
{ "<leader>ga", ":Git fetch --all -p<cr>" },
{ "<leader>gl", ":Git pull<cr>" },
diff --git a/lua/plugins/laravel.lua b/lua/plugins/laravel.lua
index fa8d973..4ffa66a 100644
--- a/lua/plugins/laravel.lua
+++ b/lua/plugins/laravel.lua
@@ -8,7 +8,7 @@ return {
keys = {
{ "<leader>pa", ":Artisan<cr>" },
},
- events = { "VeryLazy" },
+ event = { "VeryLazy" },
config = function()
require("laravel").setup()
require("telescope").load_extension "laravel"
diff --git a/lua/plugins/lazygit.lua b/lua/plugins/lazygit.lua
index 46c04a1..0320d79 100644
--- a/lua/plugins/lazygit.lua
+++ b/lua/plugins/lazygit.lua
@@ -1,4 +1,8 @@
return {
"kdheepak/lazygit.nvim",
+ enabled = false,
keys = { { "<leader>gg", ":LazyGit<cr>" } },
+ config = function()
+ vim.env.GIT_EDITOR = "nvr -cc split --remote-wait +'set bufhidden=wipe'"
+ end,
}
diff --git a/lua/plugins/overseer.lua b/lua/plugins/overseer.lua
new file mode 100644
index 0000000..ab773ac
--- /dev/null
+++ b/lua/plugins/overseer.lua
@@ -0,0 +1,5 @@
+return {
+ "stevearc/overseer.nvim",
+ enabled = false,
+ config = true,
+}
diff --git a/lua/plugins/todo-comments.lua b/lua/plugins/todo-comments.lua
index 7ccdf5f..2e53f49 100644
--- a/lua/plugins/todo-comments.lua
+++ b/lua/plugins/todo-comments.lua
@@ -5,7 +5,7 @@ return {
},
config = true,
lazy = false,
- cmds = { "TodoTrouble", "TodoTelescope", "TodoQuickFix" },
+ cmd = { "TodoTrouble", "TodoTelescope", "TodoQuickFix" },
keys = {
{
"]t",