aboutsummaryrefslogtreecommitdiffstats
path: root/after/plugin
diff options
context:
space:
mode:
authorAriel D'Alessandro <dalessandro.ariel@gmail.com>2022-06-03 08:47:16 +0200
committerAriel D'Alessandro <dalessandro.ariel@gmail.com>2022-06-03 08:47:16 +0200
commit03436a47918c8c5229e435481cafdae61dd67fc5 (patch)
tree365ec921de56937e20a72e4e3b9cefb1d3a8451a /after/plugin
parent4051346c384042e6867d72b1ee6cbc6aed2362d3 (diff)
downloadnvim-conf-03436a47918c8c5229e435481cafdae61dd67fc5.tar.gz
nvim-conf-03436a47918c8c5229e435481cafdae61dd67fc5.zip
fix more iron config, add some comments for ideas
Diffstat (limited to 'after/plugin')
-rw-r--r--after/plugin/iron.lua89
1 files changed, 54 insertions, 35 deletions
diff --git a/after/plugin/iron.lua b/after/plugin/iron.lua
index 401c23b..972ccbc 100644
--- a/after/plugin/iron.lua
+++ b/after/plugin/iron.lua
@@ -1,42 +1,61 @@
local ok, iron = pcall(require, "iron.core")
if not ok then
- return
+ return
end
iron.setup({
- config = {
- highlight_last = "IronLastSent",
- -- Whether a repl should be discarded or not
- scratch_repl = true,
- close_window_on_exit = true,
- -- Your repl definitions come here
- repl_definition = {
- sh = {
- command = { "zsh" },
- },
- javascript = {
- command = { "node" },
- },
- php = {
- command = { "psysh" },
- },
- tinker = {
- command = { "sail", "tinker" },
- },
- },
- repl_open_cmd = "rightbelow vertical 100 split",
- -- how the REPL window will be opened, the default is opening
- -- a float window of height 40 at the bottom.
- },
- keymaps = {
- send_motion = "<space>sc",
- visual_send = "<space>sc",
- send_line = "<space>sl",
- send_mark = "<space>s.",
- cr = "<space>s<cr>",
- interrupt = "<space>s<space>",
- exit = "<space>sq",
- clear = "<space>cl",
- },
+ config = {
+ should_map_plug = false,
+ -- Whether a repl should be discarded or not
+ scratch_repl = true,
+ close_window_on_exit = true,
+ -- Your repl definitions come here
+ repl_definition = {
+ sh = {
+ command = { "zsh" },
+ },
+ javascript = {
+ command = { "node" },
+ },
+ php = {
+ command = { "psysh" },
+ },
+ tinker = {
+ command = { "php", "artisan", "tinker" },
+ },
+ sail = {
+ command = { "sail", "tinker" },
+ },
+ },
+ repl_open_cmd = "rightbelow vertical 100 split",
+ -- how the REPL window will be opened, the default is opening
+ -- a float window of height 40 at the bottom.
+ },
+ keymaps = {
+ send_motion = "<space>sc",
+ visual_send = "<space>sc",
+ send_file = "<space>sf",
+ send_line = "<space>sl",
+ send_mark = "<space>sm",
+ mark_motion = "<space>mc",
+ mark_visual = "<space>mc",
+ remove_mark = "<space>md",
+ cr = "<space>s<cr>",
+ interrupt = "<space>s<space>",
+ exit = "<space>sq",
+ clear = "<space>cl",
+ },
+ highlight = {
+ italic = true,
+ },
})
+
+-- Idea
+-- create a menu to ask which console wants to start
+-- for php example we have
+-- psysh | tinker | tinker on sail
+-- base on that save the expected filetype on a buffer variable
+-- add the parameter to the command for the IronRepl and all commands to send
+-- or beter use my own functions useing the core.* functions
+-- not all functions takes the ft as parameter