Commit Graph

125 Commits

Author SHA1 Message Date
Thomas Vigouroux
fbade728fe feat: add syntax-based folding 2020-05-25 11:19:38 +02:00
Thomas Vigouroux
d1da10ce1c Merge pull request #62 from theHamsta/c-locals
Some improvements to c/locals.scm
2020-05-24 23:11:57 +02:00
Stephan Seitz
9f2f792bcd Some improvements to c/locals.scm
- Fix function scope (was declaration only without body)
- Use @definition.var like the other local files
- Add translation_unit scope
2020-05-23 22:23:29 +02:00
Thomas Vigouroux
9afad9698e Merge pull request #56 from theHamsta/python-locals
Add python locals.scm
2020-05-23 15:19:03 +02:00
Kiyan Yazdani
fb672f2630 Merge pull request #61 from theHamsta/cleanup-postspace
Remove postspaces and avoid one global
2020-05-22 17:11:59 +02:00
Stephan Seitz
3b3a692e2c Remove postspaces and avoid one global 2020-05-22 17:07:28 +02:00
Kiyan Yazdani
d8328b8e1c Merge pull request #60 from klauer/doc_missing_eof
docs: missing EOF for init.vim
2020-05-19 19:41:30 +02:00
K Lauer
70224ffc8f docs: missing EOF for init.vim 2020-05-19 10:07:56 -07:00
Stephan Seitz
f6bf56974e Introduce @include 2020-05-17 21:56:44 +02:00
Stephan Seitz
57424533a7 Add python/highlights.scm from tree-sitter-python 2020-05-17 21:56:44 +02:00
Stephan Seitz
a5c50262d9 Add python locals.scm 2020-05-16 19:32:02 +02:00
Kiyan Yazdani
45400888ad Merge pull request #53 from vigoux/c-queries
Add C queries
2020-05-16 15:02:12 +02:00
Thomas Vigouroux
89e593b910 docs: update README 2020-05-16 14:47:17 +02:00
Thomas Vigouroux
92aafcf51c queries: add C queries
Also add a missing `field` capture in locals query.
2020-05-16 14:47:17 +02:00
Kiyan Yazdani
7fab1a8b12 Merge pull request #55 from vigoux/install-multiple-args
Allow installing multiple parsers at once
2020-05-15 17:40:19 +02:00
Thomas Vigouroux
0ab6bbec67 install: allow installing multiple parsers at once
This allow commands like so :
  :TSInstall c rust lua python
2020-05-15 17:24:54 +02:00
Thomas Vigouroux
9c32111191 Merge pull request #54 from kyazdani42/feat/expose-api
Expose internal api.
2020-05-15 15:01:06 +02:00
kiyan42
8be2dc64a2 Expose internal api.
- add `exposed_state` to expose 'current_node' and 'cursor_pos'
for a current buffer to the user.
- add `get_buf_state` and `get_node_api` for users.
- add documentation about api functions.
- remove `node_movement` module which should be done in user side.
2020-05-15 14:19:29 +02:00
Kiyan Yazdani
5a66c38b9f Merge pull request #45 from kyazdani42/refacto-feat/buf-state-update
refacto/feat: better handling of parser updates
2020-05-12 16:20:13 +02:00
kiyan42
45dcebb15f refacto/feat: better handling of parser updates
features:
- node_movement is moving between scopes.
- add selection initialization from normal mode
- add a decremental selection

improvements:
- attach to buffer to run tree parsing on change
- run state update on CursorMoved
- the buffer state is:
```
{
  cursor_pos = { row=row, col=col },
  current_node = node_under_cursor,
  selection = {
      range = nil, -- activates when starting a selection
      nodes = {} -- filling up when starting an incremental selection
  },
  parser = parser, -- parser for current buffer
}
```
- refacto all the modules reliant on parsing the tree, update the current nodes, get the current nodes...

fixes:
- fix has_parser to look for .so libraries
- fix should select the whole file when selection root in selection
2020-05-12 16:16:48 +02:00
Thomas Vigouroux
ca2680edce Merge pull request #51 from TravonteD/ruby-update
Update ruby highlights and locals to conform to contributing.md
2020-05-12 11:19:48 +02:00
TravonteD
64925f92d9 update ruby highlights and locals to conform the new contribution
standards
2020-05-11 11:54:59 -04:00
TravonteD
73ea03fb8d Merge pull request #1 from nvim-treesitter/master
Updates from master
2020-05-11 11:29:40 -04:00
Kiyan Yazdani
307c78aa1e Merge pull request #47 from theHamsta/fix-typo-contributing.md
Fix typo in CONTRIBUTING.md
2020-05-08 20:46:35 +02:00
Stephan Seitz
0a98fd5795 Fix typo in CONTRIBUTING.md 2020-05-08 18:03:06 +02:00
Kiyan Yazdani
64b7f77a5f Merge pull request #46 from theHamsta/fix-typo-readme
Fix typo in README.md
2020-05-08 16:43:04 +02:00
Stephan Seitz
9c4099a898 Fix typo in README.md 2020-05-08 16:16:12 +02:00
Kiyan Yazdani
e9bcc844d4 Merge pull request #40 from vigoux/contributing
Add CONTRIBUTING.md
2020-05-07 14:09:50 +02:00
Thomas Vigouroux
c6b0a62bd6 fix(CONTRIBUTING): typos 2020-05-07 14:03:29 +02:00
Thomas Vigouroux
22f73628f6 fix(lua): update queries 2020-05-07 14:03:29 +02:00
Thomas Vigouroux
824b063d0d fix: change locals extraction 2020-05-07 14:03:29 +02:00
Thomas Vigouroux
5dc5695413 feat: support suggested highlights 2020-05-07 14:03:29 +02:00
Thomas Vigouroux
2b3d4d21a8 docs: add contributig draft 2020-05-07 14:03:29 +02:00
Kiyan Yazdani
096ca6b068 Merge pull request #44 from vigoux/statusline
Provide a statusline indicator
2020-05-07 13:58:12 +02:00
Thomas Vigouroux
703ccbec59 docs: add statusline indicator informations.
Also document newly added parsers by adding them in the readme.
2020-05-07 13:04:53 +02:00
Thomas Vigouroux
7682a1a49f feat: provide a statusline indicator
It will show the current branch at the cursor going the tree as such.
root->node->subnode->leaf

If an argument is provided to `statusline`, then the tree will be
truncated as follows :
..->subnode->subnode
2020-05-05 20:06:45 +02:00
Thomas Vigouroux
5cc7407c7f Merge pull request #37 from theHamsta/node-movement
Add 'nvim-treesitter/node-movement'
2020-05-03 11:19:28 +02:00
Stephan Seitz
a33bccaaf0 Add documentation for node_movement, rename: textobj -> incremental_selection 2020-05-03 11:10:36 +02:00
Stephan Seitz
d0b84dd89f Add 'nvim-treesitter/node-movement' 2020-05-03 10:51:15 +02:00
Kiyan Yazdani
0207836eb2 Merge pull request #39 from vigoux/incremental_selection
Move textobj module to incremental_selection.
2020-05-02 14:37:46 +02:00
Thomas Vigouroux
39da51bbd1 modules: move textobj to incremental_selection
As suggested in #37, rename the textobj module to incremental_selection.
Also adds a utility function to get the config of a module.
2020-05-02 13:29:40 +02:00
Kiyan Yazdani
34c0b0cccb Merge pull request #36 from theHamsta/community-parsers
Add some more community parsers
2020-05-01 23:58:39 +02:00
Stephan Seitz
56f4aef198 Add some more community parsers
The haskell one really takes long to compile
2020-05-01 23:38:17 +02:00
Thomas Vigouroux
322bf360b2 Merge pull request #35 from kyazdani42/refacto/config-doc
update docs for ensure installed, move modules config in config.modules
2020-05-01 14:39:47 +02:00
kiyan42
dc06f9ea81 update docs for ensure installed, move modules config in config.modules 2020-05-01 12:26:57 +02:00
Kiyan Yazdani
1d6ad9b560 Merge pull request #34 from theHamsta/ensure_installed
Add function 'nvim-treesitter/install'.ensure_installed
2020-05-01 12:17:25 +02:00
Stephan Seitz
0b4cdba3e4 Avoid global handle to enable installing multiple parsers in parallel 2020-05-01 12:16:00 +02:00
Stephan Seitz
fc88339832 Add ensure_installed option to config 2020-05-01 12:16:00 +02:00
Stephan Seitz
6b2d76153f Add function 'nvim-treesitter/install'.ensure_installed 2020-05-01 10:09:48 +02:00
Thomas Vigouroux
5532019122 Merge pull request #33 from kyazdani42/doc/add-documentation
Doc/add documentation
2020-04-28 14:57:00 +02:00