diff options
| author | drocha87 <dlmrocha87@gmail.com> | 2020-11-12 19:34:35 -0300 |
|---|---|---|
| committer | Thomas Vigouroux <tomvig38@gmail.com> | 2020-11-13 07:47:15 +0100 |
| commit | 1f98c2e92810f02afcd7ce981beac5142e34ea87 (patch) | |
| tree | 71a21764de5ae103f1810349fdd29607c1f111f6 | |
| parent | Fix readme setup example (diff) | |
| download | nvim-treesitter-1f98c2e92810f02afcd7ce981beac5142e34ea87.tar nvim-treesitter-1f98c2e92810f02afcd7ce981beac5142e34ea87.tar.gz nvim-treesitter-1f98c2e92810f02afcd7ce981beac5142e34ea87.tar.bz2 nvim-treesitter-1f98c2e92810f02afcd7ce981beac5142e34ea87.tar.lz nvim-treesitter-1f98c2e92810f02afcd7ce981beac5142e34ea87.tar.xz nvim-treesitter-1f98c2e92810f02afcd7ce981beac5142e34ea87.tar.zst nvim-treesitter-1f98c2e92810f02afcd7ce981beac5142e34ea87.zip | |
Lua things all over the place
| -rw-r--r-- | README.md | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -104,7 +104,7 @@ And now you should be ready to use every functionality `nvim-treesitter` provide All modules are disabled by default, so you'll need to activate them by putting this in your `init.vim` file: -```lua +```vim lua <<EOF require'nvim-treesitter.configs'.setup { ensure_installed = "maintained", -- one of "all", "maintained" (parsers with maintainers), or a list of languages @@ -125,7 +125,8 @@ for a list of available modules and its options. Consistent syntax highlighting. -```lua +```vim +lua <<EOF require'nvim-treesitter.configs'.setup { highlight = { enable = true, @@ -136,13 +137,15 @@ require'nvim-treesitter.configs'.setup { }, }, } +EOF ``` ## Incremental selection Incremental selection based on the named nodes from the grammar. -```lua +```vim +lua <<EOF require'nvim-treesitter.configs'.setup { incremental_selection = { enable = true, @@ -154,18 +157,21 @@ require'nvim-treesitter.configs'.setup { }, }, } +EOF ``` ## Indentation Treesitter based indentation (`=` vim behavior) -```lua +```vim +lua <<EOF require'nvim-treesitter.config'.setup { indent = { enable = true } } +EOF ``` # External modules @@ -280,7 +286,8 @@ Users and plugin authors can take advantage of modules by creating their own. Mo You can use the `define_modules` function to define one or more modules or module groups. -```lua +```vim +lua <<EOF require'nvim-treesitter'.define_modules { my_cool_plugin = { attach = function(bufnr, lang) @@ -294,6 +301,7 @@ require'nvim-treesitter'.define_modules { end } } +EOF ``` Modules can consist of the following properties: |
