Questions tagged [plugin-treesitter]
Gather question about the installation and the utilization of the vim-treesitter Neovim plugin
25
questions
0
votes
0
answers
37
views
Neovim tries to run vale through a Autocommand
Whenever I save a .txt file it I get the error:
Error detected while processing BufWritePost Autocommands for "*":
Error running vale: ENOENT: no such file or directory
I have tried using :...
0
votes
0
answers
9
views
How can I have treesitter have a decent visual fallback when it panics?
Treesitter is very often panicking and refusing to parse stuff on my Windows machine. How can I survive this and still be able to modify the file smoothly, maybe by falling back to some more basic ...
2
votes
1
answer
109
views
Use treesitter to jump to next argument without going into nested function calls
I'm hoping to write a macro that involves jumping to a second argument of a function call and deleting it. The function arguments will sometimes include nested function calls, sometimes not, will ...
0
votes
1
answer
84
views
(nvim-treesitter) How to disable hyperlink highlighting in tree-sitter-markdown?
I installed tree-sitter-markdown in my nvim for editing the md files. However, it seems it highlights the links and hides the url part. This often annoys me when I edit url/paths.
You can see it in ...
0
votes
0
answers
39
views
How to detect whether current cursor position is code-block in markdown file from lua function?
Target: Trying to write lua function that will return true if current cursor position in code-block in markdown, false if not.
Current Status: I have following code, that (based on tree-sitter) ...
1
vote
1
answer
468
views
How to install nvim-html-css neovim plugin in NvChad
Neovim plugin: nvim-html-css
I don't know lua but I need this plugin installed for bootstrap classes. I have Neovim NvChad lazy.nvim setup. Copy pasting didn't worked so I tried to cut out maybe ...
2
votes
0
answers
80
views
Move cursor to matching goto/jump/label
Goto/label statement pairs are available in C++, Visual Basic, JavaScript, Fortran, and other languages, too.
The unique word or number allows goto to find the associated label. How can I help vim ...
1
vote
1
answer
1k
views
How to setup treesitter in vim script?
I have my entire nvim setup written in vim script at ~/.config/nvim/init.vim, but tresitter on it's GitHub says
require'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all" ...
0
votes
1
answer
237
views
TSEnable highlight - true by default
I'm using the plugin 'nvim-treesitter/nvim-treesitter', and I can enable syntax highlighting by using the command:
:TSEnable highlight
However, once I close n/vim it reverts back to disabled. I'm ...
1
vote
2
answers
561
views
Is there a way to disable Treesitter in Telescope?
I have max file size rule for files, setup in treesitter config, it works:
require 'nvim-treesitter.configs'.setup {
highlight = {
enable = true,
is_supported = function()
if vim.fn.strwidth(...
0
votes
1
answer
1k
views
Vanilla tree-sitter setup not enables highlighting automatically
I am failing to configure nvim-treesitter to automatically highlight the code upon opening a file.
After configuring nvim-treesitter by following the recommended instruction steps, this is what I get:
...
-1
votes
1
answer
210
views
vimtex#syntax#in_mathzone with tree-sitter and texlab
Vimtex provides the very useful family of functions vimtex#syntax#in_mathzone(), vimtex#syntax#in_comment() and vimtex#env#is_inside('...'), which come in handy for context sensitive snippets, e.g. ...
1
vote
1
answer
72
views
synstack is always empty
Whenever I do :echo synstack(line("."), col(".")) it prints []
I've tried this in html and svelte files in my neovim with treesitter, in neovim with -u NONE, and in Vim 9 with -u ...
0
votes
0
answers
27
views
How to apply TS directive to correct child?
In my sidequest of hiding tailwind classnames, I first realized regex based conceal wasn't going to work due to my love of treesitter, therefore I need to instead use queries! and once again, I am ...
0
votes
1
answer
485
views
How to get list of highlight groups for a region under cursor? (problem with synIDtrans function)
My purpose is to get information which would explain why the region under cursor has that particular color. Yes, there are several very similar questions, but still my question is different.
I can get ...
0
votes
0
answers
544
views
nvim-treesitter not working; throws error E5113
I just installed nvim-treesitter and it throws me this error message when starting nvim:
Error detected while processing /home/MYUSERNAME/.local/share/nvim/plugged/nvim-treesitter/plugin/nvim-...
0
votes
0
answers
236
views
Is there a way to prioritize native syntax highlighting groups over nvim-treesitter in Neovim?
So I've been trying to add some syntax highlighting for lua-language-server annotations in Neovim. The language server is set up using lspconfig so I don't get builtin support for those highlights the ...
0
votes
0
answers
101
views
Configure treesitter for pywal.nvim
I am currently using the AlphaTechnology/pywal.nvim plugin in order to generate the colorscheme for my Neovim configuration. The only problem I have with this is that the .html files lack much color ...
1
vote
2
answers
2k
views
Color theme displayed wrong
I could really use some help here...
I have just migrated my nvim setup to all Lua and changed some plugins.
I have added nvim-treesitter and tried a few themes. The themes change OK and get applied, ...
2
votes
0
answers
51
views
Parse files, hidden from the user
I am working on a snippet for C/C++ that can generate switch statements with cases from the types that an enum can have.
So far I have some code that can get the type location from the language server....
0
votes
0
answers
769
views
Disable TreeSitter highlighting in inactive buffers
How can I disable TreeSitter highlighting in inactive buffers?
I currently have all inactive buffers blurred and their syntax disabled, but I can't figure out how to disable the TreeSitter ...
0
votes
2
answers
1k
views
How to install vim-treesitter?
I have installed neovim, it was cool so I installed vim-treesitter plugin.
I'm trying to use it but I get some error message.
I can't find solution about it.
Could you help me?
This is the error ...
4
votes
2
answers
6k
views
JSX highlighting with Neovim and nvim-treesitter
I'm using Neovim 0.6.0 with nvim-treesitter installed and I mostly work with JavaScript, Flow, TypeScript based React projects. This means, I also need syntax highlighting for JSX and TSX.
Syntax ...
1
vote
1
answer
3k
views
Syntax highlighting is incomplete on neovim, fixed by calling Telescope
I have this problem that I would really like to get to the bottom of.
If I open a file on neovim it will display like the broken syntax highlighting, see image below.
Now, If I run :Telescope ...
2
votes
0
answers
573
views
Cannot get current node tree with treesitter in Lua in nvim
I am trying to get the AST tree to find the node I want. Based on the doc, I should be able to get the tree like this:
local parser = vim.treesitter.get_parser(0, vim.o.filetype)
print('check ...