Coder Social home page Coder Social logo

Indentation is broken, giving this error message: `tsi-indent-line: Symbol’s value as variable is void: node-at-point` about tsx-mode.el HOT 3 CLOSED

orzechowskid avatar orzechowskid commented on June 6, 2024
Indentation is broken, giving this error message: `tsi-indent-line: Symbol’s value as variable is void: node-at-point`

from tsx-mode.el.

Comments (3)

ckruse avatar ckruse commented on June 6, 2024 1

Hi @stevemolitor,

sigh. I am very sorry. I didn't remember deleting eln files before reporting the bug. After deleting my straight directory, the ELN cache and re-installing packages (just to be sure) everything works again.

I am very sorry for the noise :(

Best regards,
CK

from tsx-mode.el.

stevemolitor avatar stevemolitor commented on June 6, 2024 1

No worries thanks for the reply @ckruse!

from tsx-mode.el.

stevemolitor avatar stevemolitor commented on June 6, 2024

Hi @ckruse not a maintainer here but I did write the tsi-typescript--get-indent-for-current-line function where it's blowing up so I took a peek.

Thanks for the commit SHAs of everything, very helpful. I upgraded everything and verified I had the same commits, deleted *.elc, eln caches and such just to make sure I'm running the latest. I could not reproduce - everything is working for me.

It looks like it's complaining that node-at-point is void around here:

  (when-let* ((node-at-point (tree-sitter-node-at-point))
              (current-type (tsc-node-type node-at-point))
              (parent (tsc-get-parent node-at-point))
              (parent-type (tsc-node-type parent)))

when-let* will stop if any binding is nil. I guess it's possible that tree-sitter-node-at-point changed to return a void variable instead of nil in certain conditions. However most of the time it returns a valid node so I'd expect only an intermittent problem if that were the case.

Can you step thru tsi-typescript--get-indent-for-current-line and verify that:

  • you're running see the same code as above
  • what node-at-point gets bound to from (tree-sitter-node-at-point)?

Thanks!

EDIT: This issue probably belongs in tsi.el

from tsx-mode.el.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.