aboutsummaryrefslogtreecommitdiffstats
path: root/lua
Commit message (Collapse)AuthorAgeFilesLines
...
* refacto/feat: better handling of parser updateskiyan422020-05-1212-310/+528
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* fix: change locals extractionThomas Vigouroux2020-05-071-2/+2
|
* feat: support suggested highlightsThomas Vigouroux2020-05-071-0/+41
|
* feat: provide a statusline indicatorThomas Vigouroux2020-05-052-1/+33
| | | | | | | | | 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
* Add 'nvim-treesitter/node-movement'Stephan Seitz2020-05-033-0/+161
|
* modules: move textobj to incremental_selectionThomas Vigouroux2020-05-022-4/+8
| | | | | As suggested in #37, rename the textobj module to incremental_selection. Also adds a utility function to get the config of a module.
* Merge pull request #36 from theHamsta/community-parsersKiyan Yazdani2020-05-011-0/+56
|\ | | | | Add some more community parsers
| * Add some more community parsersStephan Seitz2020-05-011-0/+56
| | | | | | | | The haskell one really takes long to compile
* | update docs for ensure installed, move modules config in config.moduleskiyan422020-05-011-44/+43
|/
* Avoid global handle to enable installing multiple parsers in parallelStephan Seitz2020-05-011-1/+3
|
* Add `ensure_installed` option to configStephan Seitz2020-05-011-0/+3
|
* Add function 'nvim-treesitter/install'.ensure_installedStephan Seitz2020-05-011-0/+19
|
* fix install by changing cc arguments positionkiyan422020-04-271-6/+6
|
* health(refactor): move checks inside health.luaThomas Vigouroux2020-04-263-34/+23
|
* health: add highlight to healthchecksThomas Vigouroux2020-04-262-0/+18
|
* refactor(textobj): remove unnecessary functionsThomas Vigouroux2020-04-251-12/+4
|
* refactor(textobj): use configs and don't use VimLThomas Vigouroux2020-04-252-41/+73
|
* textobj: little refactorThomas Vigouroux2020-04-252-13/+14
|
* textobj: add incremental scope selectionThomas Vigouroux2020-04-252-0/+37
|
* textobj: add incremental node selectionThomas Vigouroux2020-04-252-6/+42
|
* fix: config is enabled also checks parser existencekiyan422020-04-252-7/+8
|
* feat/refacto: improve configurationskiyan422020-04-247-104/+442
| | | | | | | | | | | - You should now get the configs through functions - Configs for languages are now inside a local object called parsers - You can get the parser installation configurations with `get_parser_configs` - A new object has been initialized inside configs to specify module config (called config). - Provide functions to enable/disable a module on one buffer - Provide functions to enable/disable a module on all buffers, and if filetype is specified, for specific filetype - Provide function to determine if module is activated for a specified filetype
* fix: add -fPIC flag to compilinghaorenW10252020-04-231-0/+1
|
* highlight: retain highlighters with the buffersThomas Vigouroux2020-04-221-2/+4
|
* feat: syntax highlightingThomas Vigouroux2020-04-223-1/+21
|
* feat/refacto: add configs.lua, setup installkiyan422020-04-214-121/+163
| | | | | | | | - configs.lua holds the `repositories` data - install health moved to health.lua - plugins loads _root.setup() on startup - install and list command are available through vim > use them with `:TSInstall lang` and `:TSInstallInfo`
* fix: parser install tbl_flatten > unpackkiyan422020-04-211-13/+21
| | | | | - fix parser install - format install.lua
* Merge pull request #11 from kyazdani42/parser-listThomas Vigouroux2020-04-212-0/+18
|\ | | | | feat: add parser list
| * feat: add parser listkiyan422020-04-202-0/+18
| |
* | feat: add typescript installkiyan422020-04-211-8/+21
| | | | | | | | | | | | - add repo.location for typescript and compile at that location - typescript and tsx must be installed separately as two different parsers.
* | refacto/feat: enable csharp install, fix clonekiyan422020-04-211-7/+8
| | | | | | | | | | | | - clone only master at depth 1 to avoid long download from huge repos. - use ft to specify folder name to clone so csharp can be cloned and used properly.
* | fix: repositories from M.repositories since last merge.kiyan422020-04-211-1/+1
| |
* | feat: add checkhealthkiyan422020-04-213-1/+90
| |
* | Merge pull request #10 from vigoux/feature/node-utilsThomas Vigouroux2020-04-201-0/+66
|\ \ | | | | | | Node manipulation utilities
| * | feat: add node manipulation utilsThomas Vigouroux2020-04-201-0/+66
| | |
* | | feat: add most parserskiyan422020-04-201-6/+69
| |/ |/|
* | Merge pull request #4 from kyazdani42/improve-installerThomas Vigouroux2020-04-201-38/+102
|\ \ | |/ |/| feat/refacto: improve installer
| * feat/refacto: improve installerkiyan422020-04-201-38/+102
| |
* | perf: don't compute locals on buffer updatesThomas Vigouroux2020-04-192-15/+11
| | | | | | | | | | | | | | Instead we lazily evaluate them on request. This allow two things : * better performances * being sure the locas are up to date
* | fix: prepare injections mechanismThomas Vigouroux2020-04-192-4/+8
| |
* | style: avoid overindenting thingsThomas Vigouroux2020-04-191-12/+12
| |
* | fix(matches): better storage of nodesThomas Vigouroux2020-04-191-1/+1
| |
* | feat: add locals to setup procedureThomas Vigouroux2020-04-192-5/+19
| |
* | feat: first version of localsThomas Vigouroux2020-04-191-0/+82
|/ | | | | | | Locals will be the main interface to treesitter, through some functions: get_definitions(bufnr) : returns all the definitions in bufnr get_scopes(bufnr): returns all definitions in bufnr get_references(bufnr): returns all references in bufnr
* add parser installerkiyan422020-04-192-0/+79
|
* feat: add parsers module and better match iterThomas Vigouroux2020-04-194-19/+100
| | | | | | | | | | | | | | | 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.
* feat: add empty setup functionThomas Vigouroux2020-04-181-0/+10
| | | | | Will be used later to setup everything so that a language works properly in each situation.
* feat: add some utils to read queriesThomas Vigouroux2020-04-181-0/+19