-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinit.vim
More file actions
137 lines (106 loc) · 2.46 KB
/
init.vim
File metadata and controls
137 lines (106 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
""""""""""""
" settings "
""""""""""""
syntax on
filetype plugin indent on
let mapleader = ' '
let g:vimsyn_embed = 'lPr'
set autoindent
set completeopt=menu,menuone,noinsert
set expandtab
set foldmethod=manual
set formatoptions+=jnrql
set formatoptions-=2tac
set hidden
set ignorecase
set inccommand=split
set incsearch
set laststatus=2
set lazyredraw
set mouse=n
set number
set noerrorbells
set norelativenumber
set nowrap
set path+=.,**
set shiftwidth=2
set shortmess+=c
set showtabline=1
set signcolumn=yes
set smartcase
set smartindent
set softtabstop=2
set splitbelow
set splitright
set tabstop=2
set termguicolors
set wildignore+=*/node_modules/*,*/.git/*,.DS_Store,*/venv/*,*/__pycache__/*,*.pyc
set wildmenu
set wildmode=full
set wildoptions=pum
"""""""""""
" plugins "
"""""""""""
call plug#begin('~/.config/nvim/plugged')
" telescope
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-telescope/telescope.nvim'
" builtin lsp
Plug 'neovim/nvim-lspconfig'
" treesitter
Plug 'nvim-treesitter/nvim-treesitter', { 'do': ':TSUpdate' }
" auto-completion
Plug 'hrsh7th/nvim-cmp'
Plug 'hrsh7th/cmp-buffer'
Plug 'hrsh7th/cmp-nvim-lsp'
Plug 'hrsh7th/cmp-path'
Plug 'saadparwaiz1/cmp_luasnip'
" comments
Plug 'numToStr/Comment.nvim'
" comments integration with treesitter
Plug 'JoosepAlviste/nvim-ts-context-commentstring'
" lua development
Plug 'folke/lua-dev.nvim'
" nerd font icons :D
Plug 'kyazdani42/nvim-web-devicons'
" statusline
Plug 'shadmansaleh/lualine.nvim'
" file manager
Plug 'tamago324/lir.nvim'
" snippets engine
Plug 'L3MON4D3/LuaSnip'
" theme
Plug 'rose-pine/neovim'
" lsp diagnostics
Plug 'folke/trouble.nvim'
" vimscript plugins
Plug 'milisims/nvim-luaref'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-repeat'
Plug 'christoomey/vim-system-copy'
call plug#end()
"""""""""""""""
" colorscheme "
"""""""""""""""
let g:rose_pine_variant='moon'
colorscheme rose-pine
""""""""""""
" autocmds "
""""""""""""
autocmd! TextYankPost * lua vim.highlight.on_yank { on_visual = false }
""""""""""
" remaps "
""""""""""
" remap Y to yank to end of line
nnoremap Y y$
vnoremap Y y$
" delete text without yanking
nnoremap <leader>d "_d
vnoremap <leader>d "_d
" turn off search highlighting
nnoremap <leader>hl :nohlsearch<cr>
" neovim terminal can exit to normal mode with <esc> now
tnoremap <esc> <c-\><c-n>
" swap between light and dark themes for rose-pine (Toggle Theme)
nnoremap <leader>tt <cmd>lua require('rose-pine.functions').toggle_variant({ 'moon', 'dawn' })<cr>