added iron
This commit is contained in:
parent
2cc3afb6ee
commit
117c865017
63
lua/plugins/iron.lua
Normal file
63
lua/plugins/iron.lua
Normal file
@ -0,0 +1,63 @@
|
||||
return {
|
||||
'Vigemus/iron.nvim',
|
||||
branch = 'master',
|
||||
config = function()
|
||||
local iron = require('iron.core')
|
||||
|
||||
iron.setup({
|
||||
config = {
|
||||
-- Whether a repl should be discarded or not
|
||||
scratch_repl = true,
|
||||
-- Your repl definitions come here
|
||||
repl_definition = {
|
||||
sh = {
|
||||
-- Can be a table or a function that
|
||||
-- returns a table (see below)
|
||||
command = { 'zsh' },
|
||||
},
|
||||
python = {
|
||||
command = { 'python3' }, -- or { "ipython", "--no-autoindent" }
|
||||
format = require('iron.fts.common').bracketed_paste_python,
|
||||
},
|
||||
},
|
||||
-- How the repl window will be displayed
|
||||
-- See below for more information
|
||||
repl_open_cmd = require('iron.view').split.vertical("50%")
|
||||
},
|
||||
-- Iron doesn't set keymaps by default anymore.
|
||||
-- You can set them here or manually add keymaps to the functions in iron.core
|
||||
keymaps = {
|
||||
send_motion = '<space>sc',
|
||||
visual_send = '<space>sc',
|
||||
send_file = '<space>sf',
|
||||
send_line = '<space>sl',
|
||||
send_paragraph = '<space>sp',
|
||||
send_until_cursor = '<space>su',
|
||||
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',
|
||||
},
|
||||
-- If the highlight is on, you can change how it looks
|
||||
-- For the available options, check nvim_set_hl
|
||||
highlight = {
|
||||
italic = true,
|
||||
},
|
||||
ignore_blank_lines = true, -- ignore blank lines when sending visual select lines
|
||||
})
|
||||
|
||||
-- iron also has a list of commands, see :h iron-commands for all available commands
|
||||
end,
|
||||
cmd = {
|
||||
'IronRepl',
|
||||
'IronRestart',
|
||||
'IronFocus',
|
||||
'IronHide',
|
||||
'IronRepl',
|
||||
'IronReplHere',
|
||||
},
|
||||
}
|
@ -19,7 +19,7 @@ local lspKeys = function(client, bufnr)
|
||||
vim.keymap.set({ 'n', 'i', 'x' }, '<C-k>', vim.lsp.buf.signature_help, vim.tbl_extend('error', options, { desc = 'Signature help' }))
|
||||
vim.keymap.set('n', '<space>r', fzf.lsp_references, vim.tbl_extend('error', options, { desc = 'References' }))
|
||||
vim.keymap.set('n', '<A-m>', fzf.lsp_document_symbols, vim.tbl_extend('error', options, { desc = 'Document symbols' }))
|
||||
vim.keymap.set('n', '<space>s', fzf.lsp_live_workspace_symbols, vim.tbl_extend('error', options, { desc = 'Workspace symbols' }))
|
||||
vim.keymap.set('n', '<space>w', fzf.lsp_live_workspace_symbols, vim.tbl_extend('error', options, { desc = 'Workspace symbols' }))
|
||||
vim.keymap.set('n', '<space>v', vim.diagnostic.open_float, vim.tbl_extend('error', options, { desc = 'Diagnostics Float' }))
|
||||
vim.keymap.set('n', '<space>V', fzf.diagnostics_document, vim.tbl_extend('error', options, { desc = 'Diagnostics' }))
|
||||
vim.keymap.set('n', '<A-o>', '<cmd>ClangdSwitchSourceHeader<CR>', vim.tbl_extend('error', options, { desc = 'Switch Source/Header' }))
|
||||
|
Loading…
x
Reference in New Issue
Block a user