Giter Club home page Giter Club logo

Comments (3)

Hneuschmidt avatar Hneuschmidt commented on June 4, 2024

I have this same problem with my config (not using astrovim).
The other movement commands also do not work (reliably), especially using % does not work at all.

:echo JuliaGetMatchWords()
always returns \<\>:\<\> which is not correct I assume.

from julia-vim.

Hneuschmidt avatar Hneuschmidt commented on June 4, 2024

Okay I did some more digging.
The issue stems from me (and AstroVim) using Treesitter for syntax highlighting.

The filetype plugin from julia-vim relies on synID()
in line 58:
let attr = synIDattr(synID(l, c, 1),"name").

However, when using treesitter for syntax highlighting, synID() always returns 0
which breaks the rest of the JuliaGetMatchWords() function.

In case you (@sash-a) haven't found some other solution, you can make the navigation commands work by disabling treesitter for julia files.

You can do that like this:

require"nvim-treesitter.configs".setup({ ignore_install = {"julia"} }),

in your treesitter configuration and then uninstalling the TS parser for julia:

:TSUninstall julia

It would be nice if there was a way to use julia specific navigation while also using treesitter, but disabling it resolves the problem as a workaround.

from julia-vim.

ArbitRandomUser avatar ArbitRandomUser commented on June 4, 2024

i seem to run into this behaviour without Treesitter installed ,
i can confirm that my juliagetmatchwords returns

\%(\%(\%(@\%([#(]\@!\S\)\+\|\<\%(local\|global\)\)\s\+\)\@<!\%(\%(@\%([#(]\@!\S\)\+\|\<\%(local\|global\)\)\s\+\)\+\%(\.\s*\|@\)\@<!\<\%(function\|macro\|begin\|mutable\s\+struct\|\%(mutable\s\+\)\@<!struct\|\%(abstract\|primitive\)\s\+type\|let\|do\|\%(bare\)\?module\|quot
e\|if\|for\|while\|try\)\>\)\|\%(\%(\%(@\%([#(]\@!\S\)\+\|\<\%(local\|global\)\)\s\+\)\@<!\%(\.\s*\|@\)\@<!\<\%(function\|macro\|begin\|mutable\s\+struct\|\%(mutable\s\+\)\@<!struct\|\%(abstract\|primitive\)\s\+type\|let\|do\|\%(bare\)\?module\|quote\|if\|for\|while\|try\)\
>\):\<end\> 

from julia-vim.

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.