Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
A feature which lets visually hide (and toggle) regions of a text file, by replacing its contents with a single outline line.
2
votes
1
answer
321
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 block to be folder. I' …
2
votes
Turn tree-sitter queries into folding
Write a folds.scm file in the query folder for your language.
I am looking at the code: .../nvim-treesitter/autoload/nvim_treesitter.vim:
function! nvim_treesitter#foldexpr() abort
return luaeval …
2
votes
1
answer
207
views
How to set the value of 'foldexpr' to be a lua function?
I have read the documentation on foldexpr, and I have read through Possible to set `foldexpr` using a function reference?.
I have tried this:
vim.o.foldexpr = function()
return "1"
end
which clearl …