speedie-nvim | Add new config
This commit is contained in:
parent
7eeaf4f671
commit
c574c64a66
|
@ -9,7 +9,7 @@ local autocmd = vim.api.nvim_create_autocmd -- Convenient alias
|
|||
local defaultKeybindOptions = { noremap = true, silent = true } -- Default keybind options
|
||||
|
||||
LoadPreviousSessionOnLoad = true -- Load previous session or not
|
||||
EnableImageSupport = true -- Enable image support or not
|
||||
EnableImageSupport = false -- Enable image support or not
|
||||
ImageBackend = 'kitty' -- Image backend to support (kitty/ueberzug)
|
||||
LeaderKey = ' ' -- The leader key to use.
|
||||
MaxAccelerationSpeed = 300 -- Max speed for j/k/gj/gk bindings.
|
||||
|
@ -125,64 +125,65 @@ opt.fillchars = {
|
|||
}
|
||||
|
||||
-- Keybinds for handling splits
|
||||
keymap('n', '<C-h>', '<C-w>h', defaultKeybindOptions)
|
||||
keymap('n', '<C-j>', '<C-w>j', defaultKeybindOptions)
|
||||
keymap('n', '<C-k>', '<C-w>k', defaultKeybindOptions)
|
||||
keymap('n', '<C-l>', '<C-w>l', defaultKeybindOptions)
|
||||
keymap('n', '<C-s>', '<cmd>split<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<C-w>', '<cmd>vsplit<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<C-q>', '<cmd>only<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<C-t>', '<cmd>term<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<C-f>', '<cmd>Telescope fd<cr>', defaultKeybindOptions)
|
||||
keymap('n', 'H', '<cmd>vertical resize -10<cr>', defaultKeybindOptions)
|
||||
keymap('n', 'J', '<cmd>resize -10<cr>', defaultKeybindOptions)
|
||||
keymap('n', 'K', '<cmd>resize +10<cr>', defaultKeybindOptions)
|
||||
keymap('n', 'L', '<cmd>vertical resize +10<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<C-h>', '<C-w>h', defaultKeybindOptions)
|
||||
keymap('n', '<C-j>', '<C-w>j', defaultKeybindOptions)
|
||||
keymap('n', '<C-k>', '<C-w>k', defaultKeybindOptions)
|
||||
keymap('n', '<C-l>', '<C-w>l', defaultKeybindOptions)
|
||||
keymap('n', '<C-s>', '<cmd>split<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<C-w>', '<cmd>vsplit<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<C-q>', '<cmd>only<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<C-t>', '<cmd>term<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<C-f>', '<cmd>Telescope fd<cr>', defaultKeybindOptions)
|
||||
keymap('n', 'H', '<cmd>vertical resize -10<cr>', defaultKeybindOptions)
|
||||
keymap('n', 'J', '<cmd>resize -10<cr>', defaultKeybindOptions)
|
||||
keymap('n', 'K', '<cmd>resize +10<cr>', defaultKeybindOptions)
|
||||
keymap('n', 'L', '<cmd>vertical resize +10<cr>', defaultKeybindOptions)
|
||||
|
||||
-- Keybinds for language/spell
|
||||
keymap('n', '<F2>', '<cmd>set spell!<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<F3>', '<cmd>set spelllang=en_us<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<F4>', '<cmd>set spelllang=sv_se<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<F7>', '<cmd>silent execute "!setxkbmap us"<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<F8>', '<cmd>silent execute "!setxkbmap se"<cr>', defaultKeybindOptions)
|
||||
keymap('n', 'ca', 'z=', defaultKeybindOptions)
|
||||
keymap('n', '<F2>', '<cmd>set spell!<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<F3>', '<cmd>set spelllang=en_us<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<F4>', '<cmd>set spelllang=sv_se<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<F7>', '<cmd>silent execute "!setxkbmap us"<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<F8>', '<cmd>silent execute "!setxkbmap se"<cr>', defaultKeybindOptions)
|
||||
keymap('n', 'ca', 'z=', defaultKeybindOptions)
|
||||
|
||||
-- Miscellanious
|
||||
keymap('n', '<C-n>', '<cmd>tab :new<cr>', defaultKeybindOptions)
|
||||
keymap('n', 'j', '<Plug>(accelerated_jk_j)', defaultKeybindOptions)
|
||||
keymap('n', 'k', '<Plug>(accelerated_jk_k)', defaultKeybindOptions)
|
||||
keymap('n', 'gj', '<Plug>(accelerated_jk_gj)', defaultKeybindOptions)
|
||||
keymap('n', 'gk', '<Plug>(accelerated_jk_gk)', defaultKeybindOptions)
|
||||
keymap('n', 'd', '"_d', defaultKeybindOptions)
|
||||
keymap('x', 'd', '"_d', defaultKeybindOptions)
|
||||
keymap('x', 'p', '"_dP', defaultKeybindOptions)
|
||||
keymap('n', 'c', '"_c', defaultKeybindOptions)
|
||||
keymap('n', 'ZX', '<cmd>q!<cr>', defaultKeybindOptions)
|
||||
keymap('n', 'Zz', '<cmd>w!<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<C-A>', 'v/{<cr>%', defaultKeybindOptions)
|
||||
keymap('n', '<C-e>', '<cmd>NvimTreeToggle<cr>', defaultKeybindOptions)
|
||||
keymap('n', '.', '<cmd>TroubleToggle<cr>', defaultKeybindOptions)
|
||||
keymap('n', ',', '<cmd>AerialToggle<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<leader>g', '<cmd>Neogit<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<C-n>', '<cmd>tab :new<cr>', defaultKeybindOptions)
|
||||
keymap('n', 'j', '<Plug>(accelerated_jk_j)', defaultKeybindOptions)
|
||||
keymap('n', 'k', '<Plug>(accelerated_jk_k)', defaultKeybindOptions)
|
||||
keymap('n', 'gj', '<Plug>(accelerated_jk_gj)', defaultKeybindOptions)
|
||||
keymap('n', 'gk', '<Plug>(accelerated_jk_gk)', defaultKeybindOptions)
|
||||
keymap('n', 'd', '"_d', defaultKeybindOptions)
|
||||
keymap('x', 'd', '"_d', defaultKeybindOptions)
|
||||
keymap('x', 'p', '"_dP', defaultKeybindOptions)
|
||||
keymap('n', 'c', '"_c', defaultKeybindOptions)
|
||||
keymap('n', 'ZX', '<cmd>q!<cr>', defaultKeybindOptions)
|
||||
keymap('n', 'Zz', '<cmd>w!<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<C-A>', 'v/{<cr>%', defaultKeybindOptions)
|
||||
keymap('n', '<C-e>', '<cmd>NvimTreeToggle<cr>', defaultKeybindOptions)
|
||||
keymap('n', '.', '<cmd>TroubleToggle<cr>', defaultKeybindOptions)
|
||||
keymap('n', ',', '<cmd>AerialToggle<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<leader>G', '<cmd>Neogit<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<leader>gt', '<cmd>Gitsigns toggle_current_line_blame<cr>', defaultKeybindOptions)
|
||||
|
||||
-- Keybinds for handling tabs
|
||||
keymap('n', '<A-,>', '<cmd>BufferLineCyclePrev<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-.>', '<cmd>BufferLineCycleNext<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<C-Tab>', '<cmd>BufferLineCycleNext<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-<>', '<cmd>BufferLineMovePrev<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A->>', '<cmd>BufferLineMoveNext<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-1>', '<cmd>BufferLineGoToBuffer 1<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-2>', '<cmd>BufferLineGoToBuffer 2<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-3>', '<cmd>BufferLineGoToBuffer 3<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-4>', '<cmd>BufferLineGoToBuffer 4<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-5>', '<cmd>BufferLineGoToBuffer 5<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-6>', '<cmd>BufferLineGoToBuffer 6<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-7>', '<cmd>BufferLineGoToBuffer 7<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-8>', '<cmd>BufferLineGoToBuffer 8<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-9>', '<cmd>BufferLineGoToBuffer 9<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-0>', '<cmd>BufferLineGoToBuffer -1<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-p>', '<cmd>BufferLineTogglePin<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-c>', '<cmd>bdelete<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-,>', '<cmd>BufferLineCyclePrev<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-.>', '<cmd>BufferLineCycleNext<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<C-Tab>', '<cmd>BufferLineCycleNext<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-<>', '<cmd>BufferLineMovePrev<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A->>', '<cmd>BufferLineMoveNext<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-1>', '<cmd>BufferLineGoToBuffer 1<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-2>', '<cmd>BufferLineGoToBuffer 2<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-3>', '<cmd>BufferLineGoToBuffer 3<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-4>', '<cmd>BufferLineGoToBuffer 4<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-5>', '<cmd>BufferLineGoToBuffer 5<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-6>', '<cmd>BufferLineGoToBuffer 6<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-7>', '<cmd>BufferLineGoToBuffer 7<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-8>', '<cmd>BufferLineGoToBuffer 8<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-9>', '<cmd>BufferLineGoToBuffer 9<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-0>', '<cmd>BufferLineGoToBuffer -1<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-p>', '<cmd>BufferLineTogglePin<cr>', defaultKeybindOptions)
|
||||
keymap('n', '<A-c>', '<cmd>bdelete<cr>', defaultKeybindOptions)
|
||||
|
||||
autocmd('BufWritePre', { -- Remove trailing spaces
|
||||
pattern = { '*' },
|
||||
|
|
10
.config/nvim/lua/gitsigns_config.lua
Normal file
10
.config/nvim/lua/gitsigns_config.lua
Normal file
|
@ -0,0 +1,10 @@
|
|||
--[[
|
||||
speedie's neovim configuration
|
||||
-- https://git.speedie.site/speedie/speedie-nvim --
|
||||
]]--
|
||||
|
||||
require('gitsigns').setup({
|
||||
auto_attach = true,
|
||||
attach_to_untracked = false,
|
||||
current_line_blame = true,
|
||||
})
|
|
@ -219,6 +219,20 @@ ins_right {
|
|||
color = { fg = colors.pink, gui = 'bold' },
|
||||
}
|
||||
|
||||
ins_right {
|
||||
function()
|
||||
if vim.b.gitsigns_status == nil then
|
||||
return '0'
|
||||
else
|
||||
return vim.b.gitsigns_status
|
||||
end
|
||||
end,
|
||||
color = { fg = colors.orange, gui = 'bold' },
|
||||
icon = '',
|
||||
icons_enabled = true,
|
||||
padding = { left = 1 },
|
||||
}
|
||||
|
||||
ins_right {
|
||||
'branch',
|
||||
icon = '',
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
require('conform_config')
|
||||
require('autoclose_config')
|
||||
require('lsp_config')
|
||||
require('lualine_config')
|
||||
require('ibl_config')
|
||||
require('bufferline_config')
|
||||
require('tree_config')
|
||||
|
@ -24,9 +23,11 @@ require('translate_config')
|
|||
require('accelerated_config')
|
||||
require('git_config')
|
||||
require('neogit_config')
|
||||
require('gitsigns_config')
|
||||
require('noice_config')
|
||||
require('colorizer_config')
|
||||
require('illuminate_config')
|
||||
require('aerial_config')
|
||||
require('bigfile_config')
|
||||
require('session_manager')
|
||||
require('lualine_config')
|
||||
|
|
Loading…
Reference in a new issue