142 lines
4.4 KiB
Plaintext
142 lines
4.4 KiB
Plaintext
set runtimepath^=/.vim runtimepath+=~/.vim/after
|
|
let &packpath = &runtimepath
|
|
"syntax on
|
|
set modelines=0
|
|
set hidden
|
|
set number
|
|
set ruler
|
|
set visualbell
|
|
set textwidth=120
|
|
set cursorline
|
|
hi CursorLine term=bold cterm=bold ctermbg=darkgrey
|
|
set tabstop=2
|
|
set softtabstop=2
|
|
set expandtab
|
|
set shiftwidth=2
|
|
set matchpairs+=<:>
|
|
set showmode
|
|
set showcmd
|
|
set showmatch
|
|
set hlsearch
|
|
set ignorecase
|
|
set smartcase
|
|
set incsearch
|
|
set wrapscan
|
|
set scrolloff=999
|
|
set backspace=indent,eol,start
|
|
set mouse=nicr
|
|
set termguicolors
|
|
|
|
call plug#begin(stdpath('data') . '/plugged')
|
|
Plug 'williamboman/mason.nvim'
|
|
Plug 'williamboman/mason-lspconfig.nvim'
|
|
Plug 'nvim-lua/plenary.nvim'
|
|
Plug 'junegunn/vim-easy-align'
|
|
Plug 'morhetz/gruvbox'
|
|
Plug 'junegunn/fzf', {'do': {->fzf#install()}}
|
|
Plug 'junegunn/fzf.vim'
|
|
Plug 'gfanto/fzf-lsp.nvim'
|
|
Plug 'nvim-lua/lsp-status.nvim'
|
|
Plug 'jiangmiao/auto-pairs'
|
|
Plug 'machakann/vim-sandwich'
|
|
Plug 'machakann/vim-highlightedyank'
|
|
Plug 'bling/vim-airline'
|
|
Plug 'airblade/vim-gitgutter'
|
|
Plug 'rhysd/vim-clang-format'
|
|
Plug 'easymotion/vim-easymotion'
|
|
Plug 'neovim/nvim-lspconfig'
|
|
Plug 'kosayoda/nvim-lightbulb'
|
|
Plug 'hrsh7th/cmp-nvim-lsp'
|
|
Plug 'hrsh7th/cmp-buffer'
|
|
Plug 'hrsh7th/cmp-path'
|
|
Plug 'hrsh7th/cmp-cmdline'
|
|
Plug 'hrsh7th/nvim-cmp'
|
|
Plug 'saadparwaiz1/cmp_luasnip'
|
|
Plug 'L3MON4D3/LuaSnip'
|
|
Plug 'kyazdani42/nvim-web-devicons'
|
|
Plug 'kyazdani42/nvim-tree.lua'
|
|
Plug 'tpope/vim-fugitive'
|
|
Plug 'mfussenegger/nvim-dap'
|
|
Plug 'David-Kunz/jester'
|
|
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
|
Plug 'waycrate/swhkd-vim'
|
|
Plug 'kmonad/kmonad-vim'
|
|
Plug 'nvim-lua/plenary.nvim'
|
|
Plug 'akinsho/toggleterm.nvim', {'tag' : 'v2.*'}
|
|
Plug 'https://git.sr.ht/~whynothugo/lsp_lines.nvim'
|
|
Plug 'MunifTanjim/nui.nvim'
|
|
Plug 'arnarg/todotxt.nvim'
|
|
call plug#end()
|
|
|
|
autocmd vimenter * colorscheme gruvbox
|
|
autocmd BufEnter *.60 :setlocal filetype=sixtyfps
|
|
let g:clang_format#auto_format=0
|
|
|
|
set completeopt=menuone,noselect
|
|
|
|
|
|
highlight NvimTreeFolderIcon guibg=blue
|
|
|
|
lua require('cmp_config')
|
|
lua require('nvimtree')
|
|
lua require('lsp_conf')
|
|
lua require('treesitter_config')
|
|
lua require('dap_config')
|
|
lua require('jester')
|
|
lua require('mason_config')
|
|
lua require('toggleterm_config')
|
|
lua require('virtual_lines_config')
|
|
lua require('todotxt_config')
|
|
|
|
"Leader
|
|
nnoremap <SPACE> <Nop>
|
|
let mapleader=" "
|
|
"mappings
|
|
map <leader>h :set cursorline!<CR>
|
|
"map <leader>c :!yarn copy-start<CR>
|
|
"map <leader>b :!yarn build<CR>
|
|
"map <leader>bs :!yarn build-start<CR>
|
|
|
|
nnoremap <C-n> :NvimTreeToggle<CR>
|
|
nnoremap <leader>r :NvimTreeRefresh<CR>
|
|
nnoremap <leader>n :NvimTreeFindFile<CR>
|
|
" NvimTreeOpen, NvimTreeClose, NvimTreeFocus, NvimTreeFindFileToggle, and NvimTreeResize are also available if you need them
|
|
xnoremap p "_dP
|
|
nnoremap <esc><esc> :noh<return><esc>
|
|
map <leader>f :FZF<CR>
|
|
map <leader>F :Rg<CR>
|
|
|
|
nnoremap <leader>ca <cmd>lua vim.lsp.buf.code_action()<cr>
|
|
nnoremap <leader>gd <cmd>lua vim.lsp.buf.definition()<cr>
|
|
nnoremap <leader>gD <cmd>lua vim.lsp.buf.declaration()<cr>
|
|
nnoremap <leader>gr <cmd>lua vim.lsp.buf.references()<cr>
|
|
nnoremap <leader>rn <cmd>lua vim.lsp.buf.rename()<cr>
|
|
nnoremap <leader>K <cmd>lua vim.lsp.buf.hover()<cr>
|
|
|
|
nnoremap <leader>b :Buffers<cr>
|
|
|
|
nnoremap <C-L> :bnext<CR>
|
|
nnoremap <C-H> :bprevious<CR>
|
|
|
|
nnoremap <leader>J <cmd>lua vim.diagnostic.open_float()<cr>
|
|
nnoremap <M-F> <cmd>lua vim.lsp.buf.format({async = true})<cr>
|
|
inoremap <c-s> <cmd>lua vim.lsp.buf.signature_help()<cr>
|
|
|
|
nnoremap <F9> <cmd>lua require'dap'.toggle_breakpoint()<cr>
|
|
nnoremap <F5> <cmd>lua require'dap'.continue()<cr>
|
|
nnoremap <F10> <cmd>lua require'dap'.step_over()<cr>
|
|
nnoremap <F11> <cmd>lua require'dap'.step_into()<cr>
|
|
|
|
tnoremap <Esc><Esc> <C-\><C-n>
|
|
|
|
nnoremap <leader>td :ToDoTxtTasksToggle<cr>
|
|
|
|
autocmd BufWritePre *.ts lua vim.lsp.buf.formatting_sync(nil, 1000)
|
|
|
|
command JestRun :lua require'jester'.run({cmd = "npm run test -t '$result' -- $file"})
|
|
command JestRunFile :lua require'jester'.run_file({cmd = "npm run test -t '$result' -- $file"})
|
|
command JestRunLast :lua require'jester'.run_last({cmd = "npm run test -t '$result' -- $file"})
|
|
command JestDebug :lua require'jester'.debug({cmd = "npm run test -t '$result' -- $file"})
|
|
command JestDebugFile :lua require'jester'.debug_file({cmd = "npm run test -t '$result' -- $file"})
|
|
command JestDebugLast :lua require'jester'.debug_last({cmd = "npm run test -t '$result' -- $file"})
|