summaryrefslogtreecommitdiff
path: root/lua/nvim-treesitter/utils.lua
AgeCommit message (Collapse)Author
2022-10-31feat(emmy): add emmylua annotationsLewis Russell
2022-07-18fix(typo): utils.create_or_resue_writable_dir -> reuse (#3194)Kiyan
2022-07-07chore: reformat with Stylua 0.14.0Christian Clason
2022-06-20Add support for custom parser install locations #2959 (#3031)Duncan McDougall
2022-05-14fix(commands): add -bar to allow other commandskiyan
addresses #2920
2022-02-13typo fixbadhi
2022-02-13added doc for setup_commandbadhi
2022-02-13Fixed formattingbadhi
2022-02-13Added extra argument to setup commands so that user can change the function ↵badhi
args types
2022-02-06refacto: deprecate used_by in parsers.luakiyan
- remove print_warning function from utils.lua (unused) - cleanup some functions in parsers.lua (parameters overloading and wrong bufnr used). - log a deprecation notice when using used_by in a parser definition - default the filetype_to_parsername table to the list of filetypes previously in the used_by keys - update the README to indicate that change
2022-01-22feat: specify abi version for generate on newer ts cliChristian Clason
Check tree-sitter CLI version and if > 0.20.3 and generating a parser from grammar, use `--abi=vim.treesitter.language_version`. Besides being able to opt-in to newer ABI benefits, this is a necessary workaround for an upstream bug with 0.20.3, where `parser.h` is not generated if the (optional) `--abi` flag is omitted.
2021-10-22Use wrapper around vim.notify with common optionsSantos Gallegos
Ref https://github.com/nvim-treesitter/nvim-treesitter/pull/1927#issuecomment-947064843
2021-07-04Use stylua for autoformat code (#1480)Santos Gallegos
2021-07-04Fixed linting issuesShane Hird
2021-07-04Improved passing bang to functionsShane Hird
2021-07-04TSUpdate does not install if up to dateShane Hird
2021-07-04Use bang for TSInstall commandsShane Hird
2021-04-06Fix: allow empty path in utils.get_at_pathStephan Seitz
2021-03-30refactor(all): language tree adaption (#1105)Steven Sojka
2021-03-24feat(install): allow ignore list when installing parsers (#1098)Steven Sojka
2021-02-27chore: remove useless code and indent fileskiyan
2021-01-08fixed not highlighting bugBrian Shu
2021-01-07added attach asyncBrian Shu
2020-11-25Only update outdated_parsers on TSUpdateStephan Seitz
2020-09-28chore: dedup join_paths <-> join_pathStephan Seitz
2020-09-27Add lockfile and make lockfile default install revisionStephan Seitz
2020-09-18Make :TSInstall work in Nix by adding a second module installation target (#473)Florian Beeres
* Ignore tags file in project root * Make :TSInstall work with Nix This commit adds logic to determine where to install parsers, meaning the *.so files. Until now the package path of the nvim-treesitter plugin was used. But when installed with Nix, the plugin lands in "/nix/store", which is read-only. With this commit $XDG_DATA_HOME/nvim/site/parser/*.go will be used as the parser installation path. The directory will be created if it doesn't exist. * Add generate_join function The generate_join function is used to create two other functions, one to join path segments, the other to join strings with a space for error messages.
2020-09-10Find package path based on the Lua source fileMarkus Koller
This is more robust compared to the previous method where we walked up the tree and matched on the directory name, which also required that the repository was cloned in a directory named `nvim-treesitter`.
2020-08-31feat(refactor.navigation): add navigation.goto_{next,previous}_usageStephan Seitz
2020-08-30remove second checkOleg Matrokhin
2020-08-30fix get_package_path function for paths with trailing slashOleg Matrokhin
2020-08-27Add Windows support (mingw)Stephan Seitz
2020-08-17Textobjects: set jump before going to adjacent_textobjectStephan Seitz
2020-07-14Add textobjects moduleStephan Seitz
2020-07-05Make luacheck happyStephan Seitz
2020-06-30refactor(refactor): use higher local apis and some cleanupSteven Sojka
2020-06-30feat(refactor): highlight usages moduleSteven Sojka
2020-06-19refacto: remove buf_statekiyan42
- remove buf_state and related code - add get_node_at_cursor() - better incremental selection (code is localized)
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-05-03Add 'nvim-treesitter/node-movement'Stephan Seitz
2020-04-25textobj: little refactorThomas Vigouroux
2020-04-25textobj: add incremental scope selectionThomas Vigouroux
2020-04-24feat/refacto: improve configurationskiyan42
- 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
2020-04-20feat: add node manipulation utilsThomas Vigouroux