136 questions
1
vote
0
answers
85
views
How setup Neovim for Haxe programming language (LSP and Treesitter)
Hello people on the internet.
I made my own Neovim config https://github.com/Mr-Fox-h/fox-ide and it's a good config, but I want to write codes with Haxe programming language. I installed haxe and ...
0
votes
0
answers
101
views
Error when using get_parser in Python's tree-sitter-languages
When using get_parser("javascript") from tree-sitter-languages 0.25.1 I get the following error:
TypeError: __init__() takes exactly 1 argument (2 given)
Code:
from tree_sitter_languages ...
1
vote
0
answers
194
views
Neovim indentation
I have recently switched to Neovim from Sublime Text. I mostly make edits in my code using mouse in insert mode, as I don't have enough practice of keyboard.
When I press enter to move to new line, ...
1
vote
0
answers
74
views
Persistant Folds in Neovim with Treesitter
I am unable to get my folds to save and load between neovim sessions. Currently my sessions are being saved, and I ahve unable to load them through a autocmd, but if I run :loadview after loading into ...
1
vote
2
answers
436
views
NeoVim Highlight .ts template as HTML / JSX
Update:
The closest I am able to get is by using an hmtl tagged template string. (This highlighting works even if html is undefined in the file.)
But this doesn't work for trying to do something like:
...
-4
votes
1
answer
88
views
Syntax-aware deletion of code blocks in a lua file [closed]
I created a bash script that automatically populates a lua config file with ssh-mux settings according to my input. The populated config file looks like this:
ssh_domains.lua
local M = {}
M....
0
votes
0
answers
99
views
Nvim ESLint not working properly in React TypeScript
I have a React TypeScript project, here is .eslintrc.json:
"env": {
"browser": true,
"es2021": true
},
"extends": ["eslint:...
3
votes
2
answers
301
views
tree-sitter size limitation (fails if code is >32kb)
I am trying to understand how tree-sitter works, but I ran into an issue when parsing "large" files. A file slightly over 32KB consistently causes tree-sitter to fail.
What I tested:
I wrote ...
1
vote
0
answers
68
views
Using Emacs (Spacemacs version) to write C# programs; after enabling Treesit related functionality configuration, it cannot work normally
I use Emacs (Spacemacs version) to write CSharp programs; I used the following code to enable and install the related Treesit function configuration.
(use-package treesit
:config
(setq treesit-...
1
vote
1
answer
706
views
Why treesitter syntax highlighting not working correctly with FastAPI Python decorators in Neovim?
I'm having an issue with syntax highlighting for FastAPI decorators. In VSCode everything works perfectly out of the box (after installed some Python extensions), but in Neovim the whole decorator ...
0
votes
0
answers
60
views
How to Parse React and Angular Legacy codebase and Generate documentation using LLM?
I’m working on a project similar to RepoAgent, which generates documentation for Python code. In their approach, they use Jedi to analyze references, imports, and dependencies, creating a dependency ...
1
vote
0
answers
661
views
How do I resolve treesitter error on Windows?
I keep getting this error after trying to set up treesitter. I've seen advice online saying to read the Windows support page for treesitter, but I can't seem to understand what's going on in the ...
1
vote
1
answer
175
views
Link one Treesitter highlight group to another
Trying to undergo the Neovim 0.10 upgrade (as it horrifically broke my colorscheme, so I've put it off), but I'm running into an issue when it comes to linking one group to another.
In my old config, ...
1
vote
1
answer
2k
views
nvim treesitter highlighting error when editing golang files
I've been using neovim for editing .go files for the past couple of weeks without any issues, but after I've installed ubuntu's software updates (I am using Ubuntu 22.04.4 LTS if that matters), now as ...
5
votes
2
answers
2k
views
How to load custom language in python tree-sitter version 0.23.0
Python tree-sitter version 0.21.3 or earlier
from tree_sitter import Language, Parser
lang_path = "tree-sitter-test-lang/test-lang.so"
# Load the language
TESTLANG_LANGUAGE = Language(...
2
votes
0
answers
101
views
node-tree-sitter always outputs error despite CLI working
I'm trying to use tree-sitter to parse my little test language.
Here's the code:
#!node
const Parser = require('tree-sitter');
const Kram = require('.');
const parser = new Parser();
parser....
1
vote
0
answers
261
views
Treesitter uv_dlopen: no_error after :TSInstall
I wanted to try NvChad as I've been trying to handroll my own config, but it is taking longer than expected, and so I want to gap that difference. I installed it on WSL ubuntu 24.04 (since I want to ...
4
votes
2
answers
1k
views
How to get the tree structure data of class/property/method in tree-sitter?
How to get the tree structure data of class/property/method in tree-sitter:
I can only match the class like below:
const Parser = require("tree-sitter")
const JavaScript = require("tree-...
1
vote
1
answer
160
views
NeoVim Treesitter RST highlight for Python docstrings
I'm trying to configure treesitter to apply rst highlight group to docstrings in Python.
In after/queries/python/highlights.scm I set the following:
(module . (expression_statement (string (...
1
vote
0
answers
31
views
Default initialization of tree_sitter::Node
Is there any way to initialize a default value to tree_sitter::Node? So, this is how we parse using tree_sitter.
let mut parser = tree_sitter::Parser::new();
let path = "abc.txt";
let ...
0
votes
1
answer
358
views
Resolve conflict in tree-sitter grammar
I want to create code with only identifiers and couple symbols like
identifier
identifier = identifier
identifier = identifier
identifier
identifier = identifier
identifier = identifier
...
4
votes
1
answer
4k
views
Treesitter - Failed to load 'lua' parser
I've installed TreeSitter on my Neovim config, yet all parser I seems to have installed failed to load
Here are the errors
Erreur détectée en traitant function <SNR>35_NetrwBrowseChgDir[194]..&...
3
votes
1
answer
2k
views
How to create a new capture group with treesitter for updating highlight priority in neovim?
Just as a preface - I'm very new to Neovim (installed and configured it last week), so forgive me for my knowledge gaps.
I'm trying to update the priority defined by treesitter for the @lsp.typemod....
1
vote
0
answers
259
views
Neovim treesitter setup issue in init.lua
This is my setup file:
vim.cmd("set expandtab")
vim.cmd("set tabstop=2")
vim.cmd("set softtabstop=2")
vim.cmd("set shiftwidth=2")
vim.g.mapleader = " "...
1
vote
0
answers
229
views
How to build .wasm for tree-sitter-latex or (emcc command failed)?
I want to make server side syntax highlighter for latex with web-tree-sitter. But I cannot make a .wasm file for tree-sitter-latex.
I made a issue in github repo. But could someone build me .wasm file ...