mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-31 23:20:08 +02:00
added stuff for js
This commit is contained in:
parent
7bdd4f7123
commit
b8f455cbfb
12 changed files with 88 additions and 8 deletions
6
ftplugin/python.vim
Normal file
6
ftplugin/python.vim
Normal file
|
@ -0,0 +1,6 @@
|
|||
" Python specific settings.
|
||||
setlocal tabstop=4
|
||||
setlocal shiftwidth=4
|
||||
setlocal expandtab
|
||||
setlocal autoindent
|
||||
setlocal smarttab
|
10
init.vim
10
init.vim
|
@ -13,10 +13,18 @@ source $HOME/.config/nvim/modules/language_server.vim
|
|||
source $HOME/.config/nvim/modules/ale.vim
|
||||
source $HOME/.config/nvim/modules/goyo-limelight.vim
|
||||
source $HOME/.config/nvim/modules/relativenums.vim
|
||||
source $HOME/.config/nvim/modules/pydocstring.vim
|
||||
source $HOME/.config/nvim/modules/neosnippets.vim
|
||||
source $HOME/.config/nvim/modules/emmet.vim
|
||||
source $HOME/.config/nvim/modules/colorizer.vim
|
||||
source $HOME/.config/nvim/modules/rainbow.vim
|
||||
" Special test file "
|
||||
source $HOME/.config/nvim/modules/test.vim
|
||||
|
||||
|
||||
"TODO"
|
||||
"change install script to install pyls in base and clone base instead"
|
||||
"npm i -g bash-language-server
|
||||
"npm install -g javascript-typescript-langserver
|
||||
"install ripgrep" for gutentags to ignore .gitignore
|
||||
"install universal ctags"
|
||||
" TODO add this to script npm i -g bash-language-server
|
||||
|
|
|
@ -4,7 +4,7 @@ let g:ale_linters = {
|
|||
\ 'c' : ['gcc'],
|
||||
\ 'vim' : ['vint'],
|
||||
\ 'python': ['pydocstyle', 'pycodestyle', 'vulture'],
|
||||
\ 'javascript': ['eslint']
|
||||
\ 'javascript': []
|
||||
\}
|
||||
|
||||
let g:ale_fixers = {
|
||||
|
|
4
modules/colorizer.vim
Normal file
4
modules/colorizer.vim
Normal file
|
@ -0,0 +1,4 @@
|
|||
let g:colorizer_syntax = 1
|
||||
let g:colorizer_auto_filetype='js,css,html,jsx,ts,tsx'
|
||||
au BufNewFile,BufRead *.css,*.html,*.htm,*.js,*.jsx,*.ts,*.tsx :ColorHighlight!
|
||||
|
1
modules/emmet.vim
Normal file
1
modules/emmet.vim
Normal file
|
@ -0,0 +1 @@
|
|||
let g:user_emmet_leader_key=','
|
|
@ -21,8 +21,8 @@ set splitbelow " Horizontal splits will automatically b
|
|||
set splitright " Vertical splits will automatically be to the right
|
||||
set t_Co=256 " Support 256 colors
|
||||
set autochdir " Your working directory will always be the same as your working directory
|
||||
set tabstop=4 " Insert 4 spaces for a tab
|
||||
set shiftwidth=4 " Change the number of space characters inserted for indentation
|
||||
set tabstop=2 " Insert 2 spaces for a tab
|
||||
set shiftwidth=2 " Change the number of space characters inserted for indentation
|
||||
set smarttab " Makes tabbing smarter will realize you have 2 vs 4
|
||||
set expandtab " Converts tabs to spaces
|
||||
set smartindent " Makes indenting smart
|
||||
|
@ -92,6 +92,7 @@ nnoremap <silent> <leader>s :Startify<return>
|
|||
nnoremap <silent> <leader>w :w<return>
|
||||
nnoremap <silent> <leader>p :pclose<return>
|
||||
nnoremap <silent> <leader>b :BuffergatorToggle<return>
|
||||
nnoremap <silent> <leader>ch :ColorToggle<return>
|
||||
nnoremap <silent> <leader>gy :Goyo<return>
|
||||
nnoremap <silent> <leader>hi :nohlsearch<return>
|
||||
nnoremap <silent> <leader>hs :split<return>
|
||||
|
@ -112,6 +113,7 @@ nnoremap <silent> <leader>fr :call LanguageClient_textDocument_references()<CR>
|
|||
endfun
|
||||
nnoremap <silent> <leader>in :call OpenConfigFile('~/.config/nvim/init.vim')<cr>
|
||||
nnoremap <silent> <leader>bashrc :call OpenConfigFile('~/.bashrc')<cr>
|
||||
nnoremap <silent> <leader>code :call OpenConfigFile('~/Library/Application Support/Code/User/settings.json')<cr>
|
||||
|
||||
nnoremap <C-h> <C-w>h
|
||||
nnoremap <C-j> <C-w>j
|
||||
|
|
|
@ -5,8 +5,8 @@ let g:LanguageClient_autoStart = 1
|
|||
|
||||
let g:LanguageClient_serverCommands = {
|
||||
\ 'rust': ['~/.cargo/bin/rustup', 'run', 'stable', 'rls'],
|
||||
\ 'javascript': ['/usr/local/bin/javascript-typescript-stdio'],
|
||||
\ 'javascript.jsx': ['tcp://127.0.0.1:2089'],
|
||||
\ 'javascript': ['javascript-typescript-stdio'],
|
||||
\ 'javascript.jsx': ['javascript-typescript-stdio'],
|
||||
\ 'python': ['pyls'],
|
||||
\ 'sh': ['bash-language-server', 'start'],
|
||||
\ 'c' : ['cquery'],
|
||||
|
@ -18,4 +18,4 @@ nnoremap <silent> <leader>gd :call LanguageClient_textDocument_definition()<CR>
|
|||
nnoremap <silent> <leader>gr :call LanguageClient_textDocument_rename()<CR>
|
||||
nnoremap <silent> <leader>gc :call LanguageClient_contextMenu()<CR>
|
||||
nnoremap <silent> <leader>fr :call LanguageClient_textDocument_references()<CR>
|
||||
|
||||
nnoremap <silent> <leader>fix :call LanguageClient#textDocument_formatting()<CR>
|
||||
|
|
22
modules/neosnippets.vim
Normal file
22
modules/neosnippets.vim
Normal file
|
@ -0,0 +1,22 @@
|
|||
" Plugin key-mappings.
|
||||
" Note: It must be "imap" and "smap". It uses <Plug> mappings.
|
||||
imap <C-l> <Plug>(neosnippet_expand_or_jump)
|
||||
smap <C-l> <Plug>(neosnippet_expand_or_jump)
|
||||
xmap <C-l> <Plug>(neosnippet_expand_target)
|
||||
|
||||
imap <F4> <Plug>(neosnippet_expand_or_jump)
|
||||
smap <F4> <Plug>(neosnippet_expand_or_jump)
|
||||
xmap <F4> <Plug>(neosnippet_expand_target)
|
||||
" SuperTab like snippets behavior.
|
||||
" Note: It must be "imap" and "smap". It uses <Plug> mappings.
|
||||
"imap <expr><TAB>
|
||||
" \ pumvisible() ? "\<C-n>" :
|
||||
" \ neosnippet#expandable_or_jumpable() ?
|
||||
" \ "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"
|
||||
smap <expr><TAB> neosnippet#expandable_or_jumpable() ?
|
||||
\ "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"
|
||||
|
||||
" For conceal markers.
|
||||
if has('conceal')
|
||||
set conceallevel=2 concealcursor=niv
|
||||
endif
|
|
@ -15,6 +15,7 @@ if dein#load_state('~/.config/nvim/dein')
|
|||
" call dein#add('joshdick/onedark.vim')
|
||||
" call dein#add('morhetz/gruvbox')
|
||||
call dein#add('jacoborus/tender.vim')
|
||||
call dein#add('luochen1990/rainbow')
|
||||
"Interface"
|
||||
call dein#add('Shougo/denite.nvim')
|
||||
" Neoterm
|
||||
|
@ -28,6 +29,8 @@ if dein#load_state('~/.config/nvim/dein')
|
|||
call dein#add('vim-airline/vim-airline-themes')
|
||||
" File manager
|
||||
call dein#add('scrooloose/NERDTree')
|
||||
" Comments "
|
||||
call dein#add('scrooloose/nerdcommenter')
|
||||
" Icons
|
||||
call dein#add('ryanoasis/vim-devicons')
|
||||
call dein#add('tiagofumo/vim-nerdtree-syntax-highlight')
|
||||
|
@ -70,6 +73,15 @@ if dein#load_state('~/.config/nvim/dein')
|
|||
call dein#add('~/.config/nvim/dein/repos/github.com/Shougo/dein.vim')
|
||||
call dein#add('Shougo/deoplete.nvim', {'do': 'UpdateRemotePlugins'})
|
||||
call dein#add('Shougo/neoinclude.vim')
|
||||
" Snippets "
|
||||
call dein#add('Shougo/neosnippet.vim')
|
||||
call dein#add('Shougo/neosnippet-snippets')
|
||||
call dein#add('mattn/emmet-vim')
|
||||
" Colorizer "
|
||||
call dein#add('chrisbra/Colorizer')
|
||||
" Python docstring "
|
||||
call dein#add('heavenshell/vim-pydocstring')
|
||||
|
||||
if !has('nvim')
|
||||
call dein#add('roxma/nvim-yarp')
|
||||
call dein#add('roxma/vim-hug-neovim-rpc')
|
||||
|
|
2
modules/pydocstring.vim
Normal file
2
modules/pydocstring.vim
Normal file
|
@ -0,0 +1,2 @@
|
|||
nmap <silent> <leader>doc <Plug>(pydocstring)
|
||||
|
23
modules/rainbow.vim
Normal file
23
modules/rainbow.vim
Normal file
|
@ -0,0 +1,23 @@
|
|||
let g:rainbow_active = 1 "0 if you want to enable it later via :RainbowToggle
|
||||
let g:rainbow_conf = {
|
||||
\ 'guifgs': ['royalblue3', 'darkorange3', 'seagreen3', 'firebrick'],
|
||||
\ 'ctermfgs': ['lightblue', 'lightyellow', 'lightcyan', 'lightmagenta'],
|
||||
\ 'operators': '_,_',
|
||||
\ 'parentheses': ['start=/(/ end=/)/ fold', 'start=/\[/ end=/\]/ fold', 'start=/{/ end=/}/ fold'],
|
||||
\ 'separately': {
|
||||
\ '*': {},
|
||||
\ 'tex': {
|
||||
\ 'parentheses': ['start=/(/ end=/)/', 'start=/\[/ end=/\]/'],
|
||||
\ },
|
||||
\ 'lisp': {
|
||||
\ 'guifgs': ['royalblue3', 'darkorange3', 'seagreen3', 'firebrick', 'darkorchid3'],
|
||||
\ },
|
||||
\ 'vim': {
|
||||
\ 'parentheses': ['start=/(/ end=/)/', 'start=/\[/ end=/\]/', 'start=/{/ end=/}/ fold', 'start=/(/ end=/)/ containedin=vimFuncBody', 'start=/\[/ end=/\]/ containedin=vimFuncBody', 'start=/{/ end=/}/ fold containedin=vimFuncBody'],
|
||||
\ },
|
||||
\ 'html': {
|
||||
\ 'parentheses': ['start=/\v\<((area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)[ >])@!\z([-_:a-zA-Z0-9]+)(\s+[-_:a-zA-Z0-9]+(\=("[^"]*"|'."'".'[^'."'".']*'."'".'|[^ '."'".'"><=`]*))?)*\>/ end=#</\z1># fold'],
|
||||
\ },
|
||||
\ 'css': 0,
|
||||
\ }
|
||||
\}
|
Loading…
Add table
Add a link
Reference in a new issue