summaryrefslogtreecommitdiff
path: root/lua/nvim-treesitter/query.lua
AgeCommit message (Collapse)Author
2020-09-01health: add fold queries to check healthThomas Vigouroux
2020-08-22fix(modules): do not reattach if already attachedSteven Sojka
2020-08-17Merge pull request #305 from theHamsta/textobjects-submodulesSteven Sojka
Textobjects submodules
2020-08-17some refacto, doc fixes and jsx querieskiyan42
- compute query language extensions *after* default ones (jsx after javascript) - remove outdated ts_utils functions from docs - add better regex detection to javascript - javascriptreact to use javascript queries - add javascript.jsx to javascript queries - write jsx.scm hl file
2020-08-17chore(textobject): use query.find_best_match to find next/previous textobjectStephan Seitz
2020-08-15fix: check 'after' against third directoryRafaƂ Camlet
2020-08-15Merge pull request #291 from vigoux/post-upstream-workSteven Sojka
fix: refactor after upstream refactor
2020-08-14feat: intuitive runtime queriesThomas Vigouroux
Starting now, runtime queries will be sourced in this order : - Queries that are not in any `after` folder, will serve as a base, with each occurence overwriting the others (that is, .config/nvim/queries has the highest priority) - Queries within the `after` directory will be sourced one after the other. The rationale is that this reminds all the `.vim` files (ftplugin) for example, and this allows both to experiment and to override queries easily.
2020-08-14fix: refactor after upstream refactorThomas Vigouroux
2020-08-13fix(definitions): optimize and fix definition highlightingSteven Sojka
2020-08-11fix(queries): don't load queries on startupSteven Sojka
2020-07-27Add predicates moduleStephan Seitz
2020-07-16Refactor locals.lua:Stephan Seitz
- shared query group stuff -> query.lua - local-specific stuff from ts_utils -> locals.lua
2020-07-15checkhealth for all query groupsStephan Seitz
2020-07-14Add textobjects moduleStephan Seitz
2020-06-30Define multiple query for a languagekiyan42
Allows using another query file for a language, or use a query file from another language
2020-06-30feat(refactor): add smart rename moduleSteven Sojka
2020-06-30feat(refactor): highlight usages moduleSteven Sojka
2020-06-21fix: separate queries with newlinesThomas Vigouroux
2020-06-20refactor: parser list and lang->ft/ft->langkiyan42
- move parser list in `parsers.lua` - most `ft` variable where changed to `lang`, `ft` is only used on autocmd binding, and lang is used for everything else. Functions have been defined to make the switch between `ft` and `lang`
2020-06-15Fixup: Introduce base languages for queriesStephan Seitz
Use same argument for nvim_get_runtime_file for base language
2020-06-15Introduce base languages for queriesStephan Seitz
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-14feat(queries): allow for user overridesSteven Sojka
2020-05-12refacto/feat: better handling of parser updateskiyan42
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-04-22feat: syntax highlightingThomas Vigouroux
2020-04-19fix(matches): better storage of nodesThomas Vigouroux
2020-04-19feat: add parsers module and better match iterThomas Vigouroux
The `parsers` module manages parsers for us, for now only in a really basic way. iter_prepared_mathes iters on an enhanced versions of the matches, where captures are directly accessible via their names to allow things like : ((itentifier) @def.first (identifier) @def.last) To be handled like this in lua: match.def.first match.def.last Also adds a `set!` predicate to allow setting data within the prepared match (see queries/lua/locals.scm) for examples.