mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-31 23:20:08 +02:00
added more vscode integration
This commit is contained in:
parent
d45de4d2ec
commit
c9800a667d
6 changed files with 56 additions and 46 deletions
|
@ -1,5 +1,8 @@
|
|||
" set leader key
|
||||
map <Space> <Leader>
|
||||
"map <Space> <Leader>
|
||||
"nmap <space> <leader>
|
||||
let mapleader=" "
|
||||
nnoremap <Space> <Nop>
|
||||
set iskeyword+=- " treat dash separated words as a word text object"
|
||||
|
||||
if !exists('g:vscode')
|
||||
|
|
5
init.vim
5
init.vim
|
@ -10,13 +10,12 @@ source $HOME/.config/nvim/vim-plug/plugins.vim
|
|||
source $HOME/.config/nvim/general/settings.vim
|
||||
source $HOME/.config/nvim/keys/mappings.vim
|
||||
source $HOME/.config/nvim/general/paths.vim
|
||||
source $HOME/.config/nvim/plug-config/easymotion.vim
|
||||
source $HOME/.config/nvim/plug-config/quickscope.vim
|
||||
|
||||
" Source depending on if VSCode is our client
|
||||
if exists('g:vscode')
|
||||
" VSCode extension
|
||||
source $HOME/.config/nvim/vscode/windows.vim
|
||||
source $HOME/.config/nvim/plug-config/easymotion.vim
|
||||
else
|
||||
" ordinary neovim
|
||||
source $HOME/.config/nvim/themes/syntax.vim
|
||||
|
@ -28,4 +27,6 @@ else
|
|||
source $HOME/.config/nvim/plug-config/rainbow.vim
|
||||
lua require'plug-colorizer'
|
||||
source $HOME/.config/nvim/plug-config/coc.vim
|
||||
source $HOME/.config/nvim/plug-config/sneak.vim
|
||||
source $HOME/.config/nvim/plug-config/quickscope.vim
|
||||
endif
|
||||
|
|
|
@ -1,5 +1,15 @@
|
|||
|
||||
if !exists('g:vscode')
|
||||
" Better indenting
|
||||
vnoremap < <gv
|
||||
vnoremap > >gv
|
||||
|
||||
if exists('g:vscode')
|
||||
|
||||
" Simulate same TAB behavior in VSCode
|
||||
nmap <Tab> :Tabnext<CR>
|
||||
nmap <S-Tab> :Tabprev<CR>
|
||||
|
||||
else
|
||||
" Better nav for omnicomplete
|
||||
inoremap <expr> <c-j> ("\<C-n>")
|
||||
inoremap <expr> <c-k> ("\<C-p>")
|
||||
|
@ -40,6 +50,3 @@ if !exists('g:vscode')
|
|||
nnoremap <M-l> :vertical resize +2<CR>
|
||||
endif
|
||||
|
||||
" Better tabbing
|
||||
vnoremap < <gv
|
||||
vnoremap > >gv
|
||||
|
|
|
@ -135,6 +135,7 @@ let g:coc_explorer_global_presets = {
|
|||
\ 'file.child.template': '[selection | clip | 1] [indent][icon | 1] [filename omitCenter 1]'
|
||||
\ }
|
||||
\ }
|
||||
nmap <silent> <space>e :CocCommand explorer<CR>
|
||||
"nmap <silent> <space>e :CocCommand explorer<CR>
|
||||
nnoremap <leader>e :CocCommand explorer<CR>
|
||||
nmap <space>f :CocCommand explorer --preset floatingRightside<CR>
|
||||
autocmd BufEnter * if (winnr("$") == 1 && &filetype == 'coc-explorer') | q | endif
|
||||
|
|
|
@ -1,16 +1,11 @@
|
|||
let g:EasyMotion_do_mapping = 0 " Disable default mappings
|
||||
|
||||
" Jump to anywhere you want with minimal keystrokes, with just one key binding.
|
||||
" `s{char}{label}`
|
||||
nmap s <Plug>(easymotion-overwin-f)
|
||||
" or
|
||||
" `s{char}{char}{label}`
|
||||
" Need one more keystroke, but on average, it may be more comfortable.
|
||||
nmap s <Plug>(easymotion-overwin-f2)
|
||||
|
||||
" Turn on case-insensitive feature
|
||||
let g:EasyMotion_smartcase = 1
|
||||
|
||||
" JK motions: Line motions
|
||||
map <Leader>j <Plug>(easymotion-j)
|
||||
map <Leader>k <Plug>(easymotion-k)
|
||||
|
||||
nmap s <Plug>(easymotion-s2)
|
||||
nmap t <Plug>(easymotion-t2)
|
||||
|
||||
|
|
|
@ -8,14 +8,27 @@ endif
|
|||
|
||||
call plug#begin('~/.config/nvim/autoload/plugged')
|
||||
|
||||
" Text Navigation
|
||||
" Plug 'justinmk/vim-sneak'
|
||||
Plug 'unblevable/quick-scope'
|
||||
" Change dates fast
|
||||
Plug 'tpope/vim-speeddating'
|
||||
" Convert binary, hex, etc..
|
||||
Plug 'glts/vim-radical'
|
||||
" Files
|
||||
Plug 'tpope/vim-eunuch'
|
||||
" Repeat stuff
|
||||
Plug 'tpope/vim-repeat'
|
||||
" Surround
|
||||
Plug 'tpope/vim-surround'
|
||||
" Better Comments
|
||||
Plug 'tpope/vim-commentary'
|
||||
|
||||
if exists('g:vscode')
|
||||
" Easy motion for VSCode
|
||||
Plug 'asvetliakov/vim-easymotion'
|
||||
|
||||
if !exists('g:vscode')
|
||||
else
|
||||
" Add some color
|
||||
Plug 'norcalli/nvim-colorizer.lua'
|
||||
Plug 'junegunn/rainbow_parentheses.vim'
|
||||
" Better Syntax Support
|
||||
Plug 'sheerun/vim-polyglot'
|
||||
" Auto pairs for '(' '[' '{'
|
||||
|
@ -34,11 +47,6 @@ call plug#begin('~/.config/nvim/autoload/plugged')
|
|||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
Plug 'airblade/vim-rooter'
|
||||
" Better Comments
|
||||
Plug 'tpope/vim-commentary'
|
||||
" Add some color
|
||||
Plug 'norcalli/nvim-colorizer.lua'
|
||||
Plug 'junegunn/rainbow_parentheses.vim'
|
||||
" Git
|
||||
Plug 'airblade/vim-gitgutter'
|
||||
Plug 'tpope/vim-fugitive'
|
||||
|
@ -47,26 +55,21 @@ call plug#begin('~/.config/nvim/autoload/plugged')
|
|||
Plug 'voldikss/vim-floaterm'
|
||||
" Start Screen
|
||||
Plug 'mhinz/vim-startify'
|
||||
" Surround
|
||||
Plug 'tpope/vim-surround'
|
||||
" Vista
|
||||
Plug 'liuchengxu/vista.vim'
|
||||
" Files
|
||||
Plug 'tpope/vim-eunuch'
|
||||
" Help
|
||||
Plug 'liuchengxu/vim-which-key'
|
||||
" Zen mode
|
||||
Plug 'junegunn/goyo.vim'
|
||||
" Repeat stuff
|
||||
Plug 'tpope/vim-repeat'
|
||||
" Convert binary, hex, etc..
|
||||
Plug 'glts/vim-radical'
|
||||
" Making stuff
|
||||
Plug 'neomake/neomake'
|
||||
" Snippets TODO fix TAB hijack
|
||||
" Plug 'SirVer/ultisnips'
|
||||
" Better Comments
|
||||
Plug 'jbgutierrez/vim-better-comments'
|
||||
" Text Navigation
|
||||
Plug 'justinmk/vim-sneak'
|
||||
Plug 'unblevable/quick-scope'
|
||||
endif
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue