From 6b6da565eed7135fa860ac488ccd1d5aebf699cd Mon Sep 17 00:00:00 2001 From: qwjyh Date: Tue, 14 Mar 2023 15:19:40 +0900 Subject: [PATCH] add: nvim: iron.nvim, latex-cmp optout --- dotfiles/neovim/init.lua | 49 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 4 deletions(-) diff --git a/dotfiles/neovim/init.lua b/dotfiles/neovim/init.lua index b66ec39..9e97ab9 100644 --- a/dotfiles/neovim/init.lua +++ b/dotfiles/neovim/init.lua @@ -72,6 +72,10 @@ require('lazy').setup({ build = [[mkdir -p ~/.julia/environments/nvim-null-ls && julia --startup-file=no --project=~/.julia/environments/nvim-null-ls -e 'using Pkg; Pkg.add("JET")']], -- ft = { 'julia', }, }, + { + 'hkupty/iron.nvim', + ft = { 'julia', 'python', 'ruby', }, + }, { 'lewis6991/gitsigns.nvim', }, 'neovim/nvim-lspconfig', { @@ -82,16 +86,16 @@ require('lazy').setup({ 'L3MON4D3/LuaSnip', -- snippets 'saadparwaiz1/cmp_luasnip', -- nvim-cmp source for LuaSnip 'hrsh7th/cmp-buffer', -- nvim-cmp source for buffer words - { - 'kdheepak/cmp-latex-symbols', -- latex math - ft = { 'julia', }, - }, 'hrsh7th/cmp-path', -- nvim-cmp source for filesystem paths 'hrsh7th/cmp-cmdline', -- command line 'hrsh7th/cmp-omni', -- source for omnifunc 'hrsh7th/cmp-nvim-lua', -- nvim lua }, }, + { + 'kdheepak/cmp-latex-symbols', -- latex math + ft = { 'julia', }, + }, { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate", @@ -185,6 +189,43 @@ ft.set('satysfi', '%%s') -- vimtex vim.g.vimtex_view_method = 'general' -- which is installed on both win and linux +----------------------------------------------------------- +-- iron (repl) +local iron = require('iron.core') +iron.setup { + config = { + scratch_repl = true, -- repl should be discarded + repl_definition = { + fish = { + command = { 'fish' }, + }, + julia = { + command = { 'julia', }, + }, + shell = { + command = { 'sh', }, + }, + }, + repl_open_cmd = require('iron.view').split.botright('30%'), -- repl view config + }, + keymaps = { + send_motion = "sc", + visual_send = "sc", + send_file = "sf", + send_line = "sl", + send_mark = "sm", + mark_motion = "mc", + mark_visual = "mc", + remove_mark = "md", + cr = "s", + interrupt = "s", + exit = "sq", + clear = "cl", + }, +} +-- keymap for iron repl +vim.keymap.set('n', '', 'IronRepl') + ----------------------------------------------------------- -- gitsigns require('gitsigns').setup {