initial(ish) commit
This commit is contained in:
commit
b744693f0e
88 changed files with 4925 additions and 0 deletions
3
hm-imports/nvim/config/lua/filetypes.lua
Normal file
3
hm-imports/nvim/config/lua/filetypes.lua
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
vim.cmd [[
|
||||
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
|
||||
]]
|
||||
45
hm-imports/nvim/config/lua/keybindings.lua
Normal file
45
hm-imports/nvim/config/lua/keybindings.lua
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
local map = require('utils').map
|
||||
|
||||
-- split binds
|
||||
map { 'n', '<A-h>', ':vertical resize -5<CR>', noremap = true, silent = true}
|
||||
map { 'n', '<A-l>', ':vertical resize +5<CR>', noremap = true, silent = true}
|
||||
map { 'n', '<A-j>', ':resize -5<CR>', noremap = true, silent = true}
|
||||
map { 'n', '<A-k>', ':resize +5<CR>', noremap = true, silent = true}
|
||||
map { 'n', '<A-=>', '<C-w> =', noremap = true, silent = true}
|
||||
|
||||
map { 'n', '<A-s>', ':vsp<CR>', noremap = true, silent = true}
|
||||
map { 'n', '<C-s>', ':split<CR>', noremap = true, silent = true}
|
||||
|
||||
map { 'n', '<C-h>', '<C-w>h', noremap = true, silent = true}
|
||||
map { 'n', '<C-j>', '<C-w>j', noremap = true, silent = true}
|
||||
map { 'n', '<C-k>', '<C-w>k', noremap = true, silent = true}
|
||||
map { 'n', '<C-l>', '<C-w>l', noremap = true, silent = true}
|
||||
|
||||
-- buffer binds
|
||||
map { 'n', ',q', ':bd<CR>', noremap = false, silent = true}
|
||||
map { 'n', ',b', ':Buffers<CR>', noremap = false, silent = true}
|
||||
-- tab binds
|
||||
map { 'n', '<C-t>', ':tabnew<CR>', noremap = false, silent = true}
|
||||
|
||||
-- copy paste
|
||||
map { 'v', '<C-c>', '"+y', noremap = true, silent = true}
|
||||
map { 'n', '<C-b>', '"+P', noremap = false, silent = true}
|
||||
map { 'n', '<C-p>', ':registers<CR>', noremap = true, silent = true}
|
||||
|
||||
-- sudo :w
|
||||
map { 'c', 'w!!', 'w !sudo tee > /dev/null %', noremap = false, silent = false}
|
||||
|
||||
|
||||
-- terminal
|
||||
map { 'n', '<leader>t', ':term<CR>', noremap = false, silent = true}
|
||||
map { 't', '<C-b>', '<C-\\><C-n>', noremap = true, silent = true}
|
||||
|
||||
-- plugins - commentary
|
||||
map { 'n', '<leader>c', ':Commentary<CR>', noremap = false, silent = true}
|
||||
-- plugins - vista
|
||||
map { 'n', '<leader>v', ':Vista!!<CR>', noremap = false, silent = true}
|
||||
-- plugins - nnn
|
||||
map { 'n', '<tab>', '::NnnPicker %:p:h<CR>', noremap = true, silent = true}
|
||||
|
||||
-- plugins - terminal
|
||||
map {"n", "<leader>l", "<cmd>lua _lazygit_toggle()<CR>", {noremap = true, silent = true}}
|
||||
28
hm-imports/nvim/config/lua/plugin/lualine.lua
Normal file
28
hm-imports/nvim/config/lua/plugin/lualine.lua
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
require('lualine').setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'gruvbox',
|
||||
component_separators = { left = '', right = ''},
|
||||
section_separators = { left = '', right = ''},
|
||||
disabled_filetypes = {},
|
||||
always_divide_middle = true,
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {'mode'},
|
||||
lualine_b = {'branch', 'diff', 'diagnostics'},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {'encoding', 'fileformat', 'filetype'},
|
||||
lualine_y = {'progress'},
|
||||
lualine_z = {'location'}
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {'location'},
|
||||
lualine_y = {},
|
||||
lualine_z = {}
|
||||
},
|
||||
tabline = {},
|
||||
extensions = {}
|
||||
}
|
||||
11
hm-imports/nvim/config/lua/plugin/nnn.lua
Normal file
11
hm-imports/nvim/config/lua/plugin/nnn.lua
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
require('nnn').setup({
|
||||
set_default_mappings = 0,
|
||||
replace_netrw = 1,
|
||||
layout = {
|
||||
window = {
|
||||
width = 0.9,
|
||||
height = 0.6,
|
||||
highlight = 'Debug'
|
||||
}
|
||||
}
|
||||
})
|
||||
1
hm-imports/nvim/config/lua/plugin/rainbow.lua
Normal file
1
hm-imports/nvim/config/lua/plugin/rainbow.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
vim.g.rainbow_active = 1
|
||||
22
hm-imports/nvim/config/lua/plugin/terminal.lua
Normal file
22
hm-imports/nvim/config/lua/plugin/terminal.lua
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
require('toggleterm').setup {
|
||||
direction = 'window',
|
||||
open_mapping = [[<c-n>]],
|
||||
}
|
||||
local Terminal = require('toggleterm.terminal').Terminal
|
||||
|
||||
local lazygit = Terminal:new {
|
||||
cmd = "lazygit",
|
||||
hidden = true,
|
||||
direction = 'float'
|
||||
}
|
||||
|
||||
function _lazygit_toggle()
|
||||
lazygit:toggle()
|
||||
end
|
||||
|
||||
-- local pipeline = Terminal:new {
|
||||
-- cmd = "glab ci view",
|
||||
-- hidden = true,
|
||||
-- direction = 'float'
|
||||
-- }
|
||||
|
||||
21
hm-imports/nvim/config/lua/utils.lua
Normal file
21
hm-imports/nvim/config/lua/utils.lua
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
-- cool map funciton from https://vonheikemen.github.io/devlog/tools/configuring-neovim-using-lua/
|
||||
utils = {}
|
||||
utils.map = function(key)
|
||||
-- get the extra options
|
||||
local opts = {noremap = false}
|
||||
for i, v in pairs(key) do
|
||||
if (i) == 'string' then opts[i] = v end
|
||||
end
|
||||
|
||||
-- basic support for buffer-scoped keybindings
|
||||
local buffer = opts.buffer
|
||||
opts.buffer = nil
|
||||
|
||||
if buffer then
|
||||
vim.api.nvim_buf_set_keymap(0, key[1], key[2], key[3], opts)
|
||||
else
|
||||
vim.api.nvim_set_keymap(key[1], key[2], key[3], opts)
|
||||
end
|
||||
end
|
||||
|
||||
return utils
|
||||
Loading…
Add table
Add a link
Reference in a new issue