Commit graph

154 commits

Author SHA1 Message Date
Stephan Seitz
df06026110 Introduce base languages for queries
Some treesitter grammars just extend another treesitter grammar.
This enables us to use the C queries also for C++.
We only need to put additional queries in the C++ files.
2020-06-15 11:51:28 +02:00
Kiyan Yazdani
6b26674ba0
Merge pull request #80 from steelsojka/feat/user-query-overrides
feat(queries): allow user query overrides
2020-06-15 11:43:42 +02:00
Thomas Vigouroux
90ec2d5250
Merge pull request #70 from theHamsta/regex
Add tree-sitter-regex
2020-06-14 14:34:55 +02:00
Stephan Seitz
45ea0df21a Add tree-sitter-regex
This might be interesting for injected highlighting
2020-06-14 13:09:38 +02:00
Steven Sojka
44108fe03e feat(queries): allow for user overrides 2020-06-14 05:58:09 -05:00
Thomas Vigouroux
a067924507 Update issue templates
Add some issue templates
2020-06-14 11:57:09 +02:00
Thomas Vigouroux
ca438b7b2e
Merge pull request #77 from TravonteD/76-syntax-update
- #76 update the predicate syntax for ruby and css
2020-06-12 09:49:39 +02:00
TravonteD
37f9866f66 - #76 update the predicate syntax for ruby and css 2020-06-11 10:38:19 -04:00
Thomas Vigouroux
85645f5720
Merge pull request #69 from theHamsta/go-highlights
Go highlights
2020-06-07 13:58:38 +02:00
Stephan Seitz
8436f2b90b Update CONTRIBUTING.md for @doc 2020-06-07 12:39:58 +02:00
Stephan Seitz
5a096cb3f1 Add call references for Go 2020-06-07 12:39:58 +02:00
Stephan Seitz
452447694a Add go locals.scm 2020-06-07 12:39:58 +02:00
Stephan Seitz
04040c61c7 Add highlights.scm for Go 2020-06-07 12:39:58 +02:00
Kiyan Yazdani
a76c7b3b70
Merge pull request #75 from theHamsta/html-quoted_attribute_value
html: Highlight (quoted_attribute_value) as @string
2020-06-05 19:01:29 +02:00
Stephan Seitz
0ad3872fde html: Highlight (quoted_attribute_value) as @string 2020-06-05 18:21:01 +02:00
Thomas Vigouroux
c934ea694c
Merge pull request #68 from TravonteD/html
Add html highlight queries
2020-06-02 21:15:48 +02:00
Thomas Vigouroux
8763a3163f
Merge pull request #67 from TravonteD/css
Add css highlight queries
2020-06-02 21:13:43 +02:00
TravonteD
d32d5abb4a Add html highlight queries 2020-06-02 15:13:36 -04:00
TravonteD
58f5bdbe01 Add css highlight queries 2020-06-02 15:11:35 -04:00
Thomas Vigouroux
2c7b416441
Merge pull request #73 from theHamsta/python-locals
Update python locals: `list_splat` and `dictionary_splat` define vari…
2020-06-02 21:08:17 +02:00
Stephan Seitz
92417aa4ea Update python locals: list_splat and dictionary_splat define variables as parameters 2020-06-02 21:13:09 +02:00
Kiyan Yazdani
9feae9c054
Merge pull request #71 from stsewd/fix-exampple
Fix example mappings
2020-06-02 11:20:45 +02:00
Santos Gallegos
53284f311a Fix example mappings 2020-06-01 19:15:28 -05:00
Thomas Vigouroux
d73988a907
Merge pull request #66 from theHamsta/python-kw-highlight
Improve Python highlights
2020-06-01 08:49:18 +02:00
Stephan Seitz
807d6e11fa Improve Python highlights
- Highlight types in attributes as @type (**Foo**.a)
- Highlight superclasses @type
- Highlight ^[A-Z] as @type
- Highlight isinstance(*, type) as @type
- Highlight default_parameter and keyword_argument as @parameter
- Highlight *args, **kwargs as @parameter
- Highlight -> as @operator
2020-05-28 10:42:45 +02:00
Kiyan Yazdani
cdc92965d6
Merge pull request #65 from theHamsta/typo-foldexpr
Fix typo in README.md: foldexr -> foldexpr
2020-05-26 19:59:13 +02:00
Stephan Seitz
43b30d571a Fix typo in README.md: foldexr -> foldexpr 2020-05-26 19:32:33 +02:00
Kiyan Yazdani
c35d8ac4d5
Merge pull request #64 from vigoux/feature/folding
Treesitter based code folding.
2020-05-25 11:31:24 +02:00
Thomas Vigouroux
c035fb9f5d docs: document folding 2020-05-25 11:19:38 +02:00
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