added custom configuration
This commit is contained in:
parent
2abcb39fae
commit
19b91ec1c5
9 changed files with 232 additions and 39 deletions
77
lua/.exrc
Normal file
77
lua/.exrc
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
let s:cpo_save=&cpo
|
||||
set cpo&vim
|
||||
cnoremap <silent> <Plug>(TelescopeFuzzyCommandSearch) e "lua require('telescope.builtin').command_history { default_text = [=[" . escape(getcmdline(), '"') . "]=] }"
|
||||
inoremap <C-W> u
|
||||
inoremap <C-U> u
|
||||
nnoremap
|
||||
nnoremap <NL> <NL>
|
||||
nnoremap
|
||||
nnoremap
|
||||
nmap d
|
||||
tnoremap
|
||||
nnoremap <Cmd>nohlsearch
|
||||
omap <silent> % <Plug>(MatchitOperationForward)
|
||||
xmap <silent> % <Plug>(MatchitVisualForward)
|
||||
nmap <silent> % <Plug>(MatchitNormalForward)
|
||||
nnoremap & :&&
|
||||
xnoremap <silent> <expr> @ mode() ==# 'V' ? ':normal! @'.getcharstr().'
' : '@'
|
||||
xnoremap <silent> <expr> Q mode() ==# 'V' ? ':normal! @=reg_recorded()
' : 'Q'
|
||||
nnoremap Y y$
|
||||
omap <silent> [% <Plug>(MatchitOperationMultiBackward)
|
||||
xmap <silent> [% <Plug>(MatchitVisualMultiBackward)
|
||||
nmap <silent> [% <Plug>(MatchitNormalMultiBackward)
|
||||
omap <silent> ]% <Plug>(MatchitOperationMultiForward)
|
||||
xmap <silent> ]% <Plug>(MatchitVisualMultiForward)
|
||||
nmap <silent> ]% <Plug>(MatchitNormalMultiForward)
|
||||
xmap a% <Plug>(MatchitVisualTextObject)
|
||||
omap <silent> g% <Plug>(MatchitOperationBackward)
|
||||
xmap <silent> g% <Plug>(MatchitVisualBackward)
|
||||
nmap <silent> g% <Plug>(MatchitNormalBackward)
|
||||
xnoremap <silent> sa :lua MiniSurround.add('visual')
|
||||
nnoremap <Plug>PlenaryTestFile :lua require('plenary.test_harness').test_file(vim.fn.expand("%:p"))
|
||||
xmap <silent> <Plug>(MatchitVisualTextObject) <Plug>(MatchitVisualMultiBackward)o<Plug>(MatchitVisualMultiForward)
|
||||
onoremap <silent> <Plug>(MatchitOperationMultiForward) :call matchit#MultiMatch("W", "o")
|
||||
onoremap <silent> <Plug>(MatchitOperationMultiBackward) :call matchit#MultiMatch("bW", "o")
|
||||
xnoremap <silent> <Plug>(MatchitVisualMultiForward) :call matchit#MultiMatch("W", "n")
m'gv``
|
||||
xnoremap <silent> <Plug>(MatchitVisualMultiBackward) :call matchit#MultiMatch("bW", "n")
m'gv``
|
||||
nnoremap <silent> <Plug>(MatchitNormalMultiForward) :call matchit#MultiMatch("W", "n")
|
||||
nnoremap <silent> <Plug>(MatchitNormalMultiBackward) :call matchit#MultiMatch("bW", "n")
|
||||
onoremap <silent> <Plug>(MatchitOperationBackward) :call matchit#Match_wrapper('',0,'o')
|
||||
onoremap <silent> <Plug>(MatchitOperationForward) :call matchit#Match_wrapper('',1,'o')
|
||||
xnoremap <silent> <Plug>(MatchitVisualBackward) :call matchit#Match_wrapper('',0,'v')
m'gv``
|
||||
xnoremap <silent> <Plug>(MatchitVisualForward) :call matchit#Match_wrapper('',1,'v')
:if col("''") != col("$") | exe ":normal! m'" | endif
gv``
|
||||
nnoremap <silent> <Plug>(MatchitNormalBackward) :call matchit#Match_wrapper('',0,'n')
|
||||
nnoremap <silent> <Plug>(MatchitNormalForward) :call matchit#Match_wrapper('',1,'n')
|
||||
nnoremap <C-K>
|
||||
nnoremap <C-J> <NL>
|
||||
nnoremap <C-H>
|
||||
nmap <C-W><C-D> d
|
||||
nnoremap <C-L>
|
||||
inoremap u
|
||||
inoremap u
|
||||
let &cpo=s:cpo_save
|
||||
unlet s:cpo_save
|
||||
set clipboard=unnamedplus
|
||||
set confirm
|
||||
set grepformat=%f:%l:%c:%m
|
||||
set grepprg=rg\ --vimgrep\ -uu\
|
||||
set helplang=en
|
||||
set ignorecase
|
||||
set inccommand=split
|
||||
set listchars=nbsp:␣,tab:»\ ,trail:·
|
||||
set noloadplugins
|
||||
set mouse=a
|
||||
set packpath=/opt/nvim-linux-x86_64/share/nvim/runtime
|
||||
set runtimepath=~/.config/nvim,~/.local/share/nvim/lazy/lazy.nvim,~/.local/share/nvim/lazy/cmp-nvim-lsp-signature-help,~/.local/share/nvim/lazy/cmp-path,~/.local/share/nvim/lazy/cmp_luasnip,~/.local/share/nvim/lazy/friendly-snippets,~/.local/share/nvim/lazy/LuaSnip,~/.local/share/nvim/lazy/nvim-cmp,~/.local/share/nvim/lazy/todo-comments.nvim,~/.local/share/nvim/lazy/nvim-web-devicons,~/.local/share/nvim/lazy/telescope-ui-select.nvim,~/.local/share/nvim/lazy/telescope-fzf-native.nvim,~/.local/share/nvim/lazy/plenary.nvim,~/.local/share/nvim/lazy/telescope.nvim,~/.local/share/nvim/lazy/which-key.nvim,~/.local/share/nvim/lazy/mason-nvim-dap.nvim,~/.local/share/nvim/lazy/cmp-nvim-lsp,~/.local/share/nvim/lazy/fidget.nvim,~/.local/share/nvim/lazy/mason-tool-installer.nvim,~/.local/share/nvim/lazy/mason-lspconfig.nvim,~/.local/share/nvim/lazy/mason.nvim,~/.local/share/nvim/lazy/nvim-lspconfig,~/.local/share/nvim/lazy/gitsigns.nvim,~/.local/share/nvim/lazy/vim-sleuth,~/.local/share/nvim/lazy/indent-blankline.nvim,~/.local/share/nvim/lazy/nvim-treesitter,~/.local/share/nvim/lazy/mini.nvim,~/.local/share/nvim/lazy/tokyonight.nvim,/opt/nvim-linux-x86_64/share/nvim/runtime,/opt/nvim-linux-x86_64/share/nvim/runtime/pack/dist/opt/matchit,/opt/nvim-linux-x86_64/lib/nvim,~/.local/state/nvim/lazy/readme,~/.local/share/nvim/lazy/cmp-nvim-lsp-signature-help/after,~/.local/share/nvim/lazy/cmp-path/after,~/.local/share/nvim/lazy/cmp_luasnip/after,~/.local/share/nvim/lazy/cmp-nvim-lsp/after,~/.local/share/nvim/lazy/indent-blankline.nvim/after
|
||||
set scrolloff=10
|
||||
set noshowmode
|
||||
set smartcase
|
||||
set splitbelow
|
||||
set splitright
|
||||
set statusline=%{%(nvim_get_current_win()==#g:actual_curwin\ ||\ &laststatus==3)\ ?\ v:lua.MiniStatusline.active()\ :\ v:lua.MiniStatusline.inactive()%}
|
||||
set termguicolors
|
||||
set timeoutlen=300
|
||||
set undofile
|
||||
set updatetime=250
|
||||
set window=83
|
||||
" vim: set ft=vim :
|
||||
13
lua/custom/plugins/catppuccin.lua
Normal file
13
lua/custom/plugins/catppuccin.lua
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
return {
|
||||
'catppuccin/nvim',
|
||||
name = 'catppuccin',
|
||||
priority = 1000,
|
||||
opts = {},
|
||||
config = function()
|
||||
require('catppuccin').setup {}
|
||||
vim.cmd.colorscheme 'catppuccin-macchiato'
|
||||
vim.o.cursorline = true
|
||||
vim.wo.signcolumn = 'auto'
|
||||
vim.opt.termguicolors = true
|
||||
end,
|
||||
}
|
||||
21
lua/custom/plugins/lazygit.lua
Normal file
21
lua/custom/plugins/lazygit.lua
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
-- nvim v0.8.0
|
||||
return {
|
||||
'kdheepak/lazygit.nvim',
|
||||
lazy = true,
|
||||
cmd = {
|
||||
'LazyGit',
|
||||
'LazyGitConfig',
|
||||
'LazyGitCurrentFile',
|
||||
'LazyGitFilter',
|
||||
'LazyGitFilterCurrentFile',
|
||||
},
|
||||
-- optional for floating window border decoration
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
},
|
||||
-- setting the keybinding for LazyGit with 'keys' is recommended in
|
||||
-- order to load the plugin when the command is run for the first time
|
||||
keys = {
|
||||
{ '<leader>lg', '<cmd>LazyGit<cr>', desc = 'LazyGit' },
|
||||
},
|
||||
}
|
||||
11
lua/custom/plugins/markview.lua
Normal file
11
lua/custom/plugins/markview.lua
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
-- For `plugins/markview.lua` users.
|
||||
return {
|
||||
'OXY2DEV/markview.nvim',
|
||||
lazy = false,
|
||||
|
||||
-- For blink.cmp's completion
|
||||
-- source
|
||||
-- dependencies = {
|
||||
-- "saghen/blink.cmp"
|
||||
-- },
|
||||
}
|
||||
12
lua/custom/plugins/neogen.lua
Normal file
12
lua/custom/plugins/neogen.lua
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
return {
|
||||
'danymat/neogen',
|
||||
dependencies = 'nvim-treesitter/nvim-treesitter',
|
||||
config = true,
|
||||
-- config = function ()
|
||||
-- require('neogen').setup {
|
||||
-- enabled = true,
|
||||
-- }
|
||||
-- vim.g.loaded_netrw = 1
|
||||
-- vim.g.loaded_netrwPlugin = 1
|
||||
-- end
|
||||
}
|
||||
19
lua/custom/plugins/neotest.lua
Normal file
19
lua/custom/plugins/neotest.lua
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
return {
|
||||
'nvim-neotest/neotest',
|
||||
dependencies = {
|
||||
'nvim-neotest/nvim-nio',
|
||||
'nvim-lua/plenary.nvim',
|
||||
'antoinemadec/FixCursorHold.nvim',
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
},
|
||||
config = function()
|
||||
require('neotest').setup {
|
||||
adapters = {
|
||||
require 'neotest-python' {
|
||||
dap = { justMyCode = false },
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
keys = { { '<leader>n', '<cmd>Neotest summary<CR>', desc = '[N]eotest Summary' } },
|
||||
}
|
||||
44
lua/custom/plugins/nvimtree.lua
Normal file
44
lua/custom/plugins/nvimtree.lua
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
return {
|
||||
'nvim-tree/nvim-tree.lua',
|
||||
version = '*',
|
||||
lazy = false,
|
||||
dependencies = {
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
},
|
||||
config = function()
|
||||
local HEIGHT_RATIO = 0.8
|
||||
local WIDTH_RATIO = 0.5
|
||||
require('nvim-tree').setup {
|
||||
view = {
|
||||
float = {
|
||||
enable = true,
|
||||
open_win_config = function()
|
||||
local screen_w = vim.opt.columns:get()
|
||||
local screen_h = vim.opt.lines:get() - vim.opt.cmdheight:get()
|
||||
local window_w = screen_w * WIDTH_RATIO
|
||||
local window_h = screen_h * HEIGHT_RATIO
|
||||
local window_w_int = math.floor(window_w)
|
||||
local window_h_int = math.floor(window_h)
|
||||
local center_x = (screen_w - window_w) / 2
|
||||
local center_y = ((vim.opt.lines:get() - window_h) / 2) - vim.opt.cmdheight:get()
|
||||
return {
|
||||
border = 'rounded',
|
||||
relative = 'editor',
|
||||
row = center_y,
|
||||
col = center_x,
|
||||
width = window_w_int,
|
||||
height = window_h_int,
|
||||
}
|
||||
end,
|
||||
},
|
||||
width = function()
|
||||
return math.floor(vim.opt.columns:get() * WIDTH_RATIO)
|
||||
end,
|
||||
},
|
||||
}
|
||||
end,
|
||||
opts = function()
|
||||
local mappings = { { '<leader>e', '<cmd>NvimTreeOpen<CR>', desc = 'File [E]xplorer' } }
|
||||
require('which-key').add(mappings)
|
||||
end,
|
||||
}
|
||||
14
lua/custom/plugins/sniprun.lua
Normal file
14
lua/custom/plugins/sniprun.lua
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
return {
|
||||
'michaelb/sniprun',
|
||||
branch = 'master',
|
||||
|
||||
build = 'sh install.sh',
|
||||
-- do 'sh install.sh 1' if you want to force compile locally
|
||||
-- (instead of fetching a binary from the github release). Requires Rust >= 1.65
|
||||
|
||||
config = function()
|
||||
require('sniprun').setup {
|
||||
-- your options
|
||||
}
|
||||
end,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue