???????? ????8????????????????????????????
Tagged with plugin-treesitter neovim
25 questions
1
vote
1
answer
29
views
Why are TypeScript files with shebang in nvim rendered in gray?
I have installed the up-to-date tree-sitter-typescript, and it works well in typescript files without shebang.
I searched online but couldn't find any particularly similar questions. Some people ...
1
vote
1
answer
106
views
How to set a highlight group on the captured name of a tree-sitter node?
I'm using nvim v0.11.1 with nvim-treesittter.
I often edit Python code with strings containing SQL, and I would like to apply highlighting on the SQL strings.
I've created a file ~/.config/nvim/...
1
vote
0
answers
69
views
Gopls is not providing highlight tokens for constants or packages/namespaces
For example, in the code below the constant "myUrl" will be highlighted as a constant when it is declared (:Inspect = @constant) but not when it is used in main() (:Inspect = @variable). My ...
0
votes
0
answers
183
views
Unable to disable treesitter highlighting in neovim 10
I'm lazy-loading nvim-treesitter which I want to keep doing, but mayve this makes disabling the treesitter syntax highlighting seemingly impossible (tho I can't tell for sure).
What works:
:...
1
vote
1
answer
466
views
How can I improve treesitter's indentation when editing a multi-line string?
I mostly edit php files, using Neovim with kickstarter.nvim loading lazy, phpactor & nvim-treesitter.
I believe nvim-treesitter is what ends up being responsible for auto-indentaion.
Indeed if I ...
1
vote
2
answers
50
views
Intelligent line splitting with treesitter text objects
I want to map gJ to split one line to multiple lines based on treesitter textobjects. Consider this single line string:
dir_movements = ["E", "ENE", "ESE", "N", ...
0
votes
1
answer
158
views
How to install slim syntax highlighting in Neovim?
How can I install syntax highlighting for .slim?
I have Neovim and lazy.nvim package manager, also I have TreeSitter
1
vote
1
answer
879
views
How do I use tree-sitter to change syntax highlighting for different kinds of identifiers?
I'm using coc-clangd and nvim-treesitter in NeoVim, and I have the following requirements.
set the global variable identifiers to bold
set the virtual function identifiers to italic
set the macro ...
1
vote
0
answers
128
views
How can I jump to a sibling node in Neovim?
Say I want to write a custom function / keyboard shortcut to jump to the next sibling node in Neovim/Lua. In theory, I can get that with TSNode:next_sibling(). But I'm lost as to how I would put the ...
2
votes
1
answer
519
views
Turn tree-sitter queries into folding
I have the following config in my ftplugin/groovy.lua:
vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
I simply want every region that constitutes a ...
6
votes
1
answer
2k
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
624
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 ...
1
vote
1
answer
2k
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 ...
3
votes
1
answer
4k
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
2
answers
869
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 ...