Compare commits
No commits in common. "761e58ff509b51d02280477c0f1a37192008e886" and "21a4bfc46d109ff84f349726114e16d71113568c" have entirely different histories.
761e58ff50
...
21a4bfc46d
7 changed files with 233 additions and 1 deletions
|
@ -30,5 +30,4 @@ return {
|
|||
require("catppuccin").setup {}
|
||||
end,
|
||||
},
|
||||
{ 'LnL7/vim-nix' },
|
||||
}
|
||||
|
|
4
home/private_dot_config/nvim/init.lua
Normal file
4
home/private_dot_config/nvim/init.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
require('settings')
|
||||
--require('plugins')
|
||||
require('keybindings')
|
||||
|
87
home/private_dot_config/nvim/init.vim.bak
Normal file
87
home/private_dot_config/nvim/init.vim.bak
Normal file
|
@ -0,0 +1,87 @@
|
|||
" Custom Mappings
|
||||
imap jj <Esc>
|
||||
|
||||
"---------------
|
||||
" Tabs
|
||||
"---------------
|
||||
set tabstop=4
|
||||
set softtabstop=4
|
||||
set shiftwidth=4
|
||||
set noexpandtab
|
||||
|
||||
" Use case insensitive search, except when using capital letters
|
||||
set ignorecase
|
||||
set smartcase
|
||||
|
||||
" When opening a new line and no filetype-specific indenting is enabled, keep
|
||||
" the same indent as the line you're currently on. Useful for READMEs, etc.
|
||||
set autoindent
|
||||
|
||||
" Display line numbers on the left
|
||||
set number
|
||||
|
||||
" Increase undo limit
|
||||
set history=1000
|
||||
|
||||
" Disable swap files
|
||||
set noswapfile
|
||||
|
||||
" Show lines above and below cursor
|
||||
set scrolloff=5
|
||||
|
||||
" Update every 300 ms
|
||||
set updatetime=300
|
||||
|
||||
|
||||
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
|
||||
if empty(glob(data_dir . '/autoload/plug.vim'))
|
||||
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||
endif
|
||||
|
||||
|
||||
"---------------
|
||||
" Plugins
|
||||
"---------------
|
||||
call plug#begin()
|
||||
Plug 'preservim/NERDTree'
|
||||
Plug 'Xuyuanp/nerdtree-git-plugin'
|
||||
Plug 'ntpeters/vim-better-whitespace'
|
||||
Plug 'mhinz/vim-startify'
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||
Plug 'cespare/vim-toml', { 'branch': 'main' }
|
||||
Plug 'snakemake/snakemake', {'rtp': 'misc/vim'}
|
||||
Plug 'airblade/vim-gitgutter'
|
||||
call plug#end()
|
||||
|
||||
nnoremap <leader>n :NERDTreeFocus<CR>
|
||||
nnoremap <C-n> :NERDTree<CR>
|
||||
nnoremap <C-t> :NERDTreeToggle<CR>
|
||||
nnoremap <C-f> :NERDTreeFind<CR>
|
||||
|
||||
let g:NERDTreeGitStatusUseNerdFonts = 1 " you should install nerdfonts by yourself. default: 0
|
||||
|
||||
"---------------
|
||||
"COC Config
|
||||
"---------------
|
||||
|
||||
" Use tab for trigger completion with characters ahead and navigate.
|
||||
" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
|
||||
" other plugin before putting this into your config.
|
||||
inoremap <silent><expr> <TAB>
|
||||
\ pumvisible() ? "\<C-n>" :
|
||||
\ <SID>check_back_space() ? "\<TAB>" :
|
||||
\ coc#refresh()
|
||||
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
||||
|
||||
function! s:check_back_space() abort
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~# '\s'
|
||||
endfunction
|
||||
|
||||
|
||||
"---------------
|
||||
"Gitgutter
|
||||
"---------------
|
||||
"turn off background of git sign column
|
||||
highlight! link SignColumn LineNr
|
3
home/private_dot_config/nvim/lua/configs/startup.lua
Normal file
3
home/private_dot_config/nvim/lua/configs/startup.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
local settings = require"startup.themes.startify"
|
||||
|
||||
return settings
|
12
home/private_dot_config/nvim/lua/keybindings.lua
Normal file
12
home/private_dot_config/nvim/lua/keybindings.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
-- Map a key with optional options
|
||||
function map(mode, keys, action, options)
|
||||
if options == nil then
|
||||
options = {}
|
||||
end
|
||||
vim.api.nvim_set_keymap(mode,keys,action,options)
|
||||
end
|
||||
|
||||
|
||||
map('i','jk','<Esc>',{noremap=true})
|
||||
map('v','jk','<Esc>',{noremap=true})
|
||||
|
93
home/private_dot_config/nvim/lua/plugins.lua
Normal file
93
home/private_dot_config/nvim/lua/plugins.lua
Normal file
|
@ -0,0 +1,93 @@
|
|||
-- LOAD THE PLUGINS
|
||||
|
||||
-- install packer on the fly
|
||||
-- local fn = vim.Fn
|
||||
-- local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
|
||||
-- if fn.empty(fn.glob(install_path)) > 0 then
|
||||
-- packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
|
||||
-- end
|
||||
--
|
||||
|
||||
|
||||
return require('packer').startup(function(use)
|
||||
use 'wbthomason/packer.nvim'
|
||||
|
||||
use 'preservim/NERDTree'
|
||||
|
||||
use {
|
||||
'goolord/alpha-nvim',
|
||||
requires = { 'kyazdani42/nvim-web-devicons' },
|
||||
config = function ()
|
||||
require'alpha'.setup(require'alpha.themes.startify'.opts)
|
||||
end
|
||||
}
|
||||
|
||||
-- use {
|
||||
-- 'airblade/vim-gitgutter',
|
||||
-- config = function()
|
||||
-- local cmd = vim.cmd
|
||||
-- cmd [[highlight! link SignColumn LineNr]]
|
||||
-- end
|
||||
-- }
|
||||
--
|
||||
use {
|
||||
'norcalli/nvim-colorizer.lua',
|
||||
conifg = function()
|
||||
require'colorizer'.setup()
|
||||
end
|
||||
}
|
||||
|
||||
use {
|
||||
'numToStr/Comment.nvim',
|
||||
config = function()
|
||||
require('Comment').setup()
|
||||
end
|
||||
}
|
||||
|
||||
use {
|
||||
"folke/which-key.nvim",
|
||||
config = function()
|
||||
require("which-key").setup()
|
||||
end
|
||||
}
|
||||
|
||||
use {
|
||||
"ggandor/lightspeed.nvim"
|
||||
}
|
||||
use {
|
||||
"ntpeters/vim-better-whitespace",
|
||||
config = function()
|
||||
local cmd = vim.cmd
|
||||
cmd [[ let g:strip_whitespace_on_save = 1 ]]
|
||||
end
|
||||
}
|
||||
|
||||
use {
|
||||
'lewis6991/gitsigns.nvim',
|
||||
requires = {
|
||||
'nvim-lua/plenary.nvim'
|
||||
},
|
||||
config = function()
|
||||
require('gitsigns').setup()
|
||||
end
|
||||
}
|
||||
|
||||
-- style
|
||||
use 'Mofiqul/dracula.nvim'
|
||||
|
||||
-- language specific plugins
|
||||
-- python
|
||||
use {
|
||||
'snakemake/snakemake',
|
||||
rtp="misc/vim",
|
||||
ft={"Snakefile","snk"}
|
||||
}
|
||||
|
||||
-- toml
|
||||
use 'cespare/vim-toml'
|
||||
vim.g.strip_whitespace_on_save = 1
|
||||
|
||||
if packer_bootstrap then
|
||||
require('packer').sync()
|
||||
end
|
||||
end)
|
34
home/private_dot_config/nvim/lua/settings.lua
Normal file
34
home/private_dot_config/nvim/lua/settings.lua
Normal file
|
@ -0,0 +1,34 @@
|
|||
-- general settings
|
||||
local o = vim.o
|
||||
local w = vim.wo
|
||||
local b = vim.bo
|
||||
|
||||
vim.g.mapleader = ' '
|
||||
|
||||
b.autoindent = true
|
||||
b.expandtab = true
|
||||
b.softtabstop = 4
|
||||
b.shiftwidth = 4
|
||||
|
||||
b.tabstop = 4
|
||||
b.smartindent = true
|
||||
b.modeline = false
|
||||
b.shiftwidth = 4
|
||||
b.tabstop = 4
|
||||
b.smartindent = true
|
||||
b.modeline = false
|
||||
|
||||
o.swapfile = false
|
||||
o.scrolloff = 5
|
||||
o.updatetime = 300
|
||||
|
||||
w.number = true
|
||||
|
||||
if vim.fn.has('multi_byte') == 1 and vim.o.encoding == 'utf-8' then
|
||||
o.listchars = [[tab:▸ ,extends:❯,precedes:❮,nbsp:±,trail:…]]
|
||||
else
|
||||
o.listchars = [[tab:> ,extends:>,precedes:<,nbsp:.,trail:_]]
|
||||
end
|
||||
|
||||
o.timeoutlen = 300
|
||||
|
Loading…
Reference in a new issue