2022-08-15 15:20:15 +01:00
|
|
|
-- lualine config
|
|
|
|
require('lualine').setup{
|
|
|
|
options = {
|
2022-08-19 08:41:34 +01:00
|
|
|
icons_enabled = true,
|
2022-08-15 15:20:15 +01:00
|
|
|
theme = 'auto',
|
|
|
|
},
|
|
|
|
sections = {
|
|
|
|
-- lualine_x = {'encoding', 'fileformat', 'filetype'},
|
|
|
|
lualine_x = {'aerial', 'filetype'}
|
|
|
|
},
|
|
|
|
extensions = {'aerial', 'fugitive', 'fzf', 'nerdtree', 'toggleterm'}
|
|
|
|
}
|
|
|
|
|
2022-09-23 17:48:12 +01:00
|
|
|
-- nvim-tree setup
|
|
|
|
require('nvim-tree').setup{
|
|
|
|
filters = { custom = { "^.git$" } }
|
|
|
|
}
|
|
|
|
|
|
|
|
-- hop setup
|
|
|
|
require('hop').setup()
|
|
|
|
|
2022-08-15 15:20:15 +01:00
|
|
|
-- toggleterm config
|
|
|
|
require('toggleterm').setup{
|
2022-09-16 10:24:57 +01:00
|
|
|
open_mapping = [[\t]],
|
2022-08-15 15:20:15 +01:00
|
|
|
size = 20,
|
2022-09-13 17:44:34 +01:00
|
|
|
hide_numbers = true, -- hide the number column in toggleterm buffers
|
2022-10-25 09:37:27 +01:00
|
|
|
persist_size = false,
|
2022-08-15 15:20:15 +01:00
|
|
|
}
|
2022-09-13 17:44:34 +01:00
|
|
|
|
2022-10-25 09:37:27 +01:00
|
|
|
function _G.set_terminal_keymaps()
|
|
|
|
local opts = {buffer = 0}
|
|
|
|
vim.keymap.set('t', '<C-h>', [[<Cmd>wincmd h<CR>]], opts)
|
|
|
|
vim.keymap.set('t', '<C-j>', [[<Cmd>wincmd j<CR>]], opts)
|
|
|
|
vim.keymap.set('t', '<C-k>', [[<Cmd>wincmd k<CR>]], opts)
|
|
|
|
vim.keymap.set('t', '<C-l>', [[<Cmd>wincmd l<CR>]], opts)
|
|
|
|
end
|
|
|
|
|
|
|
|
vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()')
|
|
|
|
|
2022-09-13 17:44:34 +01:00
|
|
|
local Terminal = require('toggleterm.terminal').Terminal
|
2022-10-25 09:37:27 +01:00
|
|
|
local lazygit = Terminal:new({ cmd = "lazygit", count = 99, direction = 'float' })
|
|
|
|
local ranger = Terminal:new({ cmd = "ranger", count = 100, direction = 'float' })
|
2022-09-13 17:44:34 +01:00
|
|
|
|
|
|
|
function _lazygit_toggle()
|
|
|
|
lazygit:toggle()
|
|
|
|
end
|
|
|
|
|
2022-10-26 14:48:25 +01:00
|
|
|
function _ranger_toggle()
|
|
|
|
ranger:toggle()
|
|
|
|
end
|
|
|
|
|
2022-09-16 10:24:57 +01:00
|
|
|
vim.api.nvim_set_keymap("n", "<leader>g", "<cmd>lua _lazygit_toggle()<CR>", {noremap = true, silent = true})
|
2022-10-26 14:48:25 +01:00
|
|
|
vim.api.nvim_set_keymap("n", "<leader>r", "<cmd>lua _ranger_toggle()<CR>", {noremap = true, silent = true})
|
2022-09-14 09:39:21 +01:00
|
|
|
|
2022-10-04 13:50:05 +01:00
|
|
|
-- load telescope integrations
|
2022-09-14 09:39:21 +01:00
|
|
|
require('telescope').load_extension('aerial')
|
2022-09-15 10:08:51 +01:00
|
|
|
require('telescope').load_extension('notify')
|
|
|
|
|
|
|
|
-- Set nvim-notify as default for notifications
|
|
|
|
vim.notify = require("notify")
|
2022-09-14 09:39:21 +01:00
|
|
|
|
|
|
|
-- SnipRun config
|
|
|
|
require('sniprun').setup{
|
2022-09-14 15:29:31 +01:00
|
|
|
selected_interpreters = { 'Python3_fifo' },
|
|
|
|
repl_enable = {'Python3_fifo'},
|
2022-09-14 09:39:21 +01:00
|
|
|
display = {
|
|
|
|
"NvimNotify"
|
2022-09-14 15:29:31 +01:00
|
|
|
},
|
2022-09-14 09:39:21 +01:00
|
|
|
}
|