tree sitter, lots of changes:
This commit is contained in:
parent
ed2e296a22
commit
63a8fb34ae
|
@ -2,6 +2,7 @@ syntax enable
|
||||||
let mapleader = " "
|
let mapleader = " "
|
||||||
|
|
||||||
call plug#begin('~/.vim/plugged')
|
call plug#begin('~/.vim/plugged')
|
||||||
|
Plug 'ludovicchabant/vim-gutentags'
|
||||||
Plug 'ervandew/supertab'
|
Plug 'ervandew/supertab'
|
||||||
Plug 'preservim/nerdtree'
|
Plug 'preservim/nerdtree'
|
||||||
Plug 'liuchengxu/space-vim-dark'
|
Plug 'liuchengxu/space-vim-dark'
|
||||||
|
@ -13,19 +14,30 @@ call plug#begin('~/.vim/plugged')
|
||||||
Plug 'airblade/vim-gitgutter'
|
Plug 'airblade/vim-gitgutter'
|
||||||
Plug 'majutsushi/tagbar'
|
Plug 'majutsushi/tagbar'
|
||||||
Plug 'vim-airline/vim-airline'
|
Plug 'vim-airline/vim-airline'
|
||||||
" Plug 'ctrlpvim/ctrlp.vim' " Replaced with telescope
|
|
||||||
Plug 'enricobacis/vim-airline-clock'
|
Plug 'enricobacis/vim-airline-clock'
|
||||||
Plug 'nvim-lua/plenary.nvim'
|
Plug 'nvim-lua/plenary.nvim'
|
||||||
Plug 'nvim-telescope/telescope.nvim'
|
Plug 'nvim-telescope/telescope.nvim'
|
||||||
Plug 'thoughtbot/vim-rspec'
|
Plug 'thoughtbot/vim-rspec'
|
||||||
Plug 'voldikss/vim-floaterm'
|
Plug 'voldikss/vim-floaterm'
|
||||||
Plug 'fatih/vim-go'
|
Plug 'fatih/vim-go'
|
||||||
|
Plug 'folke/which-key.nvim'
|
||||||
|
Plug 'whatyouhide/vim-gotham'
|
||||||
|
Plug 'nanotech/jellybeans.vim'
|
||||||
|
Plug 'sickill/vim-monokai'
|
||||||
|
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
|
lua << EOF
|
||||||
|
require("which-key").setup {
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
map <C-o> :NERDTreeToggle<CR>
|
map <C-o> :NERDTreeToggle<CR>
|
||||||
|
map <Leader>v :WhichKey<CR>
|
||||||
|
|
||||||
|
|
||||||
set tabstop=2
|
set tabstop=2
|
||||||
set shell=/bin/bash
|
set shell=/bin/zsh
|
||||||
set shiftwidth=2
|
set shiftwidth=2
|
||||||
set expandtab
|
set expandtab
|
||||||
set hidden
|
set hidden
|
||||||
|
@ -41,7 +53,7 @@ endif
|
||||||
colorscheme space-vim-dark
|
colorscheme space-vim-dark
|
||||||
hi Comment cterm=italic
|
hi Comment cterm=italic
|
||||||
|
|
||||||
" Relative numbers and when not in buiffer set absolute numbers
|
" Relative numbers and when not in buffer set absolute numbers
|
||||||
set number relativenumber
|
set number relativenumber
|
||||||
augroup numbertoggle
|
augroup numbertoggle
|
||||||
autocmd!
|
autocmd!
|
||||||
|
@ -56,8 +68,8 @@ nnoremap Q <nop>
|
||||||
|
|
||||||
" Search with Ag
|
" Search with Ag
|
||||||
nnoremap <Leader>/ :Ag<CR>
|
nnoremap <Leader>/ :Ag<CR>
|
||||||
nnoremap <C-J> :bnext<CR>
|
nnoremap <C-K> :bnext<CR>
|
||||||
nnoremap <C-K> :bprev<CR>
|
nnoremap <C-J> :bprev<CR>
|
||||||
nmap <leader>bq :bp <BAR> bd #<CR>
|
nmap <leader>bq :bp <BAR> bd #<CR>
|
||||||
|
|
||||||
"Clock
|
"Clock
|
||||||
|
@ -67,7 +79,13 @@ let g:airline#extensions#clock#format = '%I:%M:%S %X'
|
||||||
nnoremap <leader>ff <cmd>Telescope find_files<cr>
|
nnoremap <leader>ff <cmd>Telescope find_files<cr>
|
||||||
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
|
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
|
||||||
nnoremap <leader>fb <cmd>Telescope buffers<cr>
|
nnoremap <leader>fb <cmd>Telescope buffers<cr>
|
||||||
|
nnoremap <leader>fa <cmd>Ag<cr>
|
||||||
" nnoremap <leader>ft <cmd>Telescope help_tags<cr>
|
" nnoremap <leader>ft <cmd>Telescope help_tags<cr>
|
||||||
|
"lua << EOF
|
||||||
|
"require('telescope').setup{
|
||||||
|
" file_ignore_patterns = {"node_modules","./venv/"},
|
||||||
|
"}
|
||||||
|
"EOF
|
||||||
|
|
||||||
" RSpec.vim mappings
|
" RSpec.vim mappings
|
||||||
map <Leader>rt :call RunCurrentSpecFile()<CR>
|
map <Leader>rt :call RunCurrentSpecFile()<CR>
|
||||||
|
@ -75,11 +93,66 @@ map <Leader>rs :call RunNearestSpec()<CR>
|
||||||
map <Leader>rl :call RunLastSpec()<CR>
|
map <Leader>rl :call RunLastSpec()<CR>
|
||||||
map <Leader>ra :call RunAllSpecs()<CR>
|
map <Leader>ra :call RunAllSpecs()<CR>
|
||||||
|
|
||||||
let g:python_host_prog = '~/.nvim.pythonenv2/bin/python'
|
" let g:python_host_prog = '~/.nvim.pythonenv2/bin/python'
|
||||||
let g:python3_host_prog = '~/.nvim.pythonenv/bin/python'
|
if exists("$VIRTUAL_ENV")
|
||||||
|
let g:python3_host_prog=substitute(system("which -a python3 | head -n2 | tail -n1"), "\n", '', 'g')
|
||||||
|
else
|
||||||
|
let g:python3_host_prog=substitute(system("which python3"), "\n", '', 'g')
|
||||||
|
endif
|
||||||
|
|
||||||
" Floaterm
|
" Floaterm
|
||||||
let g:floaterm_keymap_toggle = '<F9>'
|
let g:floaterm_keymap_toggle = '<F9>'
|
||||||
let g:floaterm_width = 0.85
|
let g:floaterm_width = 0.9
|
||||||
let g:floaterm_height = 0.85
|
let g:floaterm_height = 0.9
|
||||||
|
|
||||||
|
|
||||||
|
" Line Numbers
|
||||||
|
set number relativenumber " Turn line numbering on at startup
|
||||||
|
noremap <F1> :set invnumber invrelativenumber<CR>
|
||||||
|
|
||||||
|
"Tagbar
|
||||||
|
"
|
||||||
|
noremap <F8> :Tagbar<CR>
|
||||||
|
|
||||||
|
|
||||||
|
" Syntax Colors
|
||||||
|
function! SynStack ()
|
||||||
|
for i1 in synstack(line("."), col("."))
|
||||||
|
let i2 = synIDtrans(i1)
|
||||||
|
let n1 = synIDattr(i1, "name")
|
||||||
|
let n2 = synIDattr(i2, "name")
|
||||||
|
echo n1 "->" n2
|
||||||
|
endfor
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
" TreeSitter
|
||||||
|
lua <<EOF
|
||||||
|
require'nvim-treesitter.configs'.setup {
|
||||||
|
-- One of "all", "maintained" (parsers with maintainers), or a list of languages
|
||||||
|
ensure_installed = "maintained",
|
||||||
|
|
||||||
|
-- Install languages synchronously (only applied to `ensure_installed`)
|
||||||
|
sync_install = false,
|
||||||
|
|
||||||
|
-- List of parsers to ignore installing
|
||||||
|
ignore_install = {},
|
||||||
|
|
||||||
|
highlight = {
|
||||||
|
-- `false` will disable the whole extension
|
||||||
|
enable = true,
|
||||||
|
|
||||||
|
-- list of language that will be disabled
|
||||||
|
disable = { "c", "rust" },
|
||||||
|
|
||||||
|
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||||
|
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
||||||
|
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||||
|
-- Instead of true it can also be a list of languages
|
||||||
|
additional_vim_regex_highlighting = false,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
"Guten Tags
|
||||||
|
set statusline+=%{gutentags#statusline()}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user