Created
January 13, 2022 17:10
-
-
Save RayZ0rr/5711dbe3bd62190e8447c2411b4ddbbf to your computer and use it in GitHub Desktop.
Minimal vimrc based on Vim-plug for treesitter testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if has('vim_starting') | |
set encoding=utf-8 | |
endif | |
scriptencoding utf-8 | |
if &compatible | |
set nocompatible | |
endif | |
let s:plug_dir = expand('/tmp/plugged/vim-plug') | |
if !filereadable(s:plug_dir .. '/plug.vim') | |
execute printf('!curl -fLo %s/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim', s:plug_dir) | |
end | |
execute 'set runtimepath+=' . s:plug_dir | |
call plug#begin(s:plug_dir) | |
Plug 'nvim-treesitter/nvim-treesitter' | |
call plug#end() | |
PlugInstall | quit | |
lua << EOF | |
vim.cmd [[ source $HOME/.config/nvim/vimscript/options/settings.vim ]] | |
vim.cmd [[ luafile $HOME/.config/nvim/lua/options/mappings.lua]] | |
-- vim.cmd [[ source $HOME/.config/nvim/vimscript/options/themes.vim ]] | |
-- vim.cmd [[luafile $HOME/.config/nvim/lua/plugins/treesitter/init.lua]] | |
require('nvim-treesitter.configs').setup { | |
ensure_installed = { | |
"bash", | |
"c", | |
"cpp", | |
"lua", | |
"python", | |
"rust", | |
"html", | |
"css", | |
"toml", | |
"vim", | |
-- for `nvim-treesitter/playground` | |
"query", | |
}, | |
-- Install languages synchronously (only applied to `ensure_installed`) | |
sync_install = false, | |
highlight = { | |
enable = true, -- false will disable the whole extension | |
additional_vim_regex_highlighting = false, | |
}, | |
incremental_selection = { | |
enable = true, | |
keymaps = { | |
-- init_selection = 'gnn', | |
init_selection = '<cr>', | |
node_incremental = '<tab>', | |
scope_incremental = 'grc', | |
node_decremental = '<s-tab>', | |
}, | |
}, | |
indent = { | |
enable = true, | |
}, | |
} | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment