ziglang / zig-mode

Zig mode for Emacs
GNU General Public License v3.0
170 stars 55 forks source link

Zig-mode mistaking function calls as variables #107

Closed Dappstr closed 1 month ago

Dappstr commented 1 month ago

After installing the latest version of Zig-mode for Emacs 29.4, it appears many things are being mistaken for variables, such as methods and non-method function calls. Not sure if this is expected. Screenshot 2024-09-16 000555 Screenshot 2024-09-16 001203

jcs090218 commented 1 month ago

Are you using tree-sitter-langs? 🤔

Dappstr commented 1 month ago

Are you using tree-sitter-langs? 🤔

@jcs090218 Yes I am. I'm on Windows and it was the easiest way to get tree-sitter up and working as I'm on Windows. I've tried downloading grammars and wasn't able to find the DLL's despite "tree-sitter generate" running without error and tree-sitter test passing (at least for C grammars)

jcs090218 commented 1 month ago

I've tried downloading grammars and wasn't able to find the DLL's despite "tree-sitter generate" running without error and tree-sitter test passing (at least for C grammars)

tree-sitter-langs provide prebuilt binaries; therefore, you don't need to build grammar yourself.

Could a recent commit of tree-sitter-langs cause it? See https://github.com/emacs-tree-sitter/tree-sitter-langs/pull/688. 🤔

Dappstr commented 1 month ago

I've tried downloading grammars and wasn't able to find the DLL's despite "tree-sitter generate" running without error and tree-sitter test passing (at least for C grammars)

tree-sitter-langs provide prebuilt binaries; therefore, you don't need to build grammar yourself.

Could a recent commit of tree-sitter-langs cause it? See emacs-tree-sitter/tree-sitter-langs#688. 🤔

The solution was to disable tree-sitter. Zig-mode by its-self seems to work well. So I guess I'll have to just edit my init.el file to disable tree-sitter for zig files. Thank you for your assistance.