Compare commits
No commits in common. "adf023f322decf28f8249f12cbe262c89e62049e" and "333ea49d45b2d5ed0c28d9eb580bec6296d8538e" have entirely different histories.
adf023f322
...
333ea49d45
@ -8,12 +8,8 @@ vim.api.nvim_create_autocmd(
|
|||||||
|
|
||||||
-- Vim settings
|
-- Vim settings
|
||||||
|
|
||||||
vim.opt_local.signcolumn = 'auto'
|
vim.opt.signcolumn = "auto"
|
||||||
vim.opt_local.foldcolumn = 'auto'
|
vim.opt.foldcolumn = "auto"
|
||||||
vim.opt_local.makeprg = 'groovy %'
|
|
||||||
vim.keymap.set({ 'n', 'i', 'v' }, '<F5>', ':make<CR>', { buffer = true })
|
|
||||||
-- vim.keymap.nnoremap { '<leader>²x', ':make<CR>' }
|
|
||||||
-- vim.keymap.inoremap { '<leader>²x', '<ESC>:make<CR>' }
|
|
||||||
|
|
||||||
-- Terminal settings
|
-- Terminal settings
|
||||||
|
|
||||||
@ -23,7 +19,6 @@ vim.api.nvim_create_autocmd(
|
|||||||
local command = " groovysh"
|
local command = " groovysh"
|
||||||
local direction = "horizontal"
|
local direction = "horizontal"
|
||||||
local size = 25
|
local size = 25
|
||||||
local toggle_key = "<F10>"
|
|
||||||
|
|
||||||
-- Define a new terminal dedicated to groovy
|
-- Define a new terminal dedicated to groovy
|
||||||
local toggleterm = require('toggleterm')
|
local toggleterm = require('toggleterm')
|
||||||
@ -51,36 +46,34 @@ vim.api.nvim_create_autocmd(
|
|||||||
-- -- Define a function to run code from current buffer in the terminal
|
-- -- Define a function to run code from current buffer in the terminal
|
||||||
-- function _Groovy_buffer_exec()
|
-- function _Groovy_buffer_exec()
|
||||||
-- if not groovy:is_open() then groovy:open(size, direction) end
|
-- if not groovy:is_open() then groovy:open(size, direction) end
|
||||||
|
-- groovy:open(size, direction)
|
||||||
-- groovy:send(' clear', true)
|
-- groovy:send(' clear', true)
|
||||||
-- groovy:send(command, true)
|
-- groovy:send(command, true)
|
||||||
-- end
|
-- end
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Define a function to run code from visual selection in the terminal
|
-- Define a function to run code from visual selection in the terminal
|
||||||
function _Groovy_visual_exec()
|
-- function _Groovy_visual_exec(args)
|
||||||
if not groovy:is_open() then groovy:open(size, direction) end
|
-- groovy:open(size, direction)
|
||||||
toggleterm.send_lines_to_terminal("visual_lines", true, { groovy.id })
|
-- toggleterm.send_lines_to_terminal("visual_lines", true, { groovy.id })
|
||||||
end
|
-- end
|
||||||
|
|
||||||
-- Define a keymap to run the current buffer in the terminal
|
-- Define a keymap to run the current buffer in the terminal
|
||||||
-- <F10> corresponds to F10 on my keyboard
|
-- <F10> corresponds to F10 on my keyboard
|
||||||
-- <F22> corresponds to Shift + F10 on my keyboard
|
-- <F22> corresponds to Shift + F10 on my keyboard
|
||||||
-- <F34> corresponds to Ctrl + F10 on my keyboard
|
-- <F34> corresponds to Ctrl + F10 on my keyboard
|
||||||
vim.keymap.set({ 'n', 'i', 'v', 't' }, '<F10>', function() groovy:toggle(size, direction) end,
|
vim.api.nvim_set_keymap("n", "<F10>",
|
||||||
|
"<cmd>lua _Groovy_terminal_toggle()<cr>",
|
||||||
|
{ noremap = true, silent = true })
|
||||||
|
vim.api.nvim_set_keymap("i", "<F10>",
|
||||||
|
"<cmd>lua _Groovy_terminal_toggle()<cr>",
|
||||||
|
{ noremap = true, silent = true })
|
||||||
|
vim.api.nvim_set_keymap("v", "<F10>",
|
||||||
|
"<cmd>lua _Groovy_terminal_toggle()<cr>",
|
||||||
|
{ noremap = true, silent = true })
|
||||||
|
vim.api.nvim_set_keymap("t", "<F10>",
|
||||||
|
"<cmd>lua _Groovy_terminal_toggle()<cr>",
|
||||||
{ noremap = true, silent = true })
|
{ noremap = true, silent = true })
|
||||||
|
|
||||||
-- vim.api.nvim_set_keymap("n", toggle_key,
|
|
||||||
-- "<cmd>lua _Groovy_terminal_toggle()<cr>",
|
|
||||||
-- { noremap = true, silent = true })
|
|
||||||
-- vim.api.nvim_set_keymap("i", toggle_key,
|
|
||||||
-- "<cmd>lua _Groovy_terminal_toggle()<cr>",
|
|
||||||
-- { noremap = true, silent = true })
|
|
||||||
-- vim.api.nvim_set_keymap("v", toggle_key,
|
|
||||||
-- "<cmd>lua _Groovy_terminal_toggle()<cr>",
|
|
||||||
-- { noremap = true, silent = true })
|
|
||||||
-- vim.api.nvim_set_keymap("t", toggle_key,
|
|
||||||
-- "<cmd>lua _Groovy_terminal_toggle()<cr>",
|
|
||||||
-- { noremap = true, silent = true })
|
|
||||||
|
|
||||||
-- vim.api.nvim_set_keymap("n", "<F22>",
|
-- vim.api.nvim_set_keymap("n", "<F22>",
|
||||||
-- '<cmd>lua _Groovy_visual_exec()<cr>',
|
-- '<cmd>lua _Groovy_visual_exec()<cr>',
|
||||||
@ -88,9 +81,9 @@ vim.api.nvim_create_autocmd(
|
|||||||
-- vim.api.nvim_set_keymap("i", "<F22>",
|
-- vim.api.nvim_set_keymap("i", "<F22>",
|
||||||
-- '<cmd>lua _Groovy_visual_exec()<cr>',
|
-- '<cmd>lua _Groovy_visual_exec()<cr>',
|
||||||
-- { noremap = true, silent = true })
|
-- { noremap = true, silent = true })
|
||||||
vim.api.nvim_set_keymap("v", "<F22>",
|
-- vim.api.nvim_set_keymap("v", "<F22>",
|
||||||
"<cmd>lua _Groovy_visual_exec()<cr>",
|
-- "<cmd>lua _Groovy_visual_exec()<cr>",
|
||||||
{ noremap = true, silent = true })
|
-- { noremap = true, silent = true })
|
||||||
|
|
||||||
-- vim.api.nvim_set_keymap("n", "<F34>",
|
-- vim.api.nvim_set_keymap("n", "<F34>",
|
||||||
-- '<cmd>lua _Groovy_buffer_exec()<cr>',
|
-- '<cmd>lua _Groovy_buffer_exec()<cr>',
|
||||||
|
@ -8,8 +8,9 @@ vim.api.nvim_create_autocmd(
|
|||||||
|
|
||||||
-- Vim settings
|
-- Vim settings
|
||||||
|
|
||||||
vim.opt_local.signcolumn = "auto"
|
vim.opt.signcolumn = "auto"
|
||||||
vim.opt_local.foldcolumn = "auto"
|
vim.opt.foldcolumn = "auto"
|
||||||
|
|
||||||
|
|
||||||
-- Terminal settings
|
-- Terminal settings
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@ return {
|
|||||||
-- ["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command
|
-- ["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command
|
||||||
|
|
||||||
-- My telescope keybindings
|
-- My telescope keybindings
|
||||||
["<F1>"] = { "<cmd>Telescope help_tags<cr>", desc = "Find help with Telescope" },
|
|
||||||
["<leader>gf"] = { "<cmd>Telescope git_files<cr>", desc = "Find git files with Telescope" },
|
["<leader>gf"] = { "<cmd>Telescope git_files<cr>", desc = "Find git files with Telescope" },
|
||||||
["<leader>fq"] = { "<cmd>Telescope quickfix<cr>", desc = "Find quickfixes with Telescope" },
|
["<leader>fq"] = { "<cmd>Telescope quickfix<cr>", desc = "Find quickfixes with Telescope" },
|
||||||
["<leader>fs"] = { "<cmd>Telescope spell_suggest<cr>", desc = "Find spell suggestions with Telescope" },
|
["<leader>fs"] = { "<cmd>Telescope spell_suggest<cr>", desc = "Find spell suggestions with Telescope" },
|
||||||
@ -30,17 +29,17 @@ return {
|
|||||||
["<leader>²nb"] = { "<cmd>Neotree toggle buffers left<cr>", desc = "Open Neotree Buffers" },
|
["<leader>²nb"] = { "<cmd>Neotree toggle buffers left<cr>", desc = "Open Neotree Buffers" },
|
||||||
["<leader>²ng"] = { "<cmd>Neotree toggle git_status left<cr>", desc = "Open Neotree Git status" },
|
["<leader>²ng"] = { "<cmd>Neotree toggle git_status left<cr>", desc = "Open Neotree Git status" },
|
||||||
|
|
||||||
["<F2>"] = { '<cmd>Neotree toggle<cr>', desc = "File Explorer" }, -- F26 corresponds to <Ctrl+F2> on my keyboard
|
["<F26>"] = { '<cmd>Neotree toggle<cr>', desc = "File Explorer" }, -- F26 corresponds to <Ctrl+F2> on my keyboard
|
||||||
["<F3>"] = { function() require("astronvim.utils").toggle_term_cmd "lazygit" end, desc = "Lazygit terminal" }, -- F27 corresponds to <Ctrl+F3> on my keyboard
|
["<F27>"] = { function() require("astronvim.utils").toggle_term_cmd "lazygit" end, desc = "Lazygit" }, -- F27 corresponds to <Ctrl+F3> on my keyboard
|
||||||
["<F4>"] = { function() require("astronvim.utils").toggle_term_cmd "tig" end, desc = "Tig terminal" }, -- F28 corresponds to <Ctrl+F4> on my keyboard
|
["<F28>"] = { function() require("astronvim.utils").toggle_term_cmd "tig" end, desc = "Tig" }, -- F28 corresponds to <Ctrl+F4> on my keyboard
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
-- Insert mode
|
-- Insert mode
|
||||||
i = {
|
i = {
|
||||||
["<F2>"] = { '<cmd>Neotree toggle<cr>', desc = "File Explorer" }, -- F26 corresponds to <Ctrl+F2> on my keyboard
|
["<F26>"] = { '<cmd>Neotree toggle<cr>', desc = "File Explorer" }, -- F26 corresponds to <Ctrl+F2> on my keyboard
|
||||||
["<F3>"] = { function() require("astronvim.utils").toggle_term_cmd "lazygit" end, desc = "Lazygit terminal" }, -- F27 corresponds to <Ctrl+F3> on my keyboard
|
["<F27>"] = { function() require("astronvim.utils").toggle_term_cmd "lazygit" end, desc = "Lazygit" }, -- F27 corresponds to <Ctrl+F3> on my keyboard
|
||||||
["<F4>"] = { function() require("astronvim.utils").toggle_term_cmd "tig" end, desc = "Tig terminal" }, -- F28 corresponds to <Ctrl+F4> on my keyboard
|
["<F28>"] = { function() require("astronvim.utils").toggle_term_cmd "tig" end, desc = "Tig" }, -- F28 corresponds to <Ctrl+F4> on my keyboard
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Terminal mode
|
-- Terminal mode
|
||||||
@ -55,8 +54,7 @@ return {
|
|||||||
-- Clear Ctrl-J and Ctrl-K so that we can use them to navigate the terminal (for lazygit)
|
-- Clear Ctrl-J and Ctrl-K so that we can use them to navigate the terminal (for lazygit)
|
||||||
["<C-j>"] = false,
|
["<C-j>"] = false,
|
||||||
["<C-k>"] = false,
|
["<C-k>"] = false,
|
||||||
-- My terms
|
["<F27>"] = { function() require("astronvim.utils").toggle_term_cmd "lazygit" end, desc = "Lazygit" }, -- F27 corresponds to <Ctrl+F3> on my keyboard
|
||||||
["<F3>"] = { function() require("astronvim.utils").toggle_term_cmd "lazygit" end, desc = "Lazygit terminal" }, -- F27 corresponds to <Ctrl+F3> on my keyboard
|
["<F28>"] = { function() require("astronvim.utils").toggle_term_cmd "tig" end, desc = "Tig" }, -- F28 corresponds to <Ctrl+F4> on my keyboard
|
||||||
["<F4>"] = { function() require("astronvim.utils").toggle_term_cmd "tig" end, desc = "Tig terminal" }, -- F28 corresponds to <Ctrl+F4> on my keyboard
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -1,19 +1,13 @@
|
|||||||
-- set vim options here (vim.<first_key>.<second_key> = value)
|
-- set vim options here (vim.<first_key>.<second_key> = value)
|
||||||
return {
|
return {
|
||||||
opt = {
|
opt = {
|
||||||
cmdheight = 1,
|
|
||||||
|
|
||||||
scrolloff = 0, -- Set scroll offset to zero so that zt and zb work as expected
|
|
||||||
|
|
||||||
number = true, -- sets vim.opt.number
|
|
||||||
relativenumber = false, -- sets vim.opt.relativenumber
|
relativenumber = false, -- sets vim.opt.relativenumber
|
||||||
|
cmdheight = 1,
|
||||||
signcolumn = "auto", -- sets vim.opt.signcolumn to auto
|
scrolloff = 0, -- Set scroll offset to zero so that zt and zb work as expected
|
||||||
foldcolumn = "auto", -- sets vim.opt.foldcolumn to auto
|
|
||||||
|
|
||||||
spelllang = "fr", -- Set spell language to french
|
|
||||||
-- spell = false, -- sets vim.opt.spell
|
-- spell = false, -- sets vim.opt.spell
|
||||||
|
spelllang = "fr", -- Set spell language to french
|
||||||
|
-- number = true, -- sets vim.opt.number
|
||||||
|
-- signcolumn = "auto", -- sets vim.opt.signcolumn to auto
|
||||||
-- wrap = false, -- sets vim.opt.wrap
|
-- wrap = false, -- sets vim.opt.wrap
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user