精通科技2016年净赚1371万元 营收同比增长2%
百度 她说,鉴于马尔代夫的局势,同程旅游已下线了2月28日之前的马尔代夫旅游产品。
Gather question about the installation and the utilization of the vim-treesitter Neovim plugin
27 questions
6
votes
2
answers
11k
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 ...
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 ...
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" ...
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 ...
2
votes
2
answers
2k
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(...
2
votes
0
answers
146
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 ...
2
votes
0
answers
72
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....
2
votes
0
answers
783
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 ...
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", ...
1
vote
2
answers
4k
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
vote
2
answers
6k
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, ...
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
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
1
answer
4k
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 ...
1
vote
1
answer
28
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 ...