nvim-treesitter / nvim-treesitter-refactor

Refactor module for nvim-treesitter
Apache License 2.0
407 stars 25 forks source link

Deprecation warning for smart_rename #34

Open andrewferrier opened 2 years ago

andrewferrier commented 2 years ago

Describe the bug As of recently, the first use of smart_rename within a NeoVim session has started emitting a deprecation warning:

nvim-treesitter.ts_utils.get_node_text is deprecated: use vim.treesitter.query.get_node_text

To Reproduce Steps to reproduce the behavior:

  1. Install and configure nvim-treesitter-refactor, assign a key to smart_rename.
  2. Open a file, and whilst on an identifier, press that key.

Expected behavior Usual rename behaviour.

Output of :checkhealth nvim_treesitter

nvim_treesitter: health#nvim_treesitter#check
========================================================================
## Installation
  - OK: `tree-sitter` found 0.20.6 (parser generator, only needed for :TSInstallFromGrammar)
  - OK: `node` found v17.9.0 (only needed for :TSInstallFromGrammar)
  - OK: `git` executable found.
  - OK: `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
    Version: Apple clang version 13.1.6 (clang-1316.0.21.2.3)
  - OK: Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.

## Parser/Features H L F I J
  - llvm           ✓ . . . . 
  - http           ✓ . . . ✓ 
  - scheme         ✓ . ✓ . ✓ 
  - prisma         ✓ . . . . 
  - rasi           ✓ ✓ ✓ ✓ . 
  - json           ✓ ✓ ✓ ✓ . 
  - yaml           ✓ ✓ ✓ ✓ ✓ 
  - rego           ✓ . . . ✓ 
  - norg           . . . . . 
  - clojure        ✓ ✓ ✓ . ✓ 
  - jsonc          ✓ ✓ ✓ ✓ ✓ 
  - commonlisp     ✓ ✓ ✓ . . 
  - vala           ✓ . . . . 
  - lalrpop        ✓ ✓ . . . 
  - cuda           ✓ ✓ ✓ ✓ ✓ 
  - solidity       ✓ . . . . 
  - wgsl           ✓ . ✓ . . 
  - cooklang       ✓ . . . . 
  - glsl           ✓ ✓ ✓ ✓ ✓ 
  - scss           ✓ . . ✓ . 
  - elvish         ✓ . . . ✓ 
  - hack           ✓ . . . . 
  - dot            ✓ . . . ✓ 
  - astro          ✓ ✓ ✓ ✓ ✓ 
  - foam           ✓ ✓ ✓ ✓ ✓ 
  - rust           ✓ ✓ ✓ ✓ ✓ 
  - query          ✓ ✓ ✓ ✓ ✓ 
  - fusion         ✓ ✓ ✓ ✓ . 
  - heex           ✓ ✓ ✓ ✓ ✓ 
  - python         ✓ ✓ ✓ ✓ ✓ 
  - ocaml          ✓ ✓ ✓ . ✓ 
  - phpdoc         ✓ . . . . 
  - hocon          ✓ . . . ✓ 
  - hjson          ✓ ✓ ✓ ✓ ✓ 
  - ocaml_interface✓ ✓ ✓ . ✓ 
  - markdown       ✓ . ✓ . ✓ 
  - pioasm         ✓ . . . ✓ 
  - elm            ✓ . . . ✓ 
  - lua            ✓ ✓ ✓ ✓ ✓ 
  - yang           ✓ . ✓ . . 
  - vim            ✓ ✓ . . ✓ 
  - c_sharp        ✓ ✓ ✓ . ✓ 
  - ninja          ✓ . ✓ ✓ . 
  - help           ✓ . . . . 
  - ruby           ✓ ✓ ✓ ✓ ✓ 
  - todotxt        ✓ . . . . 
  - gomod          ✓ . . . ✓ 
  - perl           ✓ . ✓ . . 
  - dart           ✓ ✓ . ✓ ✓ 
  - slint          ✓ . . ✓ . 
  - vue            ✓ . ✓ ✓ ✓ 
  - graphql        ✓ . . ✓ ✓ 
  - zig            ✓ . ✓ ✓ ✓ 
  - c              ✓ ✓ ✓ ✓ ✓ 
  - php            ✓ ✓ ✓ ✓ ✓ 
  - teal           ✓ ✓ ✓ ✓ ✓ 
  - dockerfile     ✓ . . . ✓ 
  - java           ✓ ✓ . ✓ ✓ 
  - ql             ✓ ✓ . ✓ ✓ 
  - regex          ✓ . . . . 
  - kotlin         ✓ ✓ ✓ . ✓ 
  - scala          ✓ . ✓ . ✓ 
  - beancount      ✓ . ✓ . . 
  - pascal         ✓ ✓ ✓ ✓ ✓ 
  - julia          ✓ ✓ ✓ ✓ ✓ 
  - tlaplus        ✓ ✓ ✓ . ✓ 
  - html           ✓ ✓ ✓ ✓ ✓ 
  - toml           ✓ ✓ ✓ ✓ ✓ 
  - r              ✓ ✓ . ✓ ✓ 
  - svelte         ✓ . ✓ ✓ ✓ 
  - comment        ✓ . . . . 
  - erlang         . . . . . 
  - d              ✓ . ✓ ✓ ✓ 
  - devicetree     ✓ ✓ ✓ ✓ ✓ 
  - elixir         ✓ ✓ ✓ ✓ ✓ 
  - pug            ✓ . . . ✓ 
  - sparql         ✓ ✓ ✓ ✓ ✓ 
  - fennel         ✓ ✓ . . ✓ 
  - gleam          ✓ ✓ ✓ ✓ ✓ 
  - gdscript       ✓ ✓ . ✓ ✓ 
  - surface        ✓ . ✓ ✓ ✓ 
  - typescript     ✓ ✓ ✓ ✓ ✓ 
  - godot_resource ✓ ✓ ✓ . . 
  - eex            ✓ . . . ✓ 
  - jsdoc          ✓ . . . . 
  - bibtex         ✓ . ✓ ✓ . 
  - make           ✓ . . . ✓ 
  - ledger         ✓ . ✓ ✓ ✓ 
  - turtle         ✓ ✓ ✓ ✓ ✓ 
  - rst            ✓ ✓ . . ✓ 
  - cpp            ✓ ✓ ✓ ✓ ✓ 
  - fortran        ✓ . ✓ ✓ . 
  - go             ✓ ✓ ✓ ✓ ✓ 
  - cmake          ✓ . ✓ . . 
  - bash           ✓ ✓ ✓ . ✓ 
  - gowork         ✓ . . . ✓ 
  - tsx            ✓ ✓ ✓ ✓ ✓ 
  - hcl            ✓ . ✓ ✓ ✓ 
  - json5          ✓ . . . ✓ 
  - glimmer        ✓ . . . . 
  - ocamllex       ✓ . . . ✓ 
  - verilog        ✓ ✓ ✓ . ✓ 
  - fish           ✓ ✓ ✓ ✓ ✓ 
  - latex          ✓ . ✓ . ✓ 
  - supercollider  ✓ ✓ ✓ ✓ ✓ 
  - javascript     ✓ ✓ ✓ ✓ ✓ 
  - css            ✓ . ✓ ✓ ✓ 
  - haskell        ✓ . . . ✓ 
  - nix            ✓ ✓ ✓ . ✓ 

  Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
         +) multiple parsers found, only one will be used
         x) errors found in the query, try to run :TSUpdate {lang}

Output of nvim --version

NVIM v0.7.0
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@Monterey

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/0.7.0/share/nvim"

Run :checkhealth for more info
andrewferrier commented 2 years ago

This might help: https://www.reddit.com/r/neovim/comments/u6eu0q/comment/i587yfk/