Issue getting [comment node] on current cursor position with Treesitter API's get_node_at_cursor()

This page summarizes the projects mentioned and recommended in the original post on /r/neovim

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • neovim

    Vim-fork focused on extensibility and usability

  • Comment.nvim

    :brain: :muscle: // Smart and powerful comment plugin for neovim. Supports treesitter, dot repeat, left-right/up-down motions, hooks, and more

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • nvim-treesitter

    Nvim Treesitter configurations and abstraction layer

    I think the issue here is that ts_utils.get_node_at_cursor() is getting the node from an inject language tree. In this case, the injected language is comment. This is fixed by a change I got merged in which adds an ignore_injected_langs parameter so you can call it like ts_utils.get_node_at_cursor(0, true)

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts